Info

chess_cache stores Stockfish analysis in a SQLite database and serves it back instead of recomputing it. The explore page walks through positions and shows whatever analysis is already stored for them, or queues an analysis when there is none yet.

Moving around the board

  • Drag a piece to the target square to make a move. Illegal moves are cancelled automatically.
  • Promoting a pawn opens a piece-selection dialog automatically.
  • The left button belongs to the pieces and leaves no mark, except while the annotate tool is on, which suspends piece moves entirely. Rings and arrows are described under annotations.
  • Click a move in the move list beside the board to jump back to the position after it. The moves that follow stay in the list, so you can jump forward again.
  • Drag the handle at the board's bottom right corner to resize it. The size is remembered on this device.

Buttons

All of them sit in the row under the board.

flip
Flips the board orientation, swapping which side sits at the bottom.
undo
Undoes the last move.
reset
Returns to the starting position, or to the position the epd URL parameter set.
refresh
Asks the server for this position's evaluation again. Nothing polls it, so a position analysed while you are looking at it shows its result here.
copy
Copies the position's FEN to the clipboard.
analyze
Queues the current position for analysis. If it has already been analysed deep enough, nothing happens.
upload
Opens the PGN upload dialog, described under filling the cache.
import
Opens the Lichess import dialog, described under filling the cache.

The last three queue work for the analysis engine, so they appear only once you are logged in as an operator.

Annotating a position

The board carries nothing but what you put on it. Every arrow and every ring is yours; the analysis draws none of its own, so a board with three arrows on it means you drew three arrows.

There is one rule. You choose a square, and the second square decides what you meant: the same square again is a ring, a different one is an arrow between the two. Drawing something that is already there in the same colour clears it, and in another colour recolours it.

That rule is reached two ways, and they do the same thing:

annotate
The button above the notes box. While it is on, click a square and then a second square; the square you picked first is framed until the second click decides what it becomes. The tool stays on until you turn it off, and while it is on the board takes no piece moves, so the pieces are safe from a stray click. Turning it off, or moving to another position, drops a half-finished pick. Works with any pointing device.
right-drag
Press the right button on a square and release it on the second one, with no tool to turn on first. Needs a device that can hold its second button down while moving, which rules out most touchpads.

The five chips above the notes box choose the colour the next ring or arrow is drawn in. What is already on the board keeps the colour it was drawn in. The colour is a tool setting rather than part of the position, so a reload starts on red again, and so does the annotate button.

The notes box takes free text about the position in front of you and saves as you type. Notes, rings and arrows all save against the position rather than against the game, so walking a line back and forth brings each one back with the position it was made on, and a position reached by a different move order counts as the same position since the key ignores the move number.

All of it is stored in your own browser and never reaches the server, so it does not follow you to another machine, and clearing site data clears it.

Reading a result row

Every row in the analysis list has the same three parts:

depth
The Stockfish search depth. Higher is more trustworthy.
score
The centipawn score from White's point of view, so positive favours White and negative favours Black whichever side is to move. A forced mate shows as # when White mates and #- when Black mates. The /eval API answers in the other frame, the side to move's, and the page flips it when Black is to move.
pv
The principal variation, the best sequence of moves according to the analysis.

Clicking a move inside a pv plays the line up to that move on the board. A list belongs to the position it was loaded for, so once the board has moved on the click is refused; the list for the new position takes its place as soon as that analysis arrives.

The three groups of rows

Rows arrive in three groups, and the group a row sits in says where its numbers come from:

actual
The position in front of you, analysed in its own right. At most one row, and the only one that is about this position rather than about a move out of it.
alternative
Other legal moves whose resulting position has been analysed. Real analysis, one move away.
reconstruct
Moves that have never been analysed themselves, valued from an analysed reply below them. An informed guess at what the move is worth, and the weakest of the three.

Ranking happens inside a group, never across groups: the same depth means something different in each, so the rows are only comparable with the others alongside them. Within a group the deepest analysis comes first, and equal depths are ordered best-first for the side to move, which means the White-relative scores on this page ascend when Black is to move.

A horizontal line marks where the reconstructed rows begin. The first two groups run together above it, since the position's own analysis is followed straight away by the moves out of it.

An empty actual group still shows a - above the line rather than disappearing, because "this position has not been analysed, only moves out of it" is itself worth reading. An empty reconstruct group simply goes away, line and all. All three empty means nothing has been analysed here at all, and the whole list is a single -. Press analyze to queue it.

The lichess tab

The analysis list has two tabs above it. Cached is this server's own analysis, everything described so far. Lichess is a second opinion on the same position, read from the public Lichess evaluation dump. Its rows have the same three parts and the same click-to-play behaviour, so the tab is a switch between two readings of one position rather than a different screen.

One thing reads differently under the lichess tab: the depth varies from row to row, each move being kept at the greatest depth that considered it. Ranking is the same as elsewhere, deepest first and equal depths best-first.

The tab greys out whenever the dump has nothing for the position, which is most positions once a game leaves the opening, and on a server with no store built it is never available at all. Which monthly release the dump comes from is on the stats page, since every dump carries the same file name and only the download date tells them apart.

Filling the cache

The upload button opens a dialog with a file picker. Every position along the mainline is added to the analysis queue, up to the point the game reaches endgame territory, stalemate, or mate. A position that recurs across games climbs the queue, so the lines you play most are analysed first. Good for building a cache out of a collection of games.

The import button takes a Lichess username instead. The server downloads that player's rated rapid and classical standard games from the public Lichess API and queues their opening positions. The download runs as a background job, so the request returns immediately and there is no progress bar. A large account may take a while to finish feeding the queue.