About the Project

For my final year project at University I developed a neural network based controller to play the game Ms. Pac-Man. The project had a large research focus, requiring me to investigate different machine learning techniques that had previously been used in Ms. Pac-Man and other video games.

I chose to use a neural network as the core of my controller as there is a lot of numerical information available in the game, suitable for input into a neural network. The network was trained through neuroevolution, learning the play the game on its own without human input.

The project is inspired by the Ms. pacman vs ghost team competition, and uses their Java simulation of the game as a basis. For the development stage of the project I mainly wrote Java code for the neural network inputs, and used the JNEAT library to create and evolve neural network populations.

The Results

Using my program you can evolve your own population of controllers, watching as the high score increases over time. You can also run simulations using your saved champion controllers, either watching them play out a game with your own eyes, or evaluating them over multiple games to determine their average and peak performance.

The best scoring champion achieved peak and average scores almost on par with other researchers. The controller was not as good at the game as I had hoped, but interesting behaviours developed through the training process and taught me a lot about neuroevolution.

Button to GitHub Repository

Visit the GitHub repository

The video below shows the difference between an untrained controller (shown first), and a controller after 200 generations of evolution (shown second):