Project Concept:

At SAE one module is dedicated to AI. We looked at classic AI and self learning / neural networks. In this project the AI needs to solve a track without touching the walls.

Classic attempt: Steering Behavior (editable)
Within the Steering Behavior, 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. (refer "Checkpoints Steering Behavior") Avoid can be used be used as well. 

Neural Network:

  • The simulation starts Gen 1 with 25 agents, are randomized.
  • Each agent has 5 sensors (refer screenshot "Sensor Neural Network").
  • 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. (refer "NN Checkpoints")

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.

For more information consider taking a look at this: towardsdatascience
My implementation would be a Deep Feed Forward Neural Network.
Neural Network Behavior:

  • 25 agents / generation
  • 6 best, are copied
  • 12 are new created with mixed data from the previous 6
  • The remaining agents are randomized

_________________________________

Checkpoints for Steering Behavior:

Checkpoints Classic

Sensor Neural Network:

Sensors Neural Network


Graph for fitness values

Graph for fitness

Each column represents a generation, hover over a point for value:

top is best, middle is average, bottom is worst


NN Checkpoints:

Checkpoints for neural network

StatusIn development
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorGamermusic4
GenreSimulation
Made withUnity
Tags3D, artificial-intelligence, neural-network, Unity
Average sessionA few seconds
LanguagesEnglish

Comments

Log in with itch.io to leave a comment.

(+1)

It is not so easy to understand the principle of this game well. There is no way to do without understanding the work of neural networks.

I haven't delved deeply into the essence of what is happening, but it seems cool.

(1 edit) (+1)

Hey there, thanks for your feedback and sorry for the late response.
Yes you're absolutely right, I will consider to add a better description how it works and how its implemented!

(+1)

After reading several books on AI for computer games, your game looks more understandable to me:)

Congratulations, you have created a wonderful demonstrator! It seems to me that it is significantly underestimated here.

I think it would be great to add different ways of combining behaviors, from simple linear combinations or a priority system to more advanced ones.

I noticed one problem - in my Google Chrome browser, the text label of the upper slider in the left settings panel is not visible.