OpeningBook
dicechess.engine.search.OpeningBook
object OpeningBook
The opening-book key contract shared between the engine (the consumer, via OpeningBookBot) and the analytics exporter (the producer, dicechess-analytics).
A key identifies a position together with its dice roll and is built as:
<piece-placement> <active-color> <castling> <en-passant> <dice>
- The first four fields are the canonical normalized FEN from dicechess.engine.movegen.Dfen.normalizedFen — byte-for-byte the analytics
normalized_fen. The half-move and full-move clocks are deliberately omitted: an opening book is independent of the move counters, and dropping them lets concrete positions that differ only by clock share a single book entry. The en-passant field is canonicalised (kept only when actually capturable) so positions that differ only by an uncapturable en-passant target — common when a Dice Chess turn double-pushes mid-turn — share one entry. - `` is the rolled piece letters (
p n b r q k), sorted ascending and cased by the side to move — upper-case for White, lower-case for Black. This is identical to the analyticsdice_sortedcolumn. Example for White rolling bishop + pawn + rook:BPR.
The value mapped to a key is the chosen continuation as a comma-separated list of long-algebraic micro-moves (e.g. "e2e4,f1c4", with a promotion suffix such as "e7e8q" where applicable). OpeningBookBot matches it against the legal turn paths by move multiset, so the stored order is not significant.
Example key: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - BPR
Any change to this format is a cross-repository breaking change and must be mirrored in the analytics exporter and its round-trip test.
Attributes
- Source
- OpeningBook.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
OpeningBook.type
Members list
In this article