Genetic pathfinding algorithm in javascript with p5.js for visualization.
Demo available here.
It searches for a path from the center of the window to the user's mouse avoiding obstacles. The found way is probabely not the shortest but is certainly a viable one.
Algorithm characteristics :
- selection used is the roulette wheel
- grow to increase or decrease the genome
- crossover with a random parent individual
- mutations to create new behaviors