Skip to content

afrahshah/snake-rl

Repository files navigation

Snake AI with Reinforcement Learning

This project involves training a reinforcement learning agent to play the Snake game. The agent uses a Deep Q-Network (DQN) to learn optimal strategies and improve its performance over time.

Project Demonstration

Project Structure

  • game.py: Contains the implementation of the Snake game, including the game logic and rendering.
  • helper.py: Includes helper functions, such as plotting results.
  • model.py: Defines the neural network architecture for the Q-Network and the QTrainer class for training.
  • agent.py: Implements the reinforcement learning agent, including methods for training, saving, and loading the model.
  • arial.ttf: A font file used for rendering text in the game.

Installation

  1. Clone the Repository:
    git clone https://github.com/yourusername/snake-ai.git
    cd snake-ai

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages