miguel-ambrona / sherlock

A chess library written in Rust, oriented to creating and solving chess compositions with especial emphasis on retrograde analysis.
MIT License
5 stars 0 forks source link

Illegal positions where the king cannot reach its current position #44

Closed hwatheod closed 4 weeks ago

hwatheod commented 1 month ago

Sherlock doesn't detect these positions as illegal: 8/8/8/8/8/P3P2P/1PPP1PP1/2k2K2 w - - 3k1b1K/4ppp1/7p/8/8/8/8/8 w - - 8/8/8/8/8/6P1/6P1/R3K2k w Q -

Issue

Issue

Issue

In all cases, one of the kings couldn't have reached its current position without moving into check. Note that the last example relies on white's king being unmoved.