Ejemplo n.º 1
0
def test_random_action():
    env = GymEnvironment("CartPole-v1")
    env.reset()
    action = env.get_random_action()
    print("GOT RANDOM ACTION", action)
    env.step(action)
    print("SUCCESSFULLY STEPPED ENV WITH ACTION", action)
Ejemplo n.º 2
0
def test_render():
    env = GymEnvironment("CartPole-v1")
    env.reset()
    while not env.needs_reset:
        env.step(env.get_random_action())
        env.render()
    env.close()
    print("RENDER TEST SUCCESSFUL!")