♟ chess-codes
Chess position analysis with the Risk metric
Install
$
curl -sL get.chess.codes | sh
Endgame Puzzle: Find the Brilliant Move
$ chess-codes --depth 20 --fen "8/2p5/8/2pPk2p/8/3K2P1/6P1/8 b"
Risk: 0.99 (Critical)
Score Drop: 96 cp (wrong move = draw or loss)
Stockfish thinks: Kd5 (+7.15)
Second best: Kd6 (+6.19)
Third best: c6 (+5.50)
⚠ Engine at depth 20 ranks the winning move 7th with eval -2.83!
→ Solution: h4!! quiet pawn push wins