Skip to content

train an AI to play breakout with simple Q-learning algorthim

Notifications You must be signed in to change notification settings

lincerely/breakout-Q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Breakout-Q

demo_perfect2

A Q-learning Agent which plays breakout well (won't lose). Youtube Demo

The breakout game is based on CoderDojoSV/beginner-python's tutorial, and the Q-learning implementation is inspired by SarvagyaVaish/FlappyBirdRL

About

To start, run:

python game.py [path of the data file]

#for example
python game.py trainedQ_breakout_perfect.npz
#or
python game.py trainedQ_breakout_perfect
#or
python game.py myTest.npz

The script will try to load data from the path you provided, but when file not found, it will initialize a Q array and a new data file will be created upon saving.

To save and quit, close the pygame window.

To speed up, minimize the pygame window, this will also mute the game.

Dependency

The following python package is necessary to run the script:

  • numpy
  • pygame

About

train an AI to play breakout with simple Q-learning algorthim

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages