Self Driving Car (Neural Network)
About
Project Concept:
At SAE one module is dedicated to AI. We looked at classic AI and self learning / neural networks.
Classic attempt: Steering Behaviour
Within the Steering behaviour, I have a bunch of types:
- Seek
- Steering directly to target
- Arrive
- Also steers directly to the target, but slows down if near the target
- Flee
- Reverse from seek, steers directly away from the target
- Pursue
- Follows the target, uses the targets velocity to seek its future position
- Evade
- Flees from the target, uses the targets velocity to flee from its future position
- Avoid
- Can be used together with all other functions
- Keeps distance to objects in a specified layer
In this project I used the arrive function together with manual placed checkpoints each track section. Avoid could also be activated.
Feedforward Neural Network:
- The simulation starts Gen 1 with 25 agents, are randomized.
- Each agent has 5 sensors (refer screenshot for layout of sensors).
- These are the inputs for the neural network.
- The outputs are the acceleration and the steering.
- Fitness
- Is calculated with checkpoints and the distance a agent covered.
If at least on agent succeeded one lab, the track is flipped and the same generation is started again. If all agents are failing, the track is flipped back and the next gen is created. Else if an agent again succeeds the lab. The simulation is successful.
Edge data:
- 25 agents / generation
- 6 best, are copied
- 12 are new created with mixed data from the previous 6
- Rest is randomized
_________________________________
Checkpoints Classic KI:
Sensor Neural Network:
Graph for fitness values
Each column represents a generation, hover over a point for value:
top is best, middle is average, bottom is worst
Checkpoints for neural network: