Machine Learning Neural Network Test

6,139
0
Published 2018-08-15
This sort of works and you will notice it gets farther and farther in the level, but there are some points where it will get stuck. This is because I stupidly decided that it would only see the area immediately around it, not the entire screen like we humans would see.

Because I didn't allow for multiple offspring to live at once, I limited the offspring per generation to 5. Then the two offspring with the highest fitness will 'breed' (mix their data, or genes), creating three children. The parents will then clone themselves and play in the next generation too, ensuring that evolution never goes backwards. (crossover suggested by @Java_Programmer)

If the creature stands still for too long then it will be killed. Sometimes it may get stuck in loops where it moves back and forth, and will never die. Press 'k' to kill the creature and keep the simulation going.

Thank you @MegaApuTurkUltra for the quicksort code!