/Genetic-Maze

Using genetic algorithm to solve a maze

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

Genetic labyrinth

This project solves a maze game without seeing the maze but knowing the distance to the exit. A genetic algorithm is used to solve it.

An illustration of the game

Why genetic algorithm ?

Solving a maze is easy using known algorithms such as depth first search or A*. However, I wanted to see if I could do it with a genetic algorithm. To get it harder, I wanted to see if I could solve it with a genetic algorithm without knowing where the walls are.

Motivations

I did that project just to remind me what a genetic algorithm is and have a clean implementation. The implementation is reusable for any project that needs a genetic algorithm. Here is the French description of the project there.

Generating the maze

I used a recursive algorithm to generate the maze.