mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-27 16:57:10 +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,13 +86,14 @@ class LunarLander(gym.Env):
|
||||
self.particles = []
|
||||
|
||||
self.prev_reward = None
|
||||
self._reset()
|
||||
|
||||
# useful range is -1 .. +1
|
||||
high = np.array([np.inf]*8)
|
||||
# nop, fire left engine, main engine, right engine
|
||||
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)
|
||||
|
Reference in New Issue
Block a user