Reinforcement Learning Snake Game

Watch as the AI learns to play Snake through Q-learning!

Speed: 10x
Current Episode
0
High Score
0
Average Score
0
Steps to Food
0
Learning Rate (α)
0.1
Exploration Rate (ε)
0.3
Learning Process

The AI is using Q-learning, a model-free reinforcement learning algorithm. It learns by:

  1. Observing the current state (snake position, food position, body positions, danger directions)
  2. Choosing an action (forward, left, right) based on ε-greedy policy
  3. Receiving a reward (eating food faster gives higher rewards)
  4. Updating its Q-table (state-action values)

Watch as the Q-values update and exploration rate decreases over time!

Current State & Action
State:
Waiting to start...
Action: -
Reward: 0
Snake Body Map
Learning Log