Page 1 of 1

Some results from Musketeer Chess End-Game Tables

Posted: Sun Dec 22, 2019 8:27 pm
by H.G.Muller
I investigated some pawnless end-games with Musketeer pieces, to determine their drawishness. (Which often plagues pawn-less end-games.) To this end I had FairyGen generate the required End-Game Tables, and interpreted their statistics. For a chess engine it is important to have such knowledge; otherwise it would naively trade KBPP-KN int KB-K, (or KRBP-KRB into KRB-KR), thinking it gained a piece to reach a +3 score.

By definition a major piece is one that can (together with its own King) force checkmate against a bare King from almost any position. (There could be a few tactical positions where the piece gets lost or stalemate is unavoidable.) In orthodox Chess the difference between major (Queen, Rook) and minor (Bishop, Knight) pieces nicely corresponds with piece value (light vs. heavy pieces). In general this need not be the case, however. The ability to force checkmate on a bare King is a very specific one, which only correlates poorly with the general power of a piece. And the value of pieces in chess is mainly determined by how well they support or combat Pawns, as promotion of the latter is usually decisive.

So there can be very valuable minor pieces. E.g. consider a piece that is allowed to leap directly to every square of the board that has same shade as the one it is on. It can never inflict checkmate, not even against a cooperating opponent ('helpmate'), but in the middle game it is more powerful than a Queen. At the other end of the spectrum, a Rook that is restricted to move at most two squares (and thus can reach at most 8 squares in total, the access to half of those can be blocked, and is worth less than a Knight, which can unconditionally reach all its 8 targets), which still has mating potential. There even are major pieces with only 5 moves, hardly worth more than 2 Pawns in the middle game.

From orthodox Chess we know that being a minor ahead in a pawnless end-game is usually not enough to force a win. (While being a Pawn ahead often is a winning advantage.) The same holds for being an 'exchange' ahead, i.e. having one significantly more powerful piece in an otherwise equal (but pawnless) position, provided the value difference is not more than that of a light piece (B or N). A 'super-piece' like Queen will beat all other pieces in a 1-to-1 situation, though.

Musketeer Chess complicates this picture by adding many piece types that are between Rook and Queen in value, and even one (Dragon) that is far stronger than a Queen. Some of those definitely classify as super-pieces, having a value very close to that of a Queen. The value difference between the Musketeer pieces is in general not large enough for one to beat the other in 'single combat', with the exception of the Dragon: the latter combines the powers of Queen and Knight, not enough to beat the Queen and nearly equivalent Chancellor, but good enough to beat all other Musketeer pieces.

The Musketeer Unicorn even is a minor piece, albeit more valuable than a Rook, so it could not even beat a bare King, let alone a supported one. It turns out the Hawk and Unicorn are significantly weaker than the others, and definitely are not superpieces; they cannot subdue even an opposing Bishop or Knight. A Rook is a pretty tough defender, btw, and that a Queen (and thus a Dragon) can beat it is really an exception: no other Musketeer piece can do that. Hawk and Unicorn do much worse as defenders, and loose against the stronger Musketeer pieces Chancellor, Spider and Cannon as well as against Queen/Dragon.

I summarized the 1:1 and bare-King results in the following table, where '+' means the end-game is generally won by the piece on the left, and '-' means it is a general draw (or worse, for the defender). Pieces are given as the first letter of their usual name, except that I used M for Chancellor, because this piece is also known under the name 'Marshal', and C was needed for the Cannon. A '?' means a result that is unclear from the statistics: significantly fewer lost positions, but far more than for a general draw. Probably this means an end-game where in some fortress position for the defender exists from which he can hold out indefinitely, if he succeeds in reaching it. (Could also be a perpetual check.)

Code: Select all

   1 vs 1

             defender
   D Q M S C A E L F H U R B N -
 D - - - ? + ? + + + + + + + + +
 Q   - - - - - - - - + + + + + +
 M     - - - - - - - + + - + + +
 S   - - - - - - - - + + - + + +
 C   - - - - - - ? ? + + - + + +
 A       - - - - - - - - - + + +
 E       - - - - - - - - - + + +
 L       - - - - - - - - - + + +
 F       - - - - - - - - - - + +
 H       - - - - - - - - - - - +
 U       - - - - - - - - - - - -
It turns out that for all those pieces it still holds that an extra N or B is not enough to break the tie between
them. (Except perhaps in the case Spider + Knight vs Spider, where a forced win does in general exist if it were
not for the 50-move rule.) This because after trading the stong pieces, the remaining minor cannot win. Even a small additional advantage of the side with the extra minor is enough to tip the balance in his favor, though.

Code: Select all

   extra Knight

         defender
   D Q M S C A E L F H U R
