Implementation of Flappy Bird reinforcement learning agent by using two approaches:
- Q learning (2000 episodes - trained about 2 minutes, 150 000 episodes - trained 7 hours)
- Monte Carlo Q learning (2000 episodes - trained about 9 minutes, 50 000 episodes - don't know the exact time, 150 000 episodes - trained 11.5 hours)
In folder basic-q-learning we trained our model with basicq_2000.txt and basicq_150000.txt, so just run runBasicQLearning.py and open one of these files, and in folder monte-carlo-q-learning with monte_2000.txt and results_150000.txt and run runMonteCarloQLearning.py.
- PLE: A Reinforcement Learning Environment mimicking the Arcade Learning Environment interface, allowing a quick start to Reinforcement Learning in Python
- NumPy fundamental package for scientific computing with Python
- Pillow Python Imaging Library
- pyGame cross-platform set of Python modules designed for writing video games
- other helper modules which can be installed manually
Basic Q learning has still problems after 2000 episodes, sometimes getting score about 4. Training lasted about 2 minutes. Monte Carlo Q learning after 2000 episodes in which training lasted about 9 minutes has tremendously better results, averaging at about score of 80.