AI Snake Game - Reinforcement Learning

Mode: Training View Pre-trained Demo

Episode: 0

Score: 0

Epsilon: 1.0

Food Eaten: 0

How it Works: Reinforcement Learning in Snake

This AI Snake game uses a technique called reinforcement learning to teach the AI how to play. Here's a simple breakdown of how it works:

  1. The Environment: The game board, snake, and food make up the environment.
  2. The Agent: The AI controlling the snake is the agent.
  3. States: The current position of the snake, food, and obstacles represent the state.
  4. Actions: The agent can move up, down, left, or right.
  5. Rewards: The agent gets positive rewards for eating food and negative rewards for hitting walls or itself.

The AI learns by trying different actions and observing the rewards. Over time, it learns to make better decisions to maximize its reward (score).

Key Concepts:

As you watch the AI train, you'll see it gradually improve its performance, learning to avoid walls, chase food more efficiently, and achieve higher scores!