The dots cannot survive off the path. The further they travel before dying, the more chance they have of producing offspring. Each dot has 'DNA' which codes its movement. The offspring dots are very similar to their parent, but have random mutations in the DNA which slightly changes their route. An orange dot is currently producing offspring. The simulation ends if a dot reaches 'Finish' and turns green.
NOTHING about the path is programmed into the dots- they reach the finish by natural selection, and evolving their route by themselves. Change the % chance of mutation to see how it affects the simulation and feel free to describe your findings in the comments below. The dots may go extinct before they reach the finish. If they do, just tap the space bar again to create more dots. The scripts are fairly complex, but hopefully it doesn't lag too much! :)