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:
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.
- The distance-to-hit of each of 9 feeler rays
- The current speed
- A scale value for the length of the feelers
- A new direction, expressed in radians
- A new speed
- A new feeler length
- Train from beginning: Start training from generation 1, with random network weights
- Save this generation: Save the current generation’s genomes
- Load saved generation: Load the previously saved generation and continue
- Timescale: As its name implies