There is a detailed description over on my website!
Snake AI is a swift playground that contains a neural network built to play the classic game Snake
The neural network has no dependencies and is built in pure Swift 5 for fast and efficient training and inferencing. Can be trained AT RUNTIME in <1sec
- Download/Clone repo
- Open Main.playground in Xcode (Tested in v11.5)
- Compile (May take time because of Swift type-checking)
- Run
A swift playground with the core Snake functionality
A custom 5x100x100x4 neural network that is trained at runtime
~30 mins of generated Snake gameplay as training data
- Add more training data
Some of the neural network included in SnakeAI draws from SwiftAI. Check out their repo here