Score: 0
Fouls: 0
Steps: 0
Instructions
  • Use arrow keys to move the Snake
  • Press Space at any time to pause the game
  • On Touch systems swipe the screen to control movement
  • Help Snake fetch the food and score higher!
  • You can automate the snake to catch food by itself
  • The game is based on the idea: The Fetcher
  • Intelli Snake is an efficient version of: Previous Version

Fouls
A foul is commited when the Snake
  • eats itself
  • hits the wall (collision needs to be enabled)
  • fails to catch food in 60 steps

Automation
Two options are available for automation

  • Fast Automation
    • Snake moves faster than regular
    • An Asynchronous Http request is sent which returns the next 50 steps
    • Snake then moves through the loaded steps, meanwhile more requests are sent for more steps
    • Snake moves and requests are sent in parallel

  • Automate
    • Snake moves at regular speed
    • At each step a synchronous Http request is sent which returns with the next step
    • Snake waits for a request at each step



AI behind Automation
  • For automation we have 2 models built on Deep Neural Networks and Convolutianl Neural Networks
  • Both the models are based on keras API, using tensorflow, implementing Functional API and Sequential models.
  • The models return an array of directions sorted by preference
  • Snake then uses the first direction with most preference
  • If the first preferred direction doestnot help, snake uses the next preference
  • Since the Random Model has lesser accuracy, you'll find it commiting more fouls

  • Fixed Model [Accuracy: 99.72%]
    • It takes 2 inputs
      • Possition of snake and food
      • Available directions
    • It is based on Functional API and Sequential Models
    • Deep Neural Networks are involved

  • Random Model [Accuracy: 94.59%]
    • It takes 3 inputs
      • Image of the Map
      • Possition of snake and food
      • Available directions
    • Deep Neural Networks, along with Convolutianl Neural Networks are involved
    • It is based on Functional API, Sequential Model and Transfer Model (using Fixed Model as base)
    • Input 2 and Input 3 are transferred to Fixed Model, the output is then used with Input 1 by Sequential Models and Functional API which then generate a final output


To see the summary of models and the complete back end
visit: Github Repository