Install on my MacSpare adds “Chess vs. a tiny AI” as a plugin. Needs Spare 0.6.11 or later. No Spare yet? Download it →
Sign in to follow updates
Live previewOpen in new window

Games3–15 minMouse · Touch

Chess vs. a tiny AI

Chess against a few hundred lines of minimax

Use on desktopGet the desktop app

  1. 1Download the packZip, runs offline
  2. 2Open Spare desktopmacOS, same account
  3. 3Import the packOpens while AI generates

About

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.

How to play
Drag a white piece (hover shows legal squares); “New game” restarts; auto-saves
Controls
Mouse · Touch
Length
3–15 min

Changes and credits

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)

Discussion

    Similar worksGames

    See all