TURBOWARP LINK: https://turbowarp.org/878645298?fps=250&interpolate&clones=Infinity&turbo HOW TO USE: Evolutionary AI is quite slow. The AI IS learning, but it doesn’t make much progress during the first few generations. Turbo mode speeds things up. If you want the AI to learn quick, I recommend choosing levels 1, 3, or 5. If you really want to test the AI, I recommend choosing 2 or 4. As said, this sometimes takes a long time, so I suggest leaving the project on and doing something else for a while. 2 and 4 take an especially long time—more than an hour.
WHAT AM I LOOKING AT? You’re watching evolutionary AI learn to play a platform game! The AI isn’t very smart initially, but it learns over time. Be patient. The yellow player is the best player from the previous generation. HOW DOES IT WORK? If you are familiar with the concept of Natural Selection, then this will make a lot of sense. Initially, the program assigns each player a random set of instructions; it has no prior knowledge of the level or how to complete it. The players might not complete the level the first time; if they do, it’s by random chance. The second generation is not random, but consists of duplications and “mutations” of the previous generation. In this case there are ten exact copies and ten mutated copies. The exact copies are copies of the top ten algorithms from the previous generation, while the mutations are copies of the the top ten, but with a few random alterations (~5% of the instructions are changed). I have color-coded these in the project, with the exact copies being green and yellow, and the mutations being blue. Saving copies from the last generation allows the AI to preserve what it has learned, and with the mutations there is a chance that a better algorithm will be found. After the second generation, the process repeats. The top 10 algorithms are saved, duplicated, and mutated, cycling over and over until the optimal solution is found. HOW DOES THE AI KNOW WHICH ALGORITHM IS THE BEST? This is where the “fitness” comes into play. When training evolutionary AI, you need to define a value so that the algorithm-generator can decide what works and what doesn’t. In this case, the fitness is based off of how close the player got to the flag, how long it took the player to get to its closest point, and whether or not it fell into the void. There is also a significant increase in the fitness if a player touches the flag. The AI uses the fitness to sort the algorithms by effectiveness, whereupon it uses this information as described above. “EVEN BETTER”? BETTER THAN WHAT? Here’s my original AI project, if you’re curious: TAGS (ignore):