This application uses P5.js to simulate A* algorithm playing a game of snake. It isn't the most optimal AI because it doesn't think of ways to stay alive in the game but it interesting to see how it works to find the shortest path to the pellet.
Open the index.html file in chrome or firefox. Then the application should start running on its own.