Quickly made AI playing snake.
For now it changes the weights between the 6 input neurons and the 3 output neurons randomly (no hidden layers) and takes the parameters of the best snake with the highest score.
The input neurons are : (all booleans)
- Is there food left
- Is there food straight ahead
- Is there food right
- Is there an obstacle left
- Is there an obstacle straight ahead
- Is there an obstacle right
And the output neurons are
- Go left
- Go straight ahead
- Go right
- Add a proper genetic algorithm