Assumptions about King movement which hold under new rule sets

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
AndrewGrant
Posts: 561
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Assumptions about King movement which hold under new rule sets

Post by AndrewGrant » Thu Feb 27, 2020 11:38 pm

Suppose we are playing with a new piece set A, such that each piece in A can be describe as a union of PURE sliders and PURE jumpers, where sliders can be described as a subset of the queen's control (direction could vary, distance could vary, ...), and a pure jumper is a piece for which the ability to attack a given sq X does not depend on the ability to attack some other sq Y. Namely, nothing funky is going on. There are no "conditional" jumpers, and there are no sliders which "jump" over certain squares.

The following are, as far as I know, truths for main version of chess.
#1 The King is either attacked by 0, 1, or 2 pieces. Never 3.
#2 If the King is attacked by 2 pieces, the only legal moves involve moving the King.

Do these conditions still hold true? If not, can we provide a simple counter example.
I would like to assert these conditions in building a engine capable of playing subsets of Musketeer chess.

User avatar
Evert
Posts: 2929
Joined: Fri Jan 21, 2011 11:42 pm
Location: NL
Contact:

Re: Assumptions about King movement which hold under new rule sets

Post by Evert » Fri Feb 28, 2020 6:24 am

Well, let’s consider both logically.

If a move delivers check, there are three things to check:
1. Does the evacuation of the from square expose a checking piece (which includes gated pieces, I suppose)?
2. Does the moving piece deliver a direct check?
3. Does the occupation of the target square activate an attack by another piece?

The latter occurs in Xiangqi if the piece acts as a cannon mount. That is the only situation where you can get a triple check. I think double checks involving cannons are also the only way non-king moves can resolve the check (if the cannon mount captures a direct checker, or blocks another line of attack).

Without a cannon-like piece, both assertions are true. Note that you can always add an assertion for king captures, which will expose mistakes during testing.

User avatar
hgm
Posts: 24449
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Assumptions about King movement which hold under new rule sets

Post by hgm » Fri Feb 28, 2020 9:01 am

The assertions hold true in absence of any hoppers (= pieces that must jump over something in order to move/capture), and under your mentioned assumption that sliders are a sub-set of the Queen. So for Musketeer Chess this should be OK. When there are sliders with bent trajectories (such as the Grant-Acedrex Griffon), or more general riders (e.g. a piece that can indefinitely repeat diagonal leaps of 2 squares, the Alfilrider), it is possible for multiple distant attackers to merge their trajectories, so that they can be all blocked (and thus discovered) on a single square. (E.g. a Bishop on b2 and an Alfilrider on a1 attacking a King on e5 after c3 got evacuated.) Such double-checks cannot be cured by capturing the checker, but they can be cured by interposition on any of the squares where the trajectories coincide.

A lame leaper can be considered a kind of slider: it can also be blocked, and thus discovered. The Xiangqi Horse is thus like a bent slider, and indeed a pair of Horses can deliver a discovered double check. (Which, when discovered by a Pawn that also activates a Cannon, could result in a quadruple check!)

Post Reply