A pacman maze generator, using genetic algorithm and customized fitness metrics. Generally using
python genetic_algorithm_multi.py
Will run multithreading approach to generate 4 new layouts saved to the examples folder
Population = (
Each individual consists of half of the maze, which can follow a size of
The blocks shown in this figure, were then rotated by [$90^{\circ}, 180^{\circ}, 270^{\circ}$] and flipped across the vertical axis in order to create all possible combinations of valid blocks. These were
For the evaluation of the individual we have used number of different
The main idea behind the mutation algorithmic approach is that we evaluate each respective block in the maze for violation of validity on blocks. We then proceed to add proportional fitness to each of the block that are inside the violation (red area in picture below). Finally, blocks with higher fitness will have higher probability of being mutated and switched to different valid block.
Minimization problem, until fitness is zero.
The outputs layouts were used in the Berkeley pacman implementation (adapted to Python 3 by jspacc). Screenshots were taken from the game instances using the generated layouts.