Smart Dots is an application that uses a Genetic Algorithm to find a path to a target hindered with obstacles.
Clone the repo, go to the Application folder and run the GA1.exe
A simulation is run for the Dots to try and reach the target. The Genetic Algorithm at the end of simulation produces a new Generation of Dots from the best Dots of the previous generation. Dots are rated according to factors such as their distance from the target, the number of steps they took to reach, etc. Now the new Generation before deployement is mutated i.e their DNA is randomly changed. This introduces new possible solutions. And the cycle repeats. After a while good mutations get propagated in the generations and overall fitness increases. Given long enough time the algorithm arrives at the shortest path to the target.
The target is Yellow colored. The best Dot from the previous generation is highlighted in red. After the path is discovered, the algorithm optimizes for the quickest path by only considering Dots better than the previous generation.
To see a full run watch: https://www.youtube.com/watch?v=9twiJwJ310Y
Screenshots: