Skip to main content

A simple, continuous-control environment for OpenAI Gym

Project description



A simple, continuous-control environment for OpenAI Gym


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)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gym-cartpole-swingup, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size gym_cartpole_swingup-0.1.1-py3-none-any.whl (19.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size gym-cartpole-swingup-0.1.1.tar.gz (18.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page