Skip to content

[Rebuild] Snake Remake ๐Ÿ is an upgraded edition of my past project, 'Unconventional Snake Xenia.' It's an AI-driven snake game featuring a custom neural network. ๐Ÿง  The menu-driven interface offers visualizations of different pathfinding algorithms! ๐ŸŽฎ

Notifications You must be signed in to change notification settings

dresta-V/Snake-Remake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ AI-Driven Snake Game

Welcome to the AI-Driven Snake Game! This project is a modern take on the classic Snake game, enhanced with artificial intelligence. Choose from various AI algorithms like A*, BFS, DFS, and Genetic Algorithm to see how they control the snake's movements toward its prey.

๐Ÿ“œ Table of Contents

๐ŸŒŸ Overview

This project leverages AI to control the snake in a grid-based environment. It provides a comparative analysis of different pathfinding and decision-making algorithms, visualizing their effectiveness in real-time.

๐Ÿš€ Features

  • Neural Network Control: Trained neural network to manage snake movements.
  • Preset Algorithms: Implementations of A*, BFS, DFS, and Genetic Algorithm.
  • Menu Interface: Graphical menu to select and switch between algorithms.
  • Path Visualization: Real-time path highlighting to understand algorithm workings.
  • Comparative Analysis: Compare different AI strategies in action.

๐Ÿ› ๏ธ Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/snake-remake.git
    cd snake-remake
  2. Install dependencies:

    pip install pygame
  3. Set up the project: Run the setup script to configure the project environment.

    python setup.py

โ–ถ๏ธ Running the Game

To start the game, run the main.py script:

python main.py

๐Ÿ•น๏ธ Usage

  1. Menu Navigation: Use the keyboard or mouse to navigate through the menu.
  2. Select Algorithm: Choose an algorithm to control the snake.
  3. Gameplay: Observe the snake's behavior and path as it approaches its prey.
  4. Comparative Analysis: Switch between different algorithms to compare their performance.

โš™๏ธ Configuration

Modify the configuration settings in src/config/Constants.py:

  • Grid size and dimensions
  • Initial snake speed and length
  • Colors (snake color, prey color, background color)
  • Key bindings

๐Ÿง  AI Algorithms

Preset Directory:

  • A_STAR.py: Implementation of the A* pathfinding algorithm.
  • BFS.py: Implementation of the Breadth-First Search algorithm.
  • DFS.py: Implementation of the Depth-First Search algorithm.
  • GA.py: Implementation of the Genetic Algorithm.

AI Directory:

  • algorithm.py: General AI algorithms and utility functions.
  • neural_network.py: Neural network implementations for AI-based control.

๐Ÿค Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

๐Ÿ“ฌ Contact

For any questions or suggestions, feel free to reach out:


Feel free to reach out if you have any questions or need further assistance!

About

[Rebuild] Snake Remake ๐Ÿ is an upgraded edition of my past project, 'Unconventional Snake Xenia.' It's an AI-driven snake game featuring a custom neural network. ๐Ÿง  The menu-driven interface offers visualizations of different pathfinding algorithms! ๐ŸŽฎ

Topics

Resources

Stars

Watchers

Forks

Languages