Calculation and visualization
Use comparison to prune a branch
Reuse a calculation only where the changed square cannot affect it. Recheck captures and recaptures touched by the change.
Worked example
Position in text
White to move. White: knight c3, pawn g2, rook d1, king g1. Black: rook d8, king g8, pawn g7, pawn d5.
FEN: 3r2k1/6p1/8/3p4/8/2N5/6P1/3R2K1 w - - 0 1
With Nc3, Rxd5 …Rxd5 Nxd5 leaves White with the knight and an extra pawn. The recapture is a jump from c3 to d5; it is not a feature of the rook line alone.
A plausible mistake
Do not copy the endpoint from a similar position without testing whether every recapture came from the same square.
Try it yourself
Position in text
White to move. White: knight c2, pawn g2, rook d1, king g1. Black: rook d8, king g8, pawn g7, pawn d5.
FEN: 3r2k1/6p1/8/3p4/8/8/2N3P1/3R2K1 w - - 0 1
The knight starts on c2 instead. Which part of the old line survives and where does it fail?
Check your answer
Both rook captures still work exactly the same way. Nxd5 no longer exists: c2 to d5 is not a knight jump. The changed square only matters at the third ply, but there it reverses the material result.