Make your first move. Your move and Stockfish's reply will each add a box below.
-
You / playerWaiting
Select a piece to begin.
-
Tool / chess.jsNext
Checks the move against the rules and updates the position.
-
AI / local searchNext
Stockfish explores replies; its neural network evaluates positions.
- Depth
- —
- Nodes
- —
- Time
- —
Candidate line appears during search.
-
Tool / chess.jsNext
Checks the engine's reply before it reaches the board.
-
AI / played moveNext
The reply appears here. Then it is your turn again.
Your move starts the loop.
Score sheet
No moves yet.
Under the hood
A Web Worker searches off the main UI thread. UCI is the text protocol used to talk to the engine.
No search sent yet.
Depth counts half-moves (plies), not the whole tree. Nodes are search visits, not unique positions. The candidate line is a forecast, not moves already played. Skill 5 may choose a weaker move than the top line.
This is a chess engine with a neural evaluator, not an LLM or a chat-agent tool loop.
If a language model played Black
Illustrative. Stockfish has no context window and reads none of this. This is what a harness would send a language model for the latest turn, built from the real game and engine output. Tokens ≈ characters ÷ 4.
Make a move to see the context an agent would receive.
This context
Resend everything
The rules this harness follows
- Pin the instructions and tool definitions; they never change.
- Replace history with state: one FEN line restores the whole board.
- Window the last 6 plies verbatim, for intent and repetition.
- Summarize older moves into a sentence of facts.
- Drop stale tool results once the position reflects them.
- Verify the answer with chess.js before it touches the board.
Budget: 512 tokens, kept small so the trade-offs show early.