Used Reinforcement Learning techniques to train an Atari Breakout game which I created myself using PyGame. Algorithm used is Q-learning with 3 states and 3 actions.
Agent can only take 3 actions - Left, Right or Stay
Note - Use game.py file if you want to try out the game yourself and play with it. Use you keyboard keys to play. Game starts as soon as you launch it.
Use gameAI.py if you want the agent to learn the game using Q-learning. If you want the agent to learn from scratch, please delete Brain.npy file and then play the game.
Important Bug - There is a bug where the ball touches the paddle and starts grazing it and does not leave. I think it has something to do with floating point imprecision. If anyone finds a solution to it, would be grateful.
If that happens, kindly close game and restart it.
Thanks and Enjoy playing the game.