6-men tablebase wanted

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

6-men tablebase wanted

Post by hgm »

Does there exist an open-source EGT generator that could easily handle the Makruk end-game of King + Silver General + 2 Ferz versus King + Knight? (Ferz is a piece that can only step 1 square diagonally, Silver General can also do that, but in addition step one square straight forward.) One nasty aspect ofthis end-game is that the Silver General is not a fully symmetric piece, but breaks diagonal and vertical-flip symmetry. So that only horizontal flips are still valid symmetry operations. This is similar to end-games with Pawns, but unlike the Pawn the Silver is a reversible piece that can always return to any board square, so that the EGT cannot be factorized into many much smaller P-slices that can each be built separately, by doing it in a certain order (following the irreversible moves backwards).
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: 6-men tablebase wanted

Post by Evert »

I seem to recall that the Syzygy generator can be generalised to non-orthodox pieces relatively easily, but I've never tried to actually do that, so there are probably some pit-falls I didn't consider.

Other than that - I didn't find very many open-source table-base generators when I was looking for them, sadly. My own is still buggy when it has to consider multiple pieces for black (I'm still not sure why though), and it wouldn't be able to handle 6 men tables anyway (due to the memory requirement). It's also more geared to on-the-fly generation, but that is too slow for 6 men.
User avatar
hgm
Posts: 27809
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 6-men tablebase wanted

Post by hgm »

KSFK, to which KSFFKN can convert, is a very tricky end-game as well. (Fortunately I do have a symmetryless generator for 3+1 men.) No two corners are equivalent, as the Ferz breaks the color symmetry, and the Silver the forward-backward symmetry. Because of the forwardness of the Silver, checkmating on the 1st rank is very difficult for white: In one corner there is only a mate in 2, like with two Ferzes. In the other (of the Ferz color) there are very long mates, but only of the bare King is already trapped in the corner and the orthogonally adjacent squares. If it can reach any other square you cannot force it to go back there (except that the actual mate can occur on a3). So the bare King has to be trapped by King + one other piece on 2 squares, and then you can approach the other piece at leisure,to set up the following position:

[d]8/8/8/8/1QB5/8/2K5/k7 w
1. Fc3 Ka2 2. Sb3+ Ka3 3. Fb2#

The problem, however, is that the tempo can be wrong, and the black King is on a2 instead of a1. Neither the Ferz nor Silver can triangulate. So you have to do it with the King, without allowing the black King to escape from a1,a2,b1, and without allowing it to triangulate after you did. This turns out to be excessively difficult, as the normal trick of playing Kc2-b3 to flip the position around the diagonal does not work here, as 1st rank and a-file are not equivalent. It takes about 15 moves to do that from the shown position, when black would have had the move there!

You need the threat of these mates to force the King out of those corners, however. Without them these would be fortress draws. But now in the position
[d]8/8/8/8/5Q2/5B2/5K1k/8 b
black cannot afford to step back to h1 (1... Kh1 2. Sg2+ Kh2 3. Fg3#), so he must play 1... Kh3 2. Sg2+ Kg4 3. Ke3, to find himselfon the dangerous side of the Silver.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: 6-men tablebase wanted

Post by Evert »

KSFK is a very tricky ending, for which I do build a tablebase. It's apparently very hard to play correctly otherwise.

If I have some time I should really go back and do some tablebase stuff...
User avatar
hgm
Posts: 27809
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 6-men tablebase wanted

Post by hgm »

I guess it is really one of the most minimal mates you can have. Two Ferzes is a dead draw, and compared to that you have only one extra move on one of the pieces now. So you have hardly any control as to where the bare King is going, and must live from the fact that no matter which direction it choses to run, the noose will be tied a little tighter after that. This quite unlike KBNK, where you can keep the bare King confined along the endge on boards of arbitrary size, because you really have a lot of excess power there. Even with two 8-leapers it is a party compared to a 4-leaper + 5-leaper...