GithubHelp home page GithubHelp logo

andresmore / gym-rubiks-cube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robinchiu/gym-rubiks-cube

0.0 0.0 0.0 513 KB

Fork of RobinChiu model to enable rendering and integration of the gym with the tf-agents platform via Jupyter notebooks

Python 100.00%

gym-rubiks-cube's Introduction

gym-Rubiks-Cube

The Rubik's Cube is a popular game. If you still didn't know it, you can go to check it on Wiki.
Wiki: Rubik's Cube
This is the open gym environment for the Rubik's Cube. You can check it here.
https://gym.openai.com/


Installation

You can use the command to install the Rubik's Cube gym module.

pip install -e .

It will create a Rubiks Cube of gym environment. The cube will be scrambled in the reset function. You can change the scramble low/high step in it by call the setScramble function. You can look the play.py to learn how to use it.

python examples/play.py

image


Training

The traning program is copied from deepq of the OpenAI baseline. You need to install it first. https://github.com/openai/baselines Then you can run the command to train it.

cd examples
python train_rubikscube.py

I put my training check point file and model in the examples directory also. If you don't want to use it, you should delete it before your training.

rm -rf examples/rubikscube
rm examples/rubikscube_model.pkl

Run it

After the training you can test your model by runing the command. It will run 100 episodes(100 scrambled Rubik's Cube), and try to use your model to solve it.

python enjoy_rubikscube.py

image

gym-rubiks-cube's People

Contributors

andresmore avatar robinchiuasus avatar

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.