Page 1 of 5

The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 8:13 am
by hgm
This is only for those bored with going the trodden path, who want to try something radically different!

Paco Shako

There is a (recently invented) game called Paco Shako (Esperanto for 'Peace Chess'). I wouldn't even dare to claim it is a Chess variant. Because although it is played with orthodox Chess pieces, which all move in their normal way, it does away with one of the defining characteristics of Chess: replacement capture.

Hugging instead of capture

In Paco Shako, when you move to a square occupied by an opponent piece, the latter is not captured, but both pieces will co-exist on the square, 'hugging' each other. Pieces that are hugging can still be moved in their normal way, but will take their hugging partner with them. So a hugging pair is moved as a unit, can be moved by both players! (But if the piece types that make up the pair are different, each player could move it in different ways.)

Image
The blue line indicates a release chain that would hug the black King though a P-B-N-Q (or P-P-B-N-Q) move.

Release chains

Only the capture moves of orthodox Chess can be used to enter an occupied square. (So a Pawn can only do it through diagonal moves.) Pieces that are already hugging cannot enter occupied squares, and are limited to the non-capture moves they have in orthodox Chess. If a lone piece enters a square occupied by a hugging pair, it releases the piece of its own color from the hug, and takes its place hugging the opponent piece. The released piece then has to be moved away from the square in the same turn. With this release move it can do anything a lonely piece can do, so also start new hugs, or break up an existing hug to release yet another piece. So you can get entire chains of releases, all in one turn.

Winning

Kings cannot start a hug, (so they can only move to empty squares) and the player to first hug the opponent King wins. Note that you can never hug your own pieces, so you canot move into a square occupied by a lone piece of your own. If there would be no place for a released piece to go to (which can easily happen if that piece is a Pawn) you can also not move into the square where it is hugging.


Computer Paco Shako?

That is basically all. From the view point of creating an engine to play this, the hugging and release chains are a complication. But a far worse problem is how to statically evaluate positions. All pieces remain on the board for the entire game, so there is no 'material' eval. Pieces that are hugging have a little less power than lone pieces, as they can only move to empty squares, and thus not start new hugs. But if hugging is a disadvantage, why would you want to start new hugs? (Well, except perhaps on the King.) It is completely unclear to me what one should strive for, in this game, as long as a King hug is still beyond the horizon.

Would it be a fun idea to have a competition of Paco Shako engines? In any case I am planning to write a simple one, in JavaScript, as a demo. If other people are interested, I can add Paco Shako as a variant to WinBoard, which implements hugging instead of capture.

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 9:09 am
by tmokonen
hgm wrote:All pieces remain on the board for the entire game, so there is no 'material' eval.
Is pawn promotion possible? If so, then there is material value to promoting.

Also, would there be en passant hugging moves, including the en passant capture of an opponent's pawn involved in a hug (and subsequent release chains)?

It looks like determining whether the king is in check or not will be a little complicated, considering release chains.

Do castling moves also apply, with the usual caveats of not being able to castle through check? Can one castle with a hugging but unmoved rook?

