Git Product home page Git Product logo

qwop-rl's Introduction

QWOP-RL

Description

Train an AI agent to play QWOP using reinforcement learning and imitation learning. Check out the 1st agent video summary, World Record speedrun or the write-up on Medium.

image

Setup

Install Python 3.7

conda create -n py37 python=3.7
conda activate py37

Install dependencies

pip install -r requirements.txt

Install Windows-specific dependencies if on Windows

conda install -c intel mpi4py

Install Chromedriver for interacting with Chrome through Selenium. Then, start HTTP server for the game

python host_game.py

Train and test

Train agent

python main.py --train

Test agent

python main.py --test

To save or use new models, the constant MODEL_PATH in main.py. Note that the agent plays the game in real-time, so differences in latency between training and testing computer will affect performance.

Imitation learning

Record games using human input

python main.py --record

Train agent from recorded games

python main.py --imitate

Tensorboard

Track training performance live or view metrics previous sessions

tensorboard --logdir ./tensorboard/

Acknowledgements

qwop-rl's People

Contributors

wesleyliao 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.