Skip to main content

A simple, continuous-control environment for OpenAI Gym

Project description

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()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gym_cartpole_swingup-0.0.7-py3-none-any.whl (19.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page