Skip to content

Simplified genetic algorithm to find solutions for a maze, based on Darwin's natural selection theory.

Notifications You must be signed in to change notification settings

rcdmk/genetic-maze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic Algorithm for Solving Mazes

This is a simplified implementation of a genetic algorithm to find solutions for a maze, based on Darwin's natural selection theory.

Algorithm

A random population is generated and processed, then its fitness is computed as how close they get to the goal. The fittest survive, producing a new generation that inherits part of their genes.

A mutation factor is also introduced to add some variation to the generation and it is essential for evolution to properly adjust it. If no mutation or a too low mutation factor is set, the population evolves only in a certain way, based on its ancestors, and can get stuck in certain paths, not being able to reach the goal. If a too high mutation factor is set the variation will be so high that the convergence of the population will be severely reduced, leading to very few individuals to reaching the goal.

About

Simplified genetic algorithm to find solutions for a maze, based on Darwin's natural selection theory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published