Skip to content

blakebollinger/SnakeAI-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

There is a detailed description over on my website!

Welcome to SnakeAI

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

How to Run:

  1. Download/Clone repo
  2. Open Main.playground in Xcode (Tested in v11.5)
  3. Compile (May take time because of Swift type-checking)
  4. Run

The repository includes:

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

Current High Score: 17

Todo:

  • Add more training data

See More:

Some of the neural network included in SnakeAI draws from SwiftAI. Check out their repo here

About

An AI built from the ground up to play snake

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages