AI using Proximal Policy Optimization to play the game pacman made in PyGame by DevinLeamy. I will be using his implementation of the classic game PacMan with the AI to play the game being written by myself.
The 80s classic Pacman in all its beauty
How to Play:
- Option One:
- Download the Pacman folder
- Download Python3 [https://www.python.org/downloads/]
- Install pygame(2.0.0) [pip3 and homebrew are easy options]
- In terminal, navigate to the file Pacman.py
- In terminal type python3 Pacman.py and hit enter
How was AI implemented 0. Environment Tuning 1. get rid of title screen 2. get rid of lives so there is one life and on death entire game resets(pellets, pacman, ghosts, etc...)
-
Q-learning rewards:
- normal pellet: +3
- power pellet: +5
- eating ghost: + 10
- death: -50
-
PPO
- pass
Note: To adjust screen size change the variable "square" on line #59 of Pacman/Pacman.py
Gameplay (delay is just an artifact of the video quality; it runs smooth):