forked from arex18/rocket-lander
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment.py
More file actions
25 lines (21 loc) · 787 Bytes
/
environment.py
File metadata and controls
25 lines (21 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from pdb import set_trace as T
import functools
import pufferlib
import pufferlib.emulation
import pufferlib.postprocess
import pufferlib.wrappers
def env_creator(name='rocketlander'):
return functools.partial(make, name)
def make(name, render_mode='rgb_array'):
'''Atari creation function'''
settings = {'Side Engines': True,
'Clouds': True,
'Vectorized Nozzle': True,
'Starting Y-Pos Constant': 1,
'Initial Force': 'random'} # (6000, -10000)}
from .environments.rocketlander import RocketLander
env = RocketLander(settings)
env = pufferlib.wrappers.GymToGymnasium(env)
env = pufferlib.postprocess.EpisodeStats(env)
env = pufferlib.emulation.GymnasiumPufferEnv(env=env)
return env