Kind of funny that the game promotes peace and hugging, but that the king tries to avoid hugs at all costs. He must be really shy. :lol:

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 10:15 am
by hgm
tmokonen wrote:Is pawn promotion possible? If so, then there is material value to promoting.
Good point! Yes, promotio is possible, even when the Pawn is hugging, and even when the opponent drags it to your 8th rank. (So you can replace the Paw fr your piece of choice at the begiing of your turn, before making your regular move. And indeed, it would defenitely be an advantage to have Queens instead of Pawns.
Also, would there be en passant hugging moves, including the en passant capture of an opponent's pawn involved in a hug (and subsequent release chains)?
Yes, en passant is possible, accordig to the prescription that would also work in normal Chess (and is probably the historic origin of the e.p. rule): If the opponnent makes a double push with a Pawn (be it a lone or a paired one), you are allowed to undo the second step for the purpose of moving a Pawn to the square it tried to skip with. So it would lead to hugging on the square of the skipped square.
It looks like determining whether the king is in check or not will be a little complicated, considering release chains.
True. This is probably why the game ends by King hugging, rather than at the point where the King can no longer escape hugging. Checks by release chains are comparatively easy to evade, btw, as you could move any of the pairs in the chain away.
Do castling moves also apply, with the usual caveats of not being able to castle through check? Can one castle with a hugging but unmoved rook?
The rule description I have see was not etirely clear about this. That is, the same rules for castling as in orthodox Chess definitely apply when the Rook has never been hugged. I am not sure if you can castle with a huggig Rook, or whether Rook hugging would destroy castling rights. I am not sure the inventor even knows that.
Kind of funny that the game promotes peace and hugging, but that the king tries to avoid hugs at all costs. He must be really shy. :lol:
Perhaps this is because it is undignifying to hug in public. (Or the secret service won't allow it for security reasons.) :wink:

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 10:26 am
by petero2
tmokonen wrote:
hgm wrote:All pieces remain on the board for the entire game, so there is no 'material' eval.
Is pawn promotion possible? If so, then there is material value to promoting.

Also, would there be en passant hugging moves, including the en passant capture of an opponent's pawn involved in a hug (and subsequent release chains)?

It looks like determining whether the king is in check or not will be a little complicated, considering release chains.

Do castling moves also apply, with the usual caveats of not being able to castle through check? Can one castle with a hugging but unmoved rook?

Kind of funny that the game promotes peace and hugging, but that the king tries to avoid hugs at all costs. He must be really shy. :lol:
I found the rules here. I think it answers your questions. "The rook not being hugged" is not mentioned in the list of necessary conditions for castling to be permitted, so I think it is permitted.

I think the draw rules are unclear and illogical though:

Code: Select all

The fifty move rule:
There is an automatic draw when fifty moves have been played without a piece entering or leaving a union.

Repeated moves:
When the same move has been played by both players three times in a row with the same piece in the same position on
the board, the players will automatically draw.
To me it would have made more sense if the 50 move counter were reset when an irreversible move was played, that is when a pawn is promoted or the number of occupied squares decreases.

Also I don't understand the repeated moves rule. What exactly does "three times in a row" mean? Does the following infinite sequence of moves trigger the "repeated moves" rule?

Code: Select all

e4 e6 d4 d6 e5 dxe5 d5 exd5 (e6 d4 d5 e5)*
Here the notation (...)* denotes a sequence of moves that is repeated indefinitely.

Also it is not obvious to me if a player can have zero legal moves in a position, and if it is possible, what would then happen? Since putting your king in Sako (check) is legal, the moves in this game does not lead to a stalemate, but there might be other ways to achieve a stalemate.

Another question is if it is allowed to create an infinitely long move chain, or a longer than necessary move chain. For example, consider the following position:

Code: Select all

    +----+----+----+----+----+----+----+----+
    |  r |  n |  b |  q |  k |  b |  n |  r |
    +----+----+----+----+----+----+----+----+
    |  p |    |    |    |    |  p |  p |  p |
    +----+----+----+----+----+----+----+----+
    |    | .. |    | .. |    | .. |    | .. |
    +----+----+----+----+----+----+----+----+
    | .. |    | .. | Bb | .. |    | .. |    |
    +----+----+----+----+----+----+----+----+
    |    | .. | Bb | .. | Bb | .. |    | .. |
    +----+----+----+----+----+----+----+----+
    | .. |    | .. | Bb | .. |    | .. |    |
    +----+----+----+----+----+----+----+----+
    |  P |    |  B |    |    |  P |  P |  P |
    +----+----+----+----+----+----+----+----+
    |  R |  N |  B |  Q |  K |    |  N |  R |
    +----+----+----+----+----+----+----+----+
Is the following infinite chain move legal?

Code: Select all

Bc2xd3,(Bd3xc4,Bc4xd5,Bd5xe4,Be4xd3)*
If it is legal, does it cause the player attempting this to eventually lose on time, or does it trigger some repetition rule, causing the game to end in a draw?

If it is not legal, is the following finite but long chain move legal?

Code: Select all

Bc2xd3,(Bd3xc4,Bc4xd5,Bd5xe4,Be4xd3)*1000000,Bd3e2
where the cycle is repeated a million times, hoping to trigger a buffer overflow and crash in the opponent engine.

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 10:30 am
by Evert
hgm wrote:
Kind of funny that the game promotes peace and hugging, but that the king tries to avoid hugs at all costs. He must be really shy. :lol:
Perhaps this is because it is undignifying to hug in public. (Or the secret service won't allow it for security reasons.) :wink:
Perhaps he's a fermion? Although that shouldn't matter if the other pieces are bosons.

Two questions: do you have an intended time frame for such a competition? It's going to take me a little while to put something together. Second: how will this be played through XBoard?

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 10:33 am
by Evert
You probably need a rule that says you cannot hug on the same square twice in a sequence, similar to how you cannot leap the same stone twice in draughts.

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 11:04 am
by petero2
Evert wrote:You probably need a rule that says you cannot hug on the same square twice in a sequence, similar to how you cannot leap the same stone twice in draughts.
That is one way to clarify the rules but it would mean that white cannot hug the king in the following position:

Code: Select all

    +----+----+----+----+----+----+----+----+
    |    |    |    |    |    |    |    |    |
    +----+----+----+----+----+----+----+----+
    |    |    |    |    |    |    |    |    |
    +----+----+----+----+----+----+----+----+
    |    |    |    |    |    |    |    |    |
    +----+----+----+----+----+----+----+----+
    |    |    |    |    |    |    |    |    |
    +----+----+----+----+----+----+----+----+
    |    |    |    |    | Qb |    |    |    |
    +----+----+----+----+----+----+----+----+
    |  k |    |    | Bb |    |    |    |    |
    +----+----+----+----+----+----+----+----+
    |    |    |    |    |    |    |    |    |
    +----+----+----+----+----+----+----+----+
    |    |  Q |    |    |  K |    |    |    |
    +----+----+----+----+----+----+----+----+
With your rule the following chain move would not be legal:

Code: Select all

Qb1xd3,Bd3xe4,Qe4xd3,Qd3xa3

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 11:27 am
by hgm
Well, the rules should still be considered fluid; when I met the inventor last year, the hugging pairs were still stationary, and Kings could safely initiate hugs and be released from it. The current official rule document seems to be written by someone only vaguely aware of FIDE rules.

For the purpose of a computer competition I would definitely amend the draw conditions to:
1) 3 times the same position (as in FIDE rules)
2) 50 moves without the distance of the most advanced Pawn to the last rank decreasing
I think (1) was the itention all along, and the guy did just not kow how to formulate it properly. As to the 50-move rule, the key idea behind this rule is progress, not so much irreversibility. E.g. castling (or destroying castling rights) is irreversible, but it isn't really progress, and in FIDE rules it does not reset the counter. Here pair formation is irreversible, but it is not clear that it is progress towards deciding the game. Also, Pawn moves are not irreversible, because Pawns could be hugged and dragged backwards. Moving a Pawn forward that on the move before was dragged backward isn't really progress either. So the only sensible measure I can think of for progress (and thus considering it premature to declare draw) is whether you manage to get closer to the promotion rank with a Pawn.

This reminds me: Pawns on their own first rank (to which they can be dragged by an opponent) are supposed to have a double push, on which they also can be captured en passant.

As to the time scale of a possible tourney: whatever it takes for people interested in participating to build the engine. Engines are of course never really finished, but at the point where no further development is planned in a foreseeable time, we can have a tourney. And if an engine is significantly improved after that, we can have another one! 8-)

