JAVA | SWING |
---|
SnakeAI is a standard version of the game Snake equipped with sample algorithms that allow you to get the maximum score during the game.
The game interface allows you to track the current score, the average score obtained during all games and the number of games.
During each game it is possible to start coloring the snake depending on the obstacles that appear (C) and displaying snake vision (V)
- Yellow indicates that the snake is approaching one of the walls.
- Blue indicates the part of the snake near food
- The red color indicates that the snake's body is nearby.
- Use the S key to slow down the game.
- Use the F key to speed up the game.
This is the default game mode activated after pressing the P key. To restart the game it is necessary to press the spacebar. Use arrows to move the snake.
This game mode uses Hamiltonian path to get the maximum score. It is started by pressing the 1 key.
This game mode uses Hamiltonian path taking shortcuts when they are safe. It is started by pressing the 2 key.
In this game mode, the snake looks for food, and after finding it determines the optimal path. It is started by pressing the 3 key.
In the future, it is planned to expand the possibilities of the snake with search algorithms in order to determine the optimal path to food.