This is a piece-square-like term, not dependent on the relative location of the Kings, but just on their own. It could have been put in the normal PST for Kings. BTW, centr_table2 is just what Fairy-Max uses as PST for all pieces that benefit from centralization. But I am surprised that you weight the attacking King more (3 vs 1). In Fairy-Max I do just the opposite, the weight of the attacking King is always 1, and that of the bare King increases from 1 to 10 over 50 moves.Evert wrote:where centre_table2 just holds the squared-distance to the centre:Code: Select all
eval += centre_table2[defending king] - 3*centre_table2[attacking king];Code: Select all
centre_table2[sqr] = offset - (rank-RANKS/2)*(rank-RANKS/2-1) - (file-FILES/2)*(file-FILES/2-1);
The original idea of the quadratic table was that it would pay for the attacking King to step out of the center in order to prevent the defending King from stepping towards the center. Basically two Kings in opposition act like a dipole in an inhomogeneous field, which is pulled to the region of maximum field gradient (the board edge) if it is oriented such that the defending King is nearest to the edge. This was fine for the Kings, (and in KRK, where the Rook is neutral), but when in addition you would have to use 3 other weak pieces to confine it, the pull on the total charge back to the center overwhelmed the pull on the dipole towards the edge. On a large board this would need at least a factor 4 for the bare King in KFFFK.
BTW, it is not trivial to extract from a tablebase in which corners you can force mate. My idea was to simply score all mates with the King in quadrants of one color as draws, to see if it would still be a general win by forcing mate in the remaining corners. But sometimes you need the threat of an unforcable mate in the wrong corner as an aid in driving the bare King to the other corner. E.g. in KSFK the assymmetry of the Silver makes mate in the back-rank corners impossible. But when the bare King takes shelter in a1 or h1, you have grave difficulty driving it out. E.g. to prevent it from stepping back from h2 to h1 you cannot put a Ferz on g2, as it would also attack h3, and thus cause stalemate.
But putting the Silver on h4 would refute 1... Kh1? with 2. Fg2+ Kh2 3. Sg3#:
[d]8/8/8/8/5B2/5Q2/5K1k/8 b
So black is forced to play 1... Kh3 (followed by 2. Kg1) here. But if the mate in 2 after 1... Kh1? would have been set a draw because it is in the wrong quadrant, black would not be smoked out of the corner by this threat.
So I guess what you have to look for is whether there are any quick forced mates with the bare King in that quadrant. E.g. if there are no forced mate in 3 in that quadrant, any mate in N with N > 3 cannot end in that corner, as to get to the mate you would necessarily have to pass through a mate in 3, and for mates in 3 with the bare King outside the quadrant there would not be enough time to move back to the corresponding corner even if it was a help mate.
