Author Topic: The Planchet Program for playing Musketeer Chess  (Read 118 times)

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
The Planchet Program for playing Musketeer Chess
« on: January 13, 2018, 04:36:45 pm »
I loaded the 3-piece tables into a RAM buffer, and wanted to test to see if my Musketeer Chess program, Planchet, was able to use them correctly. You might find this interesting.



The position above is white to move.

The program was able to announce a Mate in 57-ply in about 2 seconds:



You can see it played QxA KxQ and what remains is a 3-piece tablebase position it knows is a win in 55-ply from the longest win in the Hawk vs. King tablebase.

When I turn off the tablebase probing in RAM, this is how it plays:



It just wants to save the Hawk being menaced by the Archbishop.

What a profound difference in play!
« Last Edit: January 13, 2018, 04:43:00 pm by GothicChessInventor »

Share on Facebook Share on Twitter


chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
Re: The Planchet Program for playing Musketeer Chess
« Reply #1 on: January 14, 2018, 12:59:49 am »
Interesting. What source do you use to for the definition of Musketeer chess pieces?
Is it this: http://musketeerchess.net/games/musketeer/rules/rules-short.php
?
the "chilipepper"👹

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: The Planchet Program for playing Musketeer Chess
« Reply #2 on: January 14, 2018, 01:04:04 am »
Interesting. What source do you use to for the definition of Musketeer chess pieces?
Is it this: http://musketeerchess.net/games/musketeer/rules/rules-short.php
?

I computed values based on the experiences learned from the paper I published when I had to derive new piece values for the 10x8 board for Gothic Chess back in the year 2000. I posted a topic showing some of the geometry and algebra used to make a derivation for a Rook on a rectangular board of any dimension, along with a link where you can download the paper.

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: The Planchet Program for playing Musketeer Chess
« Reply #3 on: January 14, 2018, 01:17:44 am »
I decided to make a coding change to the program. This is the result:



I noticed that the prior version of the program stopped searching shortly after finding a path into the online tablebase probed in RAM during the search. Originally I thought this was awesome; finding a mate in 29 moves after only a 5-ply search. Then it dawned on me: 5-ply means it only generated 3 moves for white (2 for black) so technically, the program could be passing up a mate in 4 by quitting the search early! In fact, there could be mates in 4, 5, 6, 7, ...up to 28 that the program could potentially "miss" if I have it stop once a proven path to the tablebase is found.

So I modified to search so that the DEPTH of search is allowed to increase until "Mate in x" is announced, where d = 2x - 1. Usually you never have to worry about this, because the depth at which the mate is discovered is usually the same as the depth of the current search's iteration, but with tablebases probed in RAM, the "checkmate sight" is much greater than the depth of search.

Bearing that in mind, take a look at the lines of play the program found. At first, I did not understand them, but once it became apparent what the lines of play represented, it was hilarious!

At depth 5 the program wants to throw away its queen to remove the archbishop, and in so doing forces the black king onto a square corresponding to a 3-piece tablebase position where it is white to move and win in 55-ply. Since that position is 2-ply distant, the program correctly reports that QxA+ KxQ is a mate in 57-ply.

Then the program announces a mate in 55-ply without the sacrifice. My first thought was: Bug in the program! But this is not the case. The program plays the Hawk to d4 to avoid having it captured trivially by the black archbishop. Then black appears to make the stupid move ...Ke6 which keeps it on the c8-h3 diagonal where it will be checked by the white queen while losing the archbishop at the same time. Why the heck would the program allow such bad play? Well, by spending a move to run away, black costs white a move to "force" the capture of the archbishop with the queen, and because black does not recapture the queen, the program has not entered into the mate in the tablebase. Being down an archbishop is better than being checkmated within a known horizon. So the black king allows the check and starts running away. But white resumes chasing with the queen, which he eventually throws away! The line of play that is produced shows black getting his king onto the square resulting in the longest loss in the Hawk endgame tablebase and white engineers queen moves to try and minimize the desperato effort to toss the queen. It is rather funny. Black is running away, trying to avoid "winning a queen," and white chases him down anyway, and "forces" black to capture the queen. The result is a delayed entry into the tablebase, but a shorter tablebase path to victory, netting a 2-ply reduction from 57-ply to 55-ply.

And then it happens again! At depth 9, white found a sequence to reduce the overall win to 53-ply, although the play seems more logical to humans. With Qc5 white defends the Hawk, "daring" the archbishop to take it and enter into a rapid loss in the queen vs. king tablebase. Black can only alter the square on which the king will reside in the Hawk tablebase again, so with Ae7 Qxe7+ Kxe7 that is what happened, with a 53-ply mate announced.

« Last Edit: January 14, 2018, 01:38:42 am by GothicChessInventor »

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: The Planchet Program for playing Musketeer Chess
« Reply #4 on: January 15, 2018, 12:53:02 pm »
And, amazingly, by prioritizing tablebase probes to quiescence, and by just letting it search one ply deeper, it found a mate in 21-ply that cannot be avoided. It also improved the depth-09 assessment by the time it completed that iteration.

« Last Edit: January 15, 2018, 12:55:36 pm by GothicChessInventor »