Engine Analysis
How Grebe, the engine built into BackgammonDB, evaluates a decision the file never scored, or a whole match in one click — what appears on its own, what a click keeps, and how a match gets its PR.
A match file from eXtreme Gammon or GNU Backgammon already carries every candidate, equity, and luck figure the analyzer computed, and BackgammonDB shows those as they are. A .mat or .txt file carries nothing, and an XG or GNU file can hold decisions the analyzer skipped. For those, the review screen asks Grebe, BackgammonDB's own engine, which runs in your browser, and shows the answer in the same candidate strip. The first time a page needs Grebe, your browser downloads it, about 8 MB, and keeps it for later visits. If your device cannot run Grebe, or an answer from it fails, GNU Backgammon, running on our server, answers instead.
Grebe's work stays in your browser. Two kinds of request go to our server: an opening position, which is looked up in the opening book, and a position that GNU Backgammon answers in Grebe's place. Each carries the position and its match context — the board, the dice, the cube, the score, and the move played. Nothing else leaves your browser: not the match file, not the rest of your library, not your notes. The one exception is a whole-match analysis that runs on our server (below), which sends the moves of that match and both player names for that one analysis.
What you see on an unanalyzed decision
Land on a decision the file never scored and the candidate strip shows a placeholder in its own layout. Once the cursor rests on the action for a moment, a Quick evaluation replaces it: the ranked candidates, their equities, and the win-chance breakdown, exactly as an analyzed decision reads. Nothing was clicked, and nothing was written — this ambient result is for the current session only. Step away and back and it is fetched again.
The engine bar
Above the candidate list sits the engine bar: a badge naming the quality of the result on screen, and the tier chips beside it.
| Badge | Meaning | Hover for |
|---|---|---|
| ◔ Quick | the fast answer — the ambient default | the engine that answered: Grebe, or GNU Backgammon |
| ◑ Smart | the deeper answer | the engine that answered: Grebe, or GNU Backgammon |
| ⚡ Book | an opening position answered from the precomputed opening book | Opening book · precomputed gnubg 3-ply |
The chips' tooltips name the engine that would answer them, too. The tiers are named rather than numbered, because engines count plies differently: GNU Backgammon's 2-ply is close to what XG calls 3-ply.
A Book result has no chips at all. The opening book already holds the deepest answer the engine can give, so there is no deeper tier to ask for.
Keeping a result
Click Quick or Smart in the engine bar and the result is written onto the stored match. From then on it behaves like analysis that came with the file:
- the action list shows the error marker and the equity loss for that decision,
- the played move's arrow is colored by the size of the error,
- the positions browser and the stat sheets include it,
- and it survives a reload — every reader of that match sees it.
A deeper result upgrades a stored one in place; a shallower result never downgrades it. Click Smart on a decision that already holds a Quick result and the Smart numbers replace it. Click Quick on a decision that already holds Smart and the display follows your click for this session, but the stored record keeps Smart.
Whatever you click, the display follows the click on the current action. Step away and back and the best-known result shows.
Analyzing the whole match
A match that carries no analysis — a .mat or .txt import — can be analyzed as a whole. Each time such a match opens in review, a dialog asks Analyze this match? It shows one button per depth on offer, Quick and Smart. Each button shows a rough time for this match on your device, such as under 10 seconds or about 1 minute. A click on a button starts the analysis at that depth. Not now closes the dialog until the next time the match opens. The same buttons sit in Match details (click the scoreline). For a match this analysis already covered at Quick, the one button reads Re-analyze at Smart. The time is a rough guide: Smart on a phone takes several times longer than on a desktop.
Grebe evaluates every decision at the chosen depth, in your browser. Only the opening positions go to our server, to look them up in the opening book; nothing else leaves your browser. The dialog says which engine will run before you start.
If your device cannot run Grebe, or Grebe stops part way, GNU Backgammon on our server analyzes the match instead, from the start. That analysis sends the moves of the match and both player names to our server, one game at a time. This is the one exception to the single-position rule above. The server returns the analysis and keeps no copy of the match.
When the server's engine cannot read a match — the file serialized into a form GNU Backgammon rejects, or an answer that does not line up with the moves — the dialog says so and offers Send this match to us in place of Try again, because a retry would fail the same way. Nothing is sent until you press Send in the dialog that follows. The report holds the match as sent to the engine (both player names and every move), the fault, the app and engine versions, and your original file if you choose to attach it, plus your email address and a note if you give them. Try again still appears when the engine is busy or unreachable, where a retry can work.
While it runs, the dialog stays open and shows a progress bar counting the games. Keep reviewing hides it: the sweep continues, the button in Match details counts the games meanwhile, and the dialog returns on its own when the sweep finishes. It then shows each player's PR with its level and the checker and cube PR split, and offers two exits: View full match analysis opens the match stats sheet, and Review match returns to the board. Every decision now carries a Quick result (or Smart, if that was the choice), the opening decisions carry the Book answer at 3-ply, the error markers and colored arrows appear in the action list, and the header names the engine and the tier: Analyzed by Grebe (Quick), or Analyzed by GNU Backgammon (1-ply) when the server ran it. A decision you had already evaluated by hand at Smart keeps its Smart result; the whole-match pass never replaces a deeper stored result with a shallower one.
Why the match still has no PR
A match no engine has analyzed as a whole keeps a PR of "—" — in the match header, the library list, the dashboard, library statistics, and the match stats sheet — however many positions you evaluate by hand. The error counts and the equity-lost figures still show, because they are true of the decisions that were evaluated. A PR built from a handful of hand-picked positions would not be: the positions you chose to evaluate are, by definition, not a fair sample of the match. Analyze the whole match and the PR appears.
Files that already carry analysis
On a decision the file scored, the file's numbers win and the engine bar does not appear. There is nothing to evaluate: you are looking at eXtreme Gammon's or GNU Backgammon's own result, at whatever depth the file recorded, and BackgammonDB never replaces it. To try our engine against the file's numbers, hand the position to the analyzer (below), where both sit side by side.
When the engine is unavailable
Once Grebe has downloaded, it answers without a connection: only the opening book needs one, and Grebe answers an opening position when the book cannot. If neither Grebe nor the server can answer — before Grebe has downloaded, with no connection — the strip shows Analysis unavailable with a Retry chip in place of the ambient result. An explicit chip click that fails shows a short error message instead. The match itself is unaffected — the file's own analysis is stored in your browser and does not depend on the engine.
Open in the analyzer
The pencil chip in the action row under the candidate list — Open this position in the analyzer — carries the position, its match context, and whatever analysis is on screen to Create a Position. There you can move checkers, change the dice or the score, and watch the evaluation follow. A position from an analyzed match arrives with the file's own numbers already showing, badged as the file's. A position from a match our engine analyzed arrives badged with its tier — Quick, or Book for an opening decision.