This is a temporary, read-only recovery of the chessprogrammingwiki while a longer-term plan is worked out. Editing is not possible right now, but will be again soon.
Chess Programming Wiki All pages Other namespaces

Legal Move

Home * Chess * Moves * Legal Move

Marina Kalinovsky - The King can never be Captured 1Marina Kalinovsky - The King can never be Captured 1


  1. The King can never be Captured by Marina Kalinovsky, Artwork for Sale - Brooklyn, NY - United States↩︎

A Legal Move is a pseudo-legal move which does not leave its own king in check. If not in check, most programs delay the legality test to the child node, after incremental updates attack and defend maps or an explicit square attacked test direct after make move. Earlier programs were even more "lazy", to determine illegal moves after an illegal king capture, while many programs consider absolutely pinned pieces in move generation and also for evaluation purpose, or even perform a strictly legal generation to demand searching legal positions. If in check, most programs apply a special move generator to omit the majority of illegal moves.

Contents
  1. Legality Test
    1. Not in Check
    2. King in Check
      1. Double Check
      2. Single Check
  2. See also
  3. Forum Posts
  4. External Links
  5. References

Legality Test

Beside the pseudo-legal condition which might already be sufficient for a subset of chess programs, there are several conditions to test, dependent whether the king is in check or not.

Not in Check

King in Check

Double Check

Single Check

See also

Forum Posts

References

Up one Level

Categories: Marina Kalinovsky

What links here

Contributors: GerdIsenberg.