Genetic algorithm: dots attempt to launch from and orbit around the center blue planet, without crashing back into it or going beyond the bounds. It has four controls: nothing, boost left, boost straight, boost right. The four options at each frame are encoded as the dots's DNA sequence (0, 1, 2, 3 respectively). Achieving orbit is simple, so the algorithm attempts the largest possible orbit. This is defined by a fitness function between the mean distance between the dot and the planet and the roundness of the orbit, determined by the difference between the furthest and closest distance from the planet (range). The dot with the highest fitness is bred with other surviving dots with different orbits. The variables of this genetic algorithm is the probability of crossover between two parents, probability of mutation with each frame, and probability of a random amount of fuel.
Click and hold to see the trail of the dots, press 'w' to toggle continue running the generation after all the data is recorded, press 'r' to reset the program. I was too lazy to implement changing the variables during runtime, so no controls for that.
After running the program for 24 hours, in the 4414th generation, I got a fitness of 458.2152 with a mean distance of 448.03256 and a range of 1.6021423. The DNA sequence was:
222011033232110313310331310311310300100301003000000000000000000000000
0000000100000000000000000000000000000000000000000000000000000000100101.
I should have implemented a way of graphing the max fitness achieved over time, but didn't think of it at the time. The lowest fitness possible is around 250, and the program reaches 300 around the 10th generation, so fitness progresses exponentially slower over time.