Teach the neural network how to play !
Play the game by yourself :
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
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").
Self position X
Self position Y
Self speed X
Self speed Y
Self acceleration X
Self acceleration Y
Objective position X
Objective position Y
X-distance to objective
Y-distance to objective
Distance from objective
Enemy Not yet implemented
Enemy position X
Enemy position Y
X-distance to enemy
Y-distance to enemy
Distance from enemy
Distance from center
X-distance to center
Y-distance to center
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 input ↑
Keyboard input →
Keyboard input ↓
Keyboard input ←
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.
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.
Don't mutate top 0 -> mutate everything
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
100 -> mutate nothing
Only best player
Game-over on enemy contact
Game-over on out-of-bounds
Friction Speed decreases over time and limits max speed.
Inertia Acceleration passed as input is spread over time.
Iteration duration : 10 sec
Dev mode (enable locked options)