Teach the neural network how to play !
Play the game by yourself :
Play
Or create your Artificial Intelligence
- Create your neural network
- Configure the genetic algorithm
- Train your AI
Create an AI
Or get back to where you were Not yet implemented
Load your AI
Neural network
The network is composed of 3 layers : 1 input layer, 1 hidden layer and 1 output layer. The hidden layer connects inputs and outputs.
Total players Number of players trained simultaneously. Each player corresponds to a network initialized with different values.
Inputs What information about the game you give to the neural network (ie. what it can "see").
Neurons in hidden layer The hidden layer connects inputs and outputs.
More nodes means better results but also slower optimization and more CPU usage.
Outputs What controls over the game you give to the neural network (ie. what it can "do").
Keyboard
Keyboard input ↑
Keyboard input →
Keyboard input ↓
Keyboard input ←
Mouse
Mouse input X
Mouse input Y
Direct control accInstead of using controls, directly set player acceleration.
Set acceleration X
Set acceleration Y
Direct control speedInstead of using controls, directly set player speed. (Not yet implemented)
Set speed X
Set speed Y
Number of connections : 0Indicator of CPU usage.
Genetic algorithm
For each iteration, a selection will occur. The next batch of players will be composed
of the winners of last iteration and new players created by crossing them over. Mutations will also happen for a part of the population.
Fitness score At the end of the iteration, a score is computed, ranking all the players. Less fitting players will be eliminated.
- Distance to last objective (DLO) at the endThe closer the player is to the objective, the higher the score.
Number of objectives completed (NOC) at the end
NOC - DLO at the end
- Distance to center at the end
Minimum distance to center
Mean distance to enemy
Distance to enemy at the end
NOC + Distance to enemy at the end
- DLO + Distance to enemy at the end
NOC - DLO + Distance to enemy at the end
Winners What top percent of the population (winners) will we keep for next batch ?
Keep the best
Cross-over Cross-over consists of splitting 2 neural networks in 2 parts and exchanging those parts to create a new neural net.
Random cross-over the best
MutationsMutating consists of modifying the weights associated to random connections, scaling them by a random factor.
Mutate rate Percent chance of any connection to be modified.
0 -> No mutations
100 -> Every connection is mutated
Mutate factor Scaling of the connection modification.
1 -> very small change
100 -> very large change
Don't mutate top 0 -> mutate everything
100 -> mutate nothing
Options
Graphics
Only best player
Enemies
Effects
Game Over
Game-over on enemy contact
Game-over on out-of-bounds
Player controls
Friction Speed decreases over time and limits max speed.
Inertia Acceleration passed as input is spread over time.
Time
-
Iteration duration : 10 sec
+
Changes will happen at the end of current iteration
Dev mode (enable locked options)