Engines playing Musketeer Chess, good price

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.
User avatar
musketeerchess
Posts: 140
Joined: Sun Apr 21, 2013 12:02 pm
Location: Paris, France
Contact:

Re: Engines playing Musketeer Chess, good price

Post by musketeerchess » Mon Jan 13, 2020 11:01 pm

hgm wrote:
Mon Jan 13, 2020 1:58 pm
I think that what Daniel meant is that if b1 gets attacked, and your Cannon is at b0, you would not gain anything by playing Nc3 without gating the Cannon, (even if that was allowed, which I think it isn't), as this would surely make you lose the Cannon without compensation, as it could never be gated again. So gating at all times is automatic. This is why one can think of the Cannon as being already on c1 from the start, stacked under the Knight, both being captured at the same time when an enemy moves to b1. In the face of such a threat you can escape with the Knight, but the Cannon is a sitting duck until it is 'uncovered'.
Hi
This could be an interesting concept. In fact, it can be used to make engines ponder (research for optimal piece choice, optimal gating selection with each piece choice etc) converning various possible piece combinations etc.

As i said, this will be used for research (Neural Network) and not fir engine vs engine play. This research could result in an opening book for the first moves (for variety of game play in engine vs engine matches)
inventor of Musketeer Chess. A modern commercial chess variant.

www.musketeerchess.net

Pieces are available on Houseofstaunton.com or Paypal

User avatar
musketeerchess
Posts: 140
Joined: Sun Apr 21, 2013 12:02 pm
Location: Paris, France
Contact:

Re: Engines playing Musketeer Chess, good price

Post by musketeerchess » Mon Jan 13, 2020 11:08 pm

musketeerchess wrote:
Mon Jan 13, 2020 10:22 pm
Daniel Shawul wrote:
Sun Jan 12, 2020 2:41 pm
@Ferdy Thanks, I now understand how the piece selection rules work

@HG My implementation was rather limited because I assumed that the fairy pieces are already in play. I did not even
implement how they get into play properly. It is my understanding that ranks 0 and 9 are "water" and can not be moved to
with other pieces. I have a holdings area just like that but is not file-restricted. So are there represented in the FEN as
e.g [C2D1c4d3] where they are preceded by file numbers? The drop rule is not a regular one and I probably need to implement a
special rule for it ( Not moved piece + drop-to-from square -- I like Ferdy representation with promotion letters but since I have a combo move
capability it may be easier for me to do "move b1c3 move C@b1" )
Edit: In a way the drops of pieces is square-restricted because it can only go to first/last rank. So the first time the target square becomes
empty, I drop it or lose it forever. In the latter case, do we just remove the piece from the holdings list forever?

@musketeerchess Thanks for the piece values. King's value is just a placeholder ( is actually infinity ). Anyway, I may decide to train
a neural network for it if it turns out to be simple enough.
Hi Daniel

The NN idea is great.
If the drop is lost the piece is removed and can no longer be dropped again. It’s possible to have it back when a pawn promotes. It can promote to any piece than begun the game. Even though the drop was lost it’s still possible to promote to this lodt piece as many times as there are promoted pawns
inventor of Musketeer Chess. A modern commercial chess variant.

www.musketeerchess.net

Pieces are available on Houseofstaunton.com or Paypal

Ferdy
Posts: 4159
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Engines playing Musketeer Chess, good price

Post by Ferdy » Tue Jan 14, 2020 2:29 pm

Got a perft for cannon and leopard both already at b and g files.

Image

Code: Select all

*c****l*/rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR/*C****L* w KQkq - 0 1

Code: Select all

Perft 4
0, 1
1, 20
2, 400
3, 8822
4, 193743

Code: Select all

Perft divide 4
   h2h3 : 8381
   h2h4 : 9245
   a2a3 : 8381
   a2a4 : 9245
   e2e3 : 13015
   e2e4 : 13041
   g2g3 : 9261
   g2g4 : 9244
   b2b3 : 9261
   b2b4 : 9248
   d2d3 : 11853
   d2d4 : 12325
   f2f3 : 8381
   f2f4 : 8849
   c2c3 : 9188
   c2c4 : 9656
  b1a3c : 8364
  b1c3c : 9226
  g1f3l : 9219
  g1h3l : 8360
 LeafNodes : 193743

Ferdy
Posts: 4159
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Engines playing Musketeer Chess, good price

Post by Ferdy » Tue Jan 14, 2020 2:36 pm

Perft for cannon and leopard with castle and gate at rook file.

Image

Code: Select all

c******l/r1b1kb1r/1p3ppp/p1N2n2/1B1q4/8/1N1p4/PP1P1PPP/R1BQK2R/C******L w KQkq - 1 13

Code: Select all

Perft 4
0, 1
1, 33
2, 1128
3, 35855
4, 1265960

Code: Select all

Perft divide 4
   f2f3 : 39081
   f2f4 : 44958
   h2h3 : 45664
   h2h4 : 47246
   a2a3 : 45597
   a2a4 : 45587
   g2g3 : 44065
   g2g4 : 39303
   b3d4 : 59084
   b3a5 : 51611
   b3c5 : 52883
   c6b4 : 8694
   c6d4 : 8932
   c6a5 : 7817
   c6e5 : 9513
   c6a7 : 7971
   c6e7 : 8432
   c6b8 : 8230
   c6d8 : 8486
   b5d3 : 75342
   b5a4 : 39914
   b5c4 : 55888
   b5a6 : 61192
  a1b1c : 47325
  h1f1l : 41931
  h1g1l : 43829
   d1c2 : 52445
   d1e2 : 8475
   d1f3 : 52327
   d1g4 : 58970
   d1h5 : 55891
   e1f1 : 46298
  e1g1l : 42979
 LeafNodes : 1265960

Ferdy
Posts: 4159
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Engines playing Musketeer Chess, good price

Post by Ferdy » Tue Jan 14, 2020 3:23 pm

It is not allowed to gate if the piece is pinned. Here white knight is pinned.

Image

Code: Select all

********/4k3/4b1m1/8/8/8/8/4M1P1/rN2K3/*H****** w - - 0 1

Code: Select all

Perft 3
0, 1
1, 22
2, 564
3, 11873

Code: Select all

Perft divide 3
   g2g3 : 465
   g2g4 : 464
   e2c1 : 604
   e2g1 : 350
   e2a2 : 455
   e2b2 : 628
   e2c2 : 680
   e2d2 : 599
   e2f2 : 630
   e2c3 : 779
   e2e3 : 545
   e2g3 : 603
   e2d4 : 754
   e2e4 : 563
   e2f4 : 729
   e2e5 : 507
   e2e6 : 502
   e2e7 : 61
   e1d1 : 522
   e1f1 : 448
   e1d2 : 501
   e1f2 : 484
 LeafNodes : 11873

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

Re: Engines playing Musketeer Chess, good price

Post by hgm » Tue Jan 14, 2020 4:41 pm

The WinBoard-AA package now contains a WinBoard version that no longer needs a gating suffix to the move in holdingless Seirawan. WinBoard already had code that made it resistant to missing promotion characters, supplying a default in that case (usually Q). So I just had to make the legality test recognizing first-rank moves with something behind it as a promotion. The promotion character was not as insignificant as I thought, so I now set it to the piece behind it, in a bit of a kludgy way. (It would not work with an odd number of ranks.) But for now that should do.

It will still add a gating suffix in the moves it sends to the engine.

Daniel Shawul
Posts: 3810
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: Engines playing Musketeer Chess, good price

Post by Daniel Shawul » Tue Jan 14, 2020 4:58 pm

@Ferd
I get the first perft all correct.

The second one is wrong after and including perft(3)

The third one I miss it all. I thought you can gate whether the Knight becomes pinned or not.

Is there a complete list of all the rules of musketeer chess ? The official webpage I am sure
does not have this pinning rule.

Ferdy
Posts: 4159
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Engines playing Musketeer Chess, good price

Post by Ferdy » Tue Jan 14, 2020 5:42 pm

Daniel Shawul wrote:
Tue Jan 14, 2020 4:58 pm
@Ferd
I get the first perft all correct.
Ok good.
The second one is wrong after and including perft(3)
That position is complicated not sure if mine is even correct. If we don't agree at perft 3, here is the perft divide at 3. Can be of help to track down the issue.

Code: Select all

Perft divide 3

   a2a3 : 1326
   a2a4 : 1328
   f2f3 : 1177
   f2f4 : 1318
   h2h3 : 1328
   h2h4 : 1366
   g2g3 : 1281
   g2g4 : 1182
   b3d4 : 1611
   b3a5 : 1448
   b3c5 : 1558
   c6b4 : 245
   c6d4 : 247
   c6a5 : 221
   c6e5 : 269
   c6a7 : 223
   c6e7 : 247
   c6b8 : 229
   c6d8 : 233
   b5d3 : 1718
   b5a4 : 1200
   b5c4 : 1353
   b5a6 : 1387
  a1b1c : 1365
  h1f1l : 1242
  h1g1l : 1286
   d1c2 : 1441
   d1e2 : 283
   d1f3 : 1575
   d1g4 : 1787
   d1h5 : 1659
   e1f1 : 1383
  e1g1l : 1339
 LeafNodes : 35855
The third one I miss it all. I thought you can gate whether the Knight becomes pinned or not.

Is there a complete list of all the rules of musketeer chess ? The official webpage I am sure
does not have this pinning rule.
True, can't find it there too, I just remember that musketeer chess is like seirawan chess, and it does not allow such move. But there is actually a web page where you can play musketeer chess.
https://musketeerchess.net/games/musketeer/index.php

I tried it there and pinned piece even with gating capability (to make the gated piece as cover from attacking the king) is indeed cannot move.

Daniel Shawul
Posts: 3810
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: Engines playing Musketeer Chess, good price

Post by Daniel Shawul » Tue Jan 14, 2020 6:39 pm

The third position is my fault -- I forgot about castling + musketeer drops combinations.

I will implement the pin rule to be like yours.

I must say this variant has so many specific rules I don't like, maybe because nebiyu does not have Sierawan variant.

thanks

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

Re: Engines playing Musketeer Chess, good price

Post by hgm » Tue Jan 14, 2020 8:14 pm

Ferdy wrote:
Tue Jan 14, 2020 5:42 pm
I tried it there and pinned piece even with gating capability (to make the gated piece as cover from attacking the king) is indeed cannot move.
This could of course be due to a bug in the Jocly implementation. It doesn't say anywhere that in case of doubt what Jocly does is decisive.

Surprisingly enough KingSlayer-Aramis also doesn't want to gate with a pinned piece. And WinBoard certainly considers it illegal.

Post Reply