mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-27 08:47:08 +00:00
Move _reset() in constructor to below the definitions of action_space (#220)
This commit is contained in:
committed by
Jonas Schneider
parent
a7e5a581dc
commit
92d5c9458a
@@ -86,7 +86,6 @@ class LunarLander(gym.Env):
|
||||
self.particles = []
|
||||
|
||||
self.prev_reward = None
|
||||
self._reset()
|
||||
|
||||
# useful range is -1 .. +1
|
||||
high = np.array([np.inf]*8)
|
||||
@@ -94,6 +93,8 @@ class LunarLander(gym.Env):
|
||||
self.action_space = spaces.Discrete(4)
|
||||
self.observation_space = spaces.Box(-high, high)
|
||||
|
||||
self._reset()
|
||||
|
||||
def _seed(self, seed=None):
|
||||
self.np_random, seed = seeding.np_random(seed)
|
||||
return [seed]
|
||||
|
Reference in New Issue
Block a user