DN - + + + * + * * * * * *
QN   - - ? + ? + + + * * *
MN     - ? + ? + + + * * +
SN   - - - ? ? + + + * * +
CN   - - - - - + ? ? * * ?
AN       - - - - - 5 + + ?
EN       - - - - ~ - + + ?
LN       - - - - - - + + ?
FN       - - - - - - + + ?
HN         - - - - - - - -
UN         - - - - - - - -
RN         - - - - - - - -

   extra Bishop

         defender
   D Q M S C A E L F H U R
DB - ? ? + * + * * * * * *
QB   - - ? + + + + + * * *
MB     - ? + ? + + + * * +
SB     - ? ? + + + + * * +
CB   - - - - ~ - + + * * +
AB   - - - - - - - - + + +
EB       -   - - ? 5 + + ?
LB       -   - - - - + + ?
FB       - - - - - - + + ?
HB                 - - - -
UB                   - - -
RB                   - - -
Note that this is very much still a work in progress; in the future I might edit it to include additional information.

Re: Some results from Musketeer Chess End-Game Tables

Posted: Sun Dec 22, 2019 10:30 pm
by musketeerchess
Dear HG

This is Simply awesome. This is in deed a necessary knowledge for the engines but also for humans to take the right décisions.

I'd like to participate in this awesome project. Tell me how to generate these EGTB and make the statistics.

I will have access to a strong 64 thread computer the coming new year.

Re: Some results from Musketeer Chess End-Game Tables

Posted: Mon Dec 23, 2019 8:21 am
by H.G.Muller
FairyGen is an EGT generator for pawnless 3, 4 or 5-men EGT with fairy pieces. It is available from my website at http://hgm.nubati.net/fairygen.zip . The package contains separate executables for 3-, 4- or 5-men endings, plus a piecedef.ini file that defines how the various pieces move. Usage is for instance (running it from the Windows command prompt):

4men KBN.K

to generate for Bishop + Knight against bare King. After it is done generating, it gets into a loop where you can probe various positions, or you can terminate the program by typing Ctrl-C (which is what you would do if you are only interested in the statistics). The statistics will be written on a file 'rep2.txt' in the current folder.

The meaning of the piece IDs in the command argument (so K, B and N in the example above) are defined in piecedef.ini, which for instance says

N: 1,2,*
B: 1,1,s*
K: 1,0,* 1,1,*

For each piece this gives a space-separated list of comma-separated triples, where the first two items are the coordinates of the move step, and the (optional) third a string of characters, where '*' means "in all 8 symmetry-equivalent directions", 's' means "sliding", 'c' means "capture only" and 'n' means "non-capture only". Most Musketeer pieces are not predefined.

The executables included in the package all assume 8-fold symmetry of all pieces; the source code is included, though, and by not defining the symbol DIAGSYM and recompiling you will only get executables that assume 4-fold symmetry (as would be needed for Cannon and Fortress). This requires double the memory and time, however. In the move definitions it would also recognize the symbol '+', meaning in all 4-fold-symmetry-equivalent directions. (So that 1,2,+ and 2,1,+ would be "Narrow Knight" and "Wide Knight", each with 4 moves.)

Printed statics looks like:

Code: Select all


WON.wtm    3798926
K capture  1093380
other      2705546
  0.        636982
 10.           116
 11.            78
 12.            74
 13.           448
 14.          2016
 15.          2796
 16.          3786
 17.          2965
 18.          3647
 19.          3484
 20.          6242
 21.         12331
 22.         17130
 23.         21213
 24.         15731
 25.         12478
 26.         13828
 27.         13676
 28.         13492
 29.         19706
 30.         35691
 31.         59076
 32.         84506
 33.         90850
 34.        118442
 35.        162917
 36.        249450
 37.        338456
 38.        453862
 39.        506877
 40.        371235
 41.        138347
 42.         21356
 43.           740
LOST.btm   2797042
fast           268
stalemate     3222
W check     375010
LEGAL      3437246
TOTAL      3812256
This gives the number of positions for each "distance to conversion" (for historic reasons with 10 added, so 10 means "checkmated", 11 means mate in 1, etc.). But I usually just look at the reported totals, won with white to move, and lost with black to move.

Re: Some results from Musketeer Chess End-Game Tables

Posted: Wed Dec 25, 2019 2:46 am
by sam
H.G.Muller wrote:
Sun Dec 22, 2019 8:27 pm
I investigated some pawnless end-games with Musketeer pieces, to determine their drawishness. (Which often plagues pawn-less end-games.) To this end I had FairyGen generate the required End-Game Tables, and interpreted their statistics. For a chess engine it is important to have such knowledge; otherwise it would naively trade KBPP-KN int KB-K, (or KRBP-KRB into KRB-KR), thinking it gained a piece to reach a +3 score.

By definition a major piece is one that can (together with its own King) force checkmate against a bare King from almost any position. (There could be a few tactical positions where the piece gets lost or stalemate is unavoidable.) In orthodox Chess the difference between major (Queen, Rook) and minor (Bishop, Knight) pieces nicely corresponds with piece value (light vs. heavy pieces). In general this need not be the case, however. The ability to force checkmate on a bare King is a very specific one, which only correlates poorly with the general power of a piece. And the value of pieces in chess is mainly determined by how well they support or combat Pawns, as promotion of the latter is usually decisive.

