// Raspberry Pi · RGB LED Matrix · Chess

CHESS101

A real, physical chess board built on a Raspberry Pi. 32×32 RGB LEDs. 64 magnetic reed switches. Alpha-beta AI. LAN and internet multiplayer with a live browser spectator.

Scroll

// What is Chess101

A chess board that lights up when it thinks.

Chess101 is a fully playable chess board where every square is a 4×4 block of individually addressable RGB LEDs on a 32×32 matrix. Pieces glow in your chosen team color, valid moves pulse with light, and the AI animates its search in real time.

Eight Arduinos connected via I2C read magnetic reed switches under every square. The Raspberry Pi knows exactly where every piece sits — no cameras, no computer vision, just magnets and math.

A Mac simulator reuses the exact same rendering code via a Pygame window, so you can develop and play without any Pi hardware at all.

32×32 LED Matrix
8 Arduinos
64 Reed Switches
8 Team Colors
AI Alpha-Beta
Games Played

// Features

Everything you'd expect.
And then some.

Full chess rules, beautiful LED animations, a real AI opponent, and internet play — on a board you can hold in your hands.

Full Chess Rules
En passant, castling, promotion, fifty-move rule, threefold repetition, check, stalemate — every edge case handled.
🧠
Alpha-Beta AI
Minimax tree search with alpha-beta pruning. Animates candidate moves on the board as it thinks. Plays to win.
RGB LED Display
1,024 individually addressable LEDs. Pieces pulse in team color, targets glow, and end-game animations fill the board.
LAN Multiplayer
Host/join over your local network. UDP beacon auto-discovers the host — no IP address required.
🌐
Internet Play
Relay server at chess101.net. 6-character room codes, reconnection tokens, and server-side move validation.
👁
Browser Spectator
Watch any internet game live from any browser. No install needed — just visit /spectate and enter the room code.

// Stack

Real hardware.
Pure Python.

The game logic runs identically on the Pi and on Mac. Only the hardware abstraction layer swaps out.

Python 3 Pygame Raspberry Pi rpi-rgb-led-matrix Arduino / I2C Reed Switches WebSockets asyncio Alpha-Beta Pruning Docker Nginx mypy pytest
# Hardware layer (Pi only)
rgbmatrix      32×32 LED matrix  (1,024 RGB pixels)
smbus / I2C    8 Arduinos    64 reed switches

# Game logic (runs on Pi and Mac — identical code)
Board          color_picker    war_games    do_turn    declare_victory
Piece          Pawn · Rook · Bishop · Knight · Queen · King
AlphaBeta      minimax tree search with alpha-beta pruning

# Mac simulator  (hardware-mock layer)
FakeRGBMatrix  pygame.Surface   (injected via sys.modules)
SimSensor      mouse clicks replace reed switches

# Network layer
GameServer / GameClient   asyncio WebSocket  (LAN)
RelayClient               wss://chess101.net  (internet)
RoomValidator             server-side move legality check
BeaconBroadcaster         UDP auto-discovery  (LAN)

// How to Play

Pick your mode.

Run the simulator on Mac — no Pi required. Or deploy to a Pi for the full physical experience.

Local Game
python run_simulator.py --local
Play on one machine. Two humans or Human vs AI. Choose colors, choose sides, play.
LAN — Host
python run_simulator.py --host
Bind a WebSocket server on your LAN. Broadcasts a UDP beacon so your opponent finds you automatically.
LAN — Join
python run_simulator.py --join
Auto-discover any host on your network, or pass an IP explicitly. Spectators welcome.
Internet — Host
python run_simulator.py --online-host
Create a room on chess101.net. Share the 6-character code. Reconnection tokens survive drops.
Internet — Join
python run_simulator.py --online-join CODE
Enter the code your opponent shared. The relay forwards moves. The server validates every one.
Browser Spectator
chess101.net/spectator.html
Watch any internet game live from your browser. No installation — just a room code.
Browser Simulator
Play the full simulator in your browser — same LED aesthetic, same AI, same phase flow. No install. Works offline.

Open source.
Build your own.

Full source on GitHub. Dive into the hardware schematics, Pi setup, and the complete Python codebase.