app/handicap.h¶
material-odds (“piece odds”) game setup.
A far more honest way to make a strong engine beatable than making it play badly: a weakened engine that hangs a rook feels broken; queen odds feels like a real game (docs/BACKLOG.md §2, “Odds / handicap games”). The engine spots the human a piece by simply not having it on the board from move one.
This is “nearly free” because the board already knows how to start a game from a known, non-standard identity snapshot — that is exactly what review’s “play from
here” does (review-docs PLAN §6.5). An odds game is just that snapshot: the standard start with one of the engine’s pieces sitting in its storage slot. So:
the engine plays a real starting position that is a piece down (startFen),
the physical board routes captures correctly and takeback still works, because identity is fully known (startIdentity, not merely a FEN — a FEN alone gives up identity, and with it takeback; see game_session.cpp).
Pure and hardware-free: no gantry, no serial, fully unit-testable.
-
namespace kirin