So there can be very valuable minor pieces. E.g. consider a piece that is allowed to leap directly to every square of the board that has same shade as the one it is on. It can never inflict checkmate, not even against a cooperating opponent ('helpmate'), but in the middle game it is more powerful than a Queen. At the other end of the spectrum, a Rook that is restricted to move at most two squares (and thus can reach at most 8 squares in total, the access to half of those can be blocked, and is worth less than a Knight, which can unconditionally reach all its 8 targets), which still has mating potential. There even are major pieces with only 5 moves, hardly worth more than 2 Pawns in the middle game.

From orthodox Chess we know that being a minor ahead in a pawnless end-game is usually not enough to force a win. (While being a Pawn ahead often is a winning advantage.) The same holds for being an 'exchange' ahead, i.e. having one significantly more powerful piece in an otherwise equal (but pawnless) position, provided the value difference is not more than that of a light piece (B or N). A 'super-piece' like Queen will beat all other pieces in a 1-to-1 situation, though.

Musketeer Chess complicates this picture by adding many piece types that are between Rook and Queen in value, and even one (Dragon) that is far stronger than a Queen. Some of those definitely classify as super-pieces, having a value very close to that of a Queen. The value difference between the Musketeer pieces is in general not large enough for one to beat the other in 'single combat', with the exception of the Dragon: the latter combines the powers of Queen and Knight, not enough to beat the Queen and nearly equivalent Chancellor, but good enough to beat all other Musketeer pieces.

The Musketeer Unicorn even is a minor piece, albeit more valuable than a Rook, so it could not even beat a bare King, let alone a supported one. It turns out the Hawk and Unicorn are significantly weaker than the others, and definitely are not superpieces; they cannot subdue even an opposing Bishop or Knight. A Rook is a pretty tough defender, btw, and that a Queen (and thus a Dragon) can beat it is really an exception: no other Musketeer piece can do that. Hawk and Unicorn do much worse as defenders, and loose against the stronger Musketeer pieces Chancellor, Spider and Cannon as well as against Queen/Dragon.

I summarized the 1:1 and bare-King results in the following table, where '+' means the end-game is generally won by the piece on the left, and '-' means it is a general draw (or worse, for the defender). Pieces are given as the first letter of their usual name, except that I used M for Chancellor, because this piece is also known under the name 'Marshal', and C was needed for the Cannon. A '?' means a result that is unclear from the statistics: significantly fewer lost positions, but far more than for a general draw. Probably this means an end-game where in some fortress position for the defender exists from which he can hold out indefinitely, if he succeeds in reaching it. (Could also be a perpetual check.)

Code: Select all

   1 vs 1

             defender
   D Q M S C A E L F H U R B N -
 D - - - ? + ? + + + + + + + + +
 Q   - - - - - - - - + + + + + +
 M     - - - - - - - + + - + + +
 S   - - - - - - - - + + - + + +
 C   - - - - - - ? ? + + - + + +
 A       - - - - - - - - - + + +
 E       - - - - - - - - - + + +
 L       - - - - - - - - - + + +
 F       - - - - - - - - - - + +
 H       - - - - - - - - - - - +
 U       - - - - - - - - - - - -
It turns out that for all those pieces it still holds that an extra N or B is not enough to break the tie between
them. (Except perhaps in the case Spider + Knight vs Spider, where a forced win does in general exist if it were
not for the 50-move rule.) This because after trading the stong pieces, the remaining minor cannot win. Even a small additional advantage of the side with the extra minor is enough to tip the balance in his favor, though.

Code: Select all

   extra Knight

         defender
   D Q M S C A E L F H U R
DN - + + + * + * * * * * *
QN   - - ? + ? + + + * * *
MN     - ? + ? + + + * * +
SN   - - - ? ? + + + * * +
CN   - - - - - + ? ? * * ?
AN       - - - - - 5 + + ?
EN       - - - - ~ - + + ?
LN       - - - - - - + + ?
FN       - - - - - - + + ?
HN         - - - - - - - -
UN         - - - - - - - -
RN         - - - - - - - -

   extra Bishop

         defender
   D Q M S C A E L F H U R
DB - ? ? + * + * * * * * *
QB   - - ? + + + + + * * *
MB     - ? + ? + + + * * +
SB     - ? ? + + + + * * +
CB   - - - - ~ - + + * * +
AB   - - - - - - - - + + +
EB       -   - - ? 5 + + ?
LB       -   - - - - + + ?
FB       - - - - - - + + ?
HB                 - - - -
UB                   - - -
RB                   - - -
Note that this is very much still a work in progress; in the future I might edit it to include additional information.
A very good info for musketeer chess ending.