added balancing task
This commit is contained in:
parent
6a7c6991bb
commit
5290775bd5
10
example.py
10
example.py
@ -4,17 +4,19 @@ import gym
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
env = gym.make('alr_envs:ALRReacher-v0')
|
|
||||||
# env = gym.make('alr_envs:SimpleReacher-v0')
|
# env = gym.make('alr_envs:SimpleReacher-v0')
|
||||||
|
env = gym.make('alr_envs:ALRReacher-v0')
|
||||||
# env = gym.make('alr_envs:ALRReacher7-v0')
|
# env = gym.make('alr_envs:ALRReacher7-v0')
|
||||||
|
env = gym.make('alr_envs:Balancing-v0')
|
||||||
state = env.reset()
|
state = env.reset()
|
||||||
|
|
||||||
for i in range(10000):
|
for i in range(10000):
|
||||||
state, reward, done, info = env.step(env.action_space.sample())
|
state, reward, done, info = env.step(env.action_space.sample())
|
||||||
|
print(reward)
|
||||||
if i % 1 == 0:
|
if i % 1 == 0:
|
||||||
env.render()
|
env.render()
|
||||||
|
|
||||||
# if done:
|
if done:
|
||||||
state = env.reset()
|
state = env.reset()
|
||||||
|
|
||||||
time.sleep(0.5)
|
# time.sleep(0.5)
|
||||||
|
Loading…
Reference in New Issue
Block a user