Snake is a game created with Tkinter and Python. The objective of the game is to steer the snake towards the randomly placed food while avoiding running into the walls or any part of the snake. The game gets progressively more difficult as the snake grows because free space runs a path finding and decision making algorithm that plays the game automatically without user input. The autopilot algorithm consists of several components, including a path finding algorithm and a contiguous free space finding algorithm.
The blue square represents the snake's head and the green square represents the food. Gray segments represent the snake itself.
Running autopilot algorithm. Algorithm pathfinding mode and safety check mode are shown in the top right corner.
Autopilot algorithm visuals are shown. The green box represents the start of the pathfinding algorithm and the red box represents the destination. The blue circles show the explored free nodes. The grey circles show the frontier nodes that have not been explored yet.
Autopilot algorithm visuals can be enabled at any point by toggling the 'Visuals' button.
Similar version of the python game except it is programmed with VBA in Excel. Customized walls can be drawn and the algoirthm will avoid them.
Snake game in Excel.
Download the snake game Excel file.