Deep Q-learning for playing Chrome Dino

python source code for training an agent to play flappy bird. It could be seen as a very basic example of Reinforcement Learning's application.

chrome_dino_1
Result

The corresponding output video will also be generated and stored by default at output/chrome_dino.mp4
chrome_dino_2
Output video

How to use my code

With my code, you can:

  • Train your model from scratch by running python train.py
  • Test your trained model by running python test.py

Trained models

You could find my trained model at trained_models/chrome_dino.pth

Requirements

  • python 3.6
  • pygame
  • cv2
  • pytorch
  • numpy

GitHub

https://github.com/uvipen/Chrome-dino-deep-Q-learning-pytorch