As to how to play this with WinBoard: I was planning on using the Alien Edition for this, as it already implements arbitrarily long sequeces of moves by the same player (for the purpose of multiple capture in Draughts). That means the engine would get its moves from WinBoard as a comma-separated list of normal moves, in a single 'usermove' command, and would have to send move chains with each move in a separate 'move' command, each non-final move suffuxed by a comma. I am not sure how to encode Paco Shako positions by FEN, but I guess we can live without position setup for a while. (One way would be to introduce a dash in the FEN as signifying "stay on same square".)

Internally I would just define all 36 possible combiations of two pieces as a new piece type, (each having their own image), and adapt the tests for whether you are allowed to move a piece, or to which squares you are allowed to 'capture' to recognize these combi-types as exceptions. (I.e. they would be recognized as your own for moving them, and as an opponent for capturing them.) The code for making moves would have rules for how to merge attacker and victim, and which attacker this would produce for a continuation leg (the released piece).

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 11:49 am
by hgm
petero2 wrote: With your rule the following chain move would not be legal:

Code: Select all

Qb1xd3,Bd3xe4,Qe4xd3,Qd3xa3
This is something I also wondered about, and will certainly raise when I meet with the inventor next time. I am not sure if there is any reason to forbid this. Sure, in theory you could get infinitely long chains, but if players want to waste time while their clock is running... It is a bit similar to the FIDE rule that when you still hold your piece, you are still allowed to change your move with it, even if the piece already touched one of its legal target squares. Would one really need a rule that says that you can only touch each possible target square once, because otherwise the player could drag out his turn forever by alternately touching the same two squares again and again with the piece he holds in hand?

As for programming, you could just check for position repetitions during the generation of chain moves, and abort branches that hit a repeat. This doesn't sound any more difficult than keeping track of which squares have been visited, to abort when you hit the same square for a second time.

In fact my first try at an engine will probably be one that does not explicitly use release chains at all, but only makes one simple move per 'turn', but does not force alternating turn order. It would keep the same side on move whenever it releases a piece, and passes the release square and released piece to its child. When a valid release square is passed, Search() would only generate moves with that piece from that square. Then the normal repetition detection would take care of this issue. You could extend each release by a full ply, to make sure branches never terminate before the end of a turn. But there might not even be any need to do that; perhaps it is perfectly possible to evaluate halfway a release chain. Or you could just evaluate it as -INF, so that effectively only those release chains are taken into account that fall completely within the horizon. In the root you would play all the plies of the PV that belong to the chain.

Re: The Peace-Chess Challenge

Posted: Sun Sep 24, 2017 3:53 pm
by kbhearn
Total number of unions increases could be 'progress' - a piece can only be released from a union if another piece enters a union, so number of unions cannot go down. in the case that all non-kings are in union, the game must be drawn.