Menu

How I Built a Free Chess Engine That Runs Entirely in Your Browser
📰

How I Built a Free Chess Engine That Runs Entirely in Your Browser

#hackernoon#technology#engine#move#chess
Reading 0:00
15s threshold

Most "find the best chess move" websites work the same way: you send a position to their server, an engine analyses it there, and they pay for every second of CPU. That's why so many of them cap free analysis per day or fill the page with ads.

When I built Chess Move Finder , I went the other way. Stockfish 17.1 runs entirely in the user's browser. The server only serves static files. Analysis costs me nothing per user, so the tool can stay free with no account, no ads and no daily limit.

Here's how it works and the tradeoffs I ran into.

The stack

Next.js (App Router) for the site, tools, blog and translated pages

Stockfish 17.1, compiled to WebAssembly , using the lite, single-threaded build

The engine runs in a Web Worker , so the board and UI never freeze while it thinks

Why the "lite single-threaded" build

Stockfish's WebAssembly builds come in a few flavours, and the choice matters more than I expected.

Multi-threaded builds need SharedArrayBuffer.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.