The Chess Variant Pages




[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Foolish King Chess. Players have different armies and victory conditions. White has a fool for a king. (10x8, Cells: 80) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on 2020-09-28 UTC

The diagram's AI uses a bit of a quirky method for detecting game end: it incrementally keeps track of a 'royalty count', where each piece type has its own 'royalty weight'. Pieces defined as royal get weight 1024, pieces defined as baring get weight 1. If the opponent's royalty count is negative after your (pseuo-legal) move, you win immediately. If not, and if your own royalty count is exactly zero, you lose. Except when the opponent is at 0 too. Then, if this was the consequence of the latest move (i.e. before the move the opponent was still positive) the game continues to check the legality of this counter-baring; otherwise it is ruled a draw.

Normally the royalty count starts at 1, so that loss of any royal makes it negative. For extinction royalty 1024 times the number of spare royals is added to the initial value. I there are any baring piece types, the initial 1 is replaced by the number of baring pieces (so that you will hit 0 when they are all gone).

You can specify which piece types should be counted for the baring, through a number of baring=N parameters. For cases like Shatranj, a short-cut baring=0 is recognized as the instruction to make all non-royal pieces baring. (Piece-type numbering starts at 1.) This system so far was able to handle all cases I encountered; in this case I defined the Rooks and Archbishops as baring, and to prevent black from losing when he loses both Rooks, I defined the King as baring as well. Then black can only lose by baring if he loses his King, but as the King is defined as royal, that would make him lose anyway.