Giter VIP home page Giter VIP logo

cartpoleswingup's Introduction

CartPoleSwingUp

CartPoleSwingUp is a custom gym environment, adapted from hardmaru's version.

Swing-up is a more complex version of the popular CartPole gym environment. In swing-up, the cart must first swing the pole to an upright position before balancing it as in normal CartPole.

This adapted version includes a non-continuous version of the environment for use with models such as DQN.

Note: this env currently does not work with the latest versions of gym. I am working to correct this.

How to use

Either copy the file containing the environment to your own codebase, or install the repo with pip install git+https://github.com/TTitcombe/CartPoleSwingUp.git. You can then import the code with import CartPoleSwingUp. Once you've imported the environment class, you can simply call env = CartPoleSwingUpEnv(). However, if you do not want to hard-code an environment, I have created a helper function which defaults to gym behaviour if using any other env:

from cartpoleswingup import make

swing_up_env = make("CartPoleSwingUp")
cartpole_env = make("CartPole-v1")

cartpoleswingup's People

Contributors

ttitcombe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

cartpoleswingup's Issues

Fix relative paths when importing

If you install the repo with pip install git+repo_url, upon import CartPoleSwingUp you will see the error ModuleNotFoundError: No module named 'env'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.