core/nn/lc0_input library
Chess FEN -> 112-plane LC0 input tensor.
Minimal encoder covering the current-position slice of LC0's classical input format (Chess1 / T1 layout, no history):
planes 0..5 white P, N, B, R, Q, K on the given side-to-move POV planes 6..11 black p, n, b, r, q, k plane 12 repetitions counter (zeroed here, no history) planes 13..103 history slots (7 more half-moves; zeroed) planes 104..107 castling rights (STM K, STM Q, opponent k, opponent q) plane 108 side to move (0 for white, 1 for black — flat plane) plane 109 rule-50 half-move counter / 99 plane 110 ply (0-based total half-move count, unused for demo) plane 111 all ones (constant)
LC0 mirrors the board so the side-to-move sits at the bottom rank. When it's black to move we flip vertically and swap colours.
Not implemented (returns a plausible but non-authoritative input for arbitrary mid-game positions): repetition detection, en-passant target square, move-history planes. For a real chess UI you would track those alongside the FEN.