fancy_gym/example.py

21 lines
441 B
Python
Raw Normal View History

2020-09-19 17:47:20 +02:00
import time
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
2021-01-21 09:42:04 +01:00
env = gym.make('alr_envs:ALRReacher-v0')
# env = gym.make('alr_envs:SimpleReacher-v0')
2020-09-19 17:47:20 +02:00
# env = gym.make('alr_envs:ALRReacher7-v0')
2020-08-28 18:31:06 +02:00
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())
2020-09-19 17:47:20 +02:00
if i % 1 == 0:
2020-08-28 18:31:06 +02:00
env.render()
2020-09-19 17:47:20 +02:00
# if done:
state = env.reset()
time.sleep(0.5)