ykdojo / QWOP-RL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool



Train an AI agent to play QWOP using reinforcement learning and imitation learning. Check out the ACER video summary, DDQN world record video or the write-up on Medium.



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


Track training performance live or view metrics previous sessions

tensorboard --logdir ./tensorboard/


ezoic increase your site revenue



Language:Python 80.2%Language:JavaScript 19.1%Language:CSS 0.4%Language:HTML 0.3%