fancy_gym/example.py

16 lines
357 B
Python
Raw Normal View History

2020-08-28 16:00:47 +02:00
import gym
2020-08-28 18:31:06 +02:00
if __name__ == '__main__':
2020-08-28 16:00:47 +02:00
2020-08-28 18:31:06 +02:00
# env = gym.make('alr_envs:ALRReacher-v0')
env = gym.make('alr_envs:SimpleReacher-v0')
state = env.reset()
2020-08-28 16:00:47 +02:00
for i in range(10000):
2020-08-28 18:31:06 +02:00
state, reward, done, info = env.step(env.action_space.sample())
if i % 5 == 0:
env.render()
if done:
state = env.reset()