Here's that pathfinding program I promised. It's really easy to play around with as everything can be dynamically changed. I hope it doesn't have any problems running on different computers... though I'm pretty confident about its stability (I'm usually scared to release my programs!) [grin]
Don't forget to read the readme! Straight from the readme:
- This algorithm tries to find a path between 2 points. Once a solution is found, the path turns red and it pauses for 2 seconds, then forces a re-population. If a solution is not found within 15 seconds, it forces a re-population.
- It uses Roulette Wheel Selection, random per-gene mutation, and single point crossover
- Fitness scores are based on the distance from the end point, 1/(distX*distX + distY*distY + 1), as well as the number of moves made
- I made it so that it could NOT backtrack, ie it cannot visit cells more than once. It's kind of cheap, but it works much faster!
- Meh, it works well on some map configurations, and horribly on others :)"
Sorry about the size of it, it runs on a framework that I'm currently working on which is starting to get large. I need to find a way to compile in only parts of the framework...