AI Chess Lab AI Chess Software, research, lab notes, and durable public pages.

Field note

GPUPerft CDP2 Movegen Test FENs

This review draft records compact positions that are useful for isolating legal-move-generation behavior. The counts in the table are Stockfish 18 go perft 1 reference counts unless otherwise noted.

Current Bughunt Finding

The CDP2 validation failures were narrowed to shared CPU/GPU move-generator issues, not transposition-table, allocator, or CUDA-only issues. The first confirmed family was promotion-capture multiplicity: two promotion-capable pawns can capture the same promotion-square piece. The second was en-passant check-evasion source multiplicity: two pawns can both capture the checking pawn en passant onto the same target square. The pre-fix count paths collapsed those cases by destination bit instead of counting legal source moves.

ID FEN SF18 d1 Pre-Fix CDP2 d1 Status After Fix Why It Is Special
double_promo_capture_white_a7_c7_b8 1r2k3/P1P5/8/8/8/8/8/6K1 w - - 0 1 21 17 Passes Minimal white-side reproducer. White pawns on a7 and c7 can both capture the same rook on b8 and promote. The pre-fix counter counted only one four-move promotion-capture group instead of both.
double_promo_capture_black_a2_c2_b1 6k1/8/8/8/8/8/p1p5/1R2K3 b - - 0 1 21 17 Passes Black-side mirror of the minimal promotion-capture multiplicity bug. Black pawns on a2 and c2 can both capture the same rook on b1 and promote.
double_promo_capture_white_b7_d7_c8 2r1k3/1P1P4/8/8/8/8/8/6K1 w - - 0 1 25 21 Passes Same bug away from the board edge. White pawns on b7 and d7 both attack the same rook on c8, proving the issue is not specific to the a/c file pair.
cpw_derived_double_promo_capture_context 1r2k2r/PpPp1ppp/5nbN/nP6/BB2P3/q4N2/Pp1P2PP/R2Q1RK1 w - - 1 4 54 50 Passes Reduced from the CPW position 4 failure path. It preserves the real surrounding tactical state where the bug first appeared during d7 prefix isolation.
single_promo_capture_a7_b8_control 1r2k3/P7/8/8/8/8/8/6K1 w - - 0 1 13 13 Passes Control case showing a single promotion capture onto b8 is counted correctly.
single_promo_capture_c7_b8_control 1r2k3/2P5/8/8/8/8/8/6K1 w - - 0 1 13 13 Passes Control case showing the c7xb8 promotion-capture move family is counted correctly when it is the only pawn attacking b8.
two_quiet_promotions_a7_c7_control 4k3/P1P5/8/8/8/8/8/4K3 w - - 0 1 13 13 Passes Control case proving that multiple quiet promotions are not the problem.
double_pawn_capture_nonpromo_white_control 4k3/8/8/8/8/1n6/P1P5/6K1 w - - 0 1 11 11 Passes Control case proving ordinary double pawn captures to the same square are counted correctly when no promotion is involved.
double_pawn_capture_nonpromo_black_control 6k1/p1p5/1N6/8/8/8/8/4K3 b - - 0 1 11 11 Passes Black-side control for ordinary double pawn captures to one non-promotion square.
double_ep_check_evasion_c6 7r/8/8/1PpP4/1K2Rp2/6k1/6P1/8 w - c6 0 5 9 8 Passes Reduced from the remaining CPW position 3 d9 failure. White is in check from the black pawn on c5; both b5xc6 ep and d5xc6 ep are legal check evasions. The pre-fix out-of-check counter counted only one source.
double_ep_same_target_control 7k/8/8/1PpP4/8/8/8/K7 w - c6 0 1 7 7 Passes Control case proving that two pawns sharing one EP target are counted correctly when the side to move is not in check.
ep_basic_control 7k/8/8/3pP3/8/8/8/4K3 w - d6 0 1 7 7 Passes Basic legal en passant position. Keeps simple EP handling covered while chasing promotion bugs.
ep_horizontal_pin_control 8/6bb/8/8/R1pP2k1/4P3/P7/K7 b - d3 0 1 21 21 Passes Classic horizontal en-passant pin pattern. It verifies that the current bug is not the known EP discovered-check case.
promotion_quiet_control 4k3/P7/8/8/8/8/8/4K3 w - - 0 1 9 9 Passes Single quiet promotion baseline.
promotion_capture_control 4k2r/6P1/8/8/8/8/8/4K3 w - - 0 1 13 13 Passes Single promotion capture baseline.
castling_open_control r3k2r/8/8/8/8/8/8/R3K2R w KQkq - 0 1 26 26 Passes Open castling baseline for both sides’ rights.
castling_through_attack_control r3k2r/8/8/8/8/8/5r2/R3K2R w KQkq - 0 1 22 22 Passes Castling-through-attack control. Ensures castling legality remains separated from the promotion-capture bug.
rook_check_evasion_control 4k3/8/8/8/8/8/4r3/4K3 w - - 0 1 3 3 Passes Simple check-evasion baseline.

Regression Notes

The minimal promotion and EP positions should become permanent d1 regression cases. The CPW-derived context position is useful as a bridge test because it connects the small reproducer to the real d7/d9 validation failures. The passing controls should remain close to the failing cases so future changes do not overcorrect promotion generation, en passant handling, or castling legality.