RawBoardFeatures
The raw board as 12 binary planes of 64 squares — no hand-crafted features at all.
This is the input contract of the private training pipeline's raw-board value net, whose premise is that a small MLP over the bare board has capacity a 9-feature GBDT lacks. Where OnnxFeatures / RichFeatures / KcpFeatures hand the model a summary of the position, this hands it the position.
Layout, which the Python side (board.py::encode_fen) must match bit for bit:
- planes
0..5are the '''mover's''' Pawn, Knight, Bishop, Rook, Queen, King, in dicechess.engine.domain.PieceType order; - planes
6..11are the opponent's, same order; - within a plane the index is the dicechess.engine.domain.Square index seen from the mover (
0= the mover's own a1 corner), so for Black the ranks are mirrored (rank 1 rank 8) while files are left alone; - a square holding a piece is
1.0f, everything else0.0f.
Both halves of that convention — own-pieces-first and rank mirroring — make the encoding mover-canonical: side to move stops being an input dimension, exactly as the own minus opponent convention does for the material features. The starting array is symmetric under this transform, so both colors encode it identically.
Unlike RichFeatures this needs '''no move generation'''. That does '''not''' make it cheaper, which is worth stating plainly because the opposite was assumed when this was written: extraction gets cheaper, but the model behind it does not. Measured on the one-ply arena over the same 400/1600-game harness, a raw-board net costs ~0.195 s/game against ~0.0375 s/game for a rich(9) GBDT — '''~5x more per evaluation''', because a 768-wide input through a 256x32 MLP outweighs the two generateAllMoves passes it saves. A 2-ply run at candidateLimit = 24 corroborates it: rich finishes 400 games in ~25 minutes, this did not finish in two hours.
So the reason to use this set is '''strength per evaluation''', not throughput: at one ply it scores 57.3% against the aggressive baseline where rich(9) scores 48.0%, while costing 1/253 of the kcp teacher's 60.8%. Anything that budgets leaf evaluations — a deeper search, or a bot under a clock — has to weigh that 5x.
Attributes
- Note
-
Dice-free by construction, like every other feature set here: it scores an afterstate whose next roll is unknown.
- Source
- RawBoardFeatures.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RawBoardFeatures.type