Skip to content
Evolutionary Pac-Man bots using Grammatical Evolution and Multi-objective Optimization. Cool GUI included (Undergraduate Thesis)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Updates in logger, libraries, git connectivity May 6, 2017
src Gitconn hotfix, logger now works without git connected Jun 16, 2017
.gitignore Update gitignore Apr 5, 2017
LICENSE.txt Update Aug 24, 2017
change_log.txt Initial commit Aug 7, 2016
copyright.txt Initial commit Aug 7, 2016

Ms Pac-Man

Ms Pac-Man

Ever since the birth of video-games we’ve seen Artificial Intelligence techniques applied to them: Character behaviour, enemy strategies, pathfinding, etc. We want to explore Grammatical Evolution (a Genetic Programming variant) to evolve game strategies generated from the derivation of defined grammar rules. For this purpose, we experimented with the evolution of a bot for Ms. Pac-Man, a well-known game which can have many sub-goals, like surviving the most time possible, eating the most pills, killing as many ghosts as it can, or go through a lot of levels before dying to the ghosts.

Particularly, we experimented with controllers based on two different grammars, with high and medium level actions respectively. Due to the complexity of video-games and how useful it could be for an artificial intelligence to modify its behaviour in real time, we want to check the results of multi-objective optimization in grammatical evolution. And how we can achieve the subgoals we consider more important in a situation by simply changing the evaluation functions we use in the grammatical evolution algorithm.

In this work we will show that this approach based on Grammatical Evolution gets excellent results and we will see that bots produced can obtain high scores and complete several levels, even better results than the coded bots included, or other known evolutionary bots.

You can check out our slightly fancier website here. It has the same content than this Readme plus some interactive graphs and example grammars.


Detailed description of all the work behind this project (not completely in English, sorry).

Scientific article published on CoSECiVi (Spanish Society for VideoGame Sciences Conference) 2017.


Using the command line

git clone

From Eclipse or other IDE

File > Import > Git > Projects from Git > Clone URI
Paste in URI field
Check master only and click Finish


On the project, go to src/main and execture class The GUI will open.

Checking the code

Configure your Eclipse so that the code looks good (UTF-8 and Unix line endings).

Meet the Docs

You can’t perform that action at this time.