Loading…

What Am I seeing?

AI characters being taught how to avoid obstacles over time. They are evolved by a genetic algorithm that selects the AIs that travel the furthest. They must travel over unique ground, they cannot double back or turn in circles to accumulate fitness. Characters that collide with obstacles are “dead” for the current generation.

The rays being fired out are a series of “feelers.” The distance to each hit is used as a network input, in essence giving the character a map of its surroundings. If there is no hit, the length of the feeler is used instead, which indicates any obsctacle must be too far away to see.

They usually evolve to be effective after 30-50 generations.

To illustrate this better, look at this debug screenshot where feeler lengths vary amongst characters:

Debug screenshot of AI characters

The dynamic scale of the feelers allows for better navigation and fitting through tight spots. You can also see a couple ineffective characters in the center, they’ve evolved themselves into a rut and end up turning in circles. After enough generations, most of them will have been selected out.

Network Inputs:

Network Outputs:

Controls