Ai dots

Press [Space] to start and stop the simulation.

This is an experiment with a simple AI that works like natural selection. The goal for the dots is to reach the big red dot and reproduce itself for the next round/generation. The green dot is the one that has done the best in the last generation.

How it works:

In the first generation of dots, each dot generates a random set of directions. Then they move according to its own set. Those that end up closer to the big red dot, get a higher score. When it is time to make a new generation, the dots with a higher score also has a higher chance of "reproducing". When a dot "reproduces" itself, it creates a clone based on its set of directions. This new dot then gets mutated a bit so that some of the directions are replaced with a new random direction. This continues to repeat, and in the end they will find their way to big red dot.

Heavily inspired by this video.