When
June 2026
Role
Solo project
Status
Playable, still improving
Stack
JavaScript, Web Workers, Flask, Python, HTML, CSS

Browser Chess AI

A chess app with an engine written in JavaScript that runs in a Web Worker, so the AI thinks in your browser without freezing the board.

Overview

A web chess app where you play against an engine running entirely in your browser. The search runs in a Web Worker, which keeps the board responsive while it thinks. Flask serves the app and records game statistics.

What I built

  • A JavaScript engine with alpha-beta search, iterative deepening, quiescence search, and a position cache
  • Adjustable search depth and time limits
  • An interactive board with legal-move highlighting, move history, and undo
  • Games saved in browser storage so a refresh doesn't end them
  • Live engine status and search statistics

Hard parts

Running a deep search on the main thread freezes the page. Moving the engine into a Web Worker fixed that, but the board and the engine then had to stay in sync through message passing, including when you undo or start a new game while the engine is still searching.

Where it stands

Playable. Next up: an optional neural-network evaluator and automated strength tests against the Python engine.