Games · 3–15 min · Mouse · Touch

Chess vs. a tiny AI

Chess against a few hundred lines of minimax

ByLauri Hartikka

Open-source work, ported to the web by Spare · Apache-2.0

Download pack
Live preview · Chess vs. a tiny AIOpen in new window

Drag a white piece (hover shows legal squares); “New game” restarts; auto-saves

AboutWhat it is and how to play

The classic tutorial project: minimax with alpha-beta pruning and piece-square tables. You play White; the AI shows positions evaluated and time taken. Search depth 1–5.

DetailsSource and licence

Origin
Open-source work, ported to the web by Spare
Type
Games
Length
3–15 min
How to play
Drag a white piece (hover shows legal squares); “New game” restarts; auto-saves
Controls
Mouse · Touch
Licence
Apache-2.0
Source
github.com/lhartikk/simple-chess-ai★ 946 · as of 2026-09-25
Version
665606d
Changes
Added a localized title bar, status line and “New game” button, in-page messages instead of alert(), a narrow-screen board and Spare pause/snapshot hooks (PGN saves); AI and board code unchanged. Includes chessboard.js (MIT), chess.js (BSD-2), jQuery (MIT)
Attribution
simple-chess-ai © Lauri Hartikka, Apache License 2.0 — modified by Spare (see SPARE-CHANGES.md)

ScreenshotsClick one to view it above

Use on desktopOpens while your AI works

  1. 01Download the pack

    Zip, runs offline

  2. 02Open Spare desktop

    macOS, same account

  3. 03Import the pack

    Opens while AI generates

Get the desktop app

DiscussionSign in to join in

    More works

    From the same author or of the same kind.

    See all works
    Chess vs. a tiny AI · Chess against a few hundred lines of minimax