[go: up one dir, main page]

Skip to content

A simple, continuous-control environment for OpenAI Gym

License

Notifications You must be signed in to change notification settings

Armandpl/gym-cartpole-swingup

 
 

Repository files navigation

PyPI

gym-cartpole-swingup

A simple, continuous-control environment for OpenAI Gym

Installation

pip install gym-cartpole-swingup

Usage example

# coding: utf-8
import gym
import gym_cartpole_swingup

# Could be one of:
# CartPoleSwingUp-v0, CartPoleSwingUp-v1
# If you have PyTorch installed:
# TorchCartPoleSwingUp-v0, TorchCartPoleSwingUp-v1
env = gym.make("CartPoleSwingUp-v0")
done = False

while not done:
    action = env.action_space.sample()
    obs, rew, done, info = env.step(action)
    env.render()

About

A simple, continuous-control environment for OpenAI Gym

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.1%
  • Makefile 4.9%