Inspiration
My goal was to explore graphs and algorithms that can be applied to an animated, classic game. It was an opportunity to learn about these algorithms and do testing in regards to their performance.
What it does
Moves the snake's head across the board to eat the red dots, simulating the classic game of snake. The game is won when the entire board is filled with the snake's body and no collisions occurred with the body of the snake or the edges of the board. The algorithms I implemented included Depth-First Search (DFS), Breadth-First Search (BFS), a modified BFS, and finally Hamilton.
How I built it
Used python with pygame as the interface platform to create not only the regular game of snake but also an AI solver.
Challenges I ran into
All the AI testing took nearly 2 days to complete, making the testing phase very time intensive.
Accomplishments that I'm proud of
Algorithms I implemented using graphs, queues, stacks, and arrays.
What I learned
Testing needs to be done in smaller chunks and with higher inflated speeds since some of my algorithms ran for 5 hours straight, such as Hamilton, since it has the ability to win the game and I had a large data set to test on.
What's next for Magni's Adventure
Exploring DNN-Deep Neural Net -for a more optimized solution to the snake game.


Log in or sign up for Devpost to join the conversation.