Hit the green flag, press the space bar, change your computer settings so it won't sleep, and leave your computer to sit for several days! DOWNLOAD AND PLAY THIS ON THE OFFLINE EDITOR. After a couple of hours, the screen on the online version goes blank, stopping the program. This does not happen on the offline editor.
This is a project inspired by SethBling's Mar/IO program, which learns to play Mario Bros. His program is considerably better and more complex than mine, but it works on a similar concept. If you have not seen his video, the link is here: https://www.youtube.com/watch?v=qv6UVOQ0F44 This works by generating 100 random sequences of turning right, left, accelerating, and braking. It takes the two top performing sequences and creates 70 variations of those two combined (like how DNA is combined in breeding), and introduces 30 more random sequences. In theory, after enough time, this program should be able to play this game perfectly. It can also be interesting because if there is a bug that allows the car to drive through a wall or something like that, the AI may end up finding it and exploiting it. Note that, since the program is essentially using randomness to learn, it may take much longer than expected, or may take much shorter than expected. It might not even learn at all. In theory, however, it will *eventually* learn. Turbo mode works, but it will perform differently than on regular mode (turbo mode doesn't speed up the "time" variable). This is my second version of the program, with a better distance calculator and a better generation generator.