All three engines prefer promoting the pawn, but tellingly none of them seem to make any progress afterwards. My own plan would actually be 1. Md3 followed by 2. Kc3 with the plan to advance the King to the centre. I haven't tried how well that works though.
Note in the actual game I disabled the counting rule in Bilis.
Bilis 2.1.3 with counting rule enabled.
This is a better approach delaying the promotion to maximize perhaps its overall position.
Another approach could be to award proximity to the enemy King for all slow pieces. This probably would not hurt in any game stage.
I have this for all pieces but not much only a maximum of 6 cp bonus.
Mine is that times the distance of the piece to the enemy king. In the ending, there is an additional term that scales with the maximum distance to the enemy king. This has the effect of bringing all pieces closer, not just a few while keeping a crucial piece far away. I thought I had a quadratic term in there as well, but apparently not. I guess it didn't perform well.
It would probably also help if it knew that when the opponent has 'Bishops', the King is safer in the promotion zone than on its own side of the board. This could be put in the proximity bonus for the Bishops, giving them higher score to face the King with their strong side.
I have already this but only 4 cp if the bishops faces the opp king. When opp king is at the back no more penalties, it seems the penalty should be given in this case because the bishop is reduced to a queen especially in end game where there are only less materials left.
Yes. I have the penalty set at 30, which is probably modest still (especially in the end game).
It probably doesn't matter too much how large the bonuses are, as long as they have the right relative magnitude. The benefit of forcing the enemy King to a corner must be larger than the penalty for four own pieces leaving the center to drive that King there (e.g. KQQQK or KNQQK). So with just centralizing PST the values should be about 5 times larger for King as it is for the other pieces.
This, however, still causes a problem if both Kings use the same PST, because then the attacking King will be glued to the center. So it will just trap the losing King in a corner with the aid of the light pieces, but cannot mate it there without help of the King, which it will refuse to involve. So it is really important to distinguish the attacking and the defending King. Fairy-Max 5.0 only does this for a bare King in the root (which then gets its centralization weight multiplied by 5).
Note that having a term dependent on the distance between the Kings also needs to make this distinction to determine its sign: the attacking King wants to minimize the distance, the defending King wants to maximize it. So one piece of knowledge an engine should have is which material combinations should be considered winning.
hgm wrote:
Note that having a term dependent on the distance between the Kings also needs to make this distinction to determine its sign: the attacking King wants to minimize the distance, the defending King wants to maximize it. So one piece of knowledge an engine should have is which material combinations should be considered winning.
Indeed. However, I think that having a material advantage is a sufficient criterion for deciding that (not entirely sure that's true, but I think it's close enough if you take care of penalising a gaggle of same-colour Queens).
hgm wrote:It probably doesn't matter too much how large the bonuses are, as long as they have the right relative magnitude. The benefit of forcing the enemy King to a corner must be larger than the penalty for four own pieces leaving the center to drive that King there (e.g. KQQQK or KNQQK). So with just centralizing PST the values should be about 5 times larger for King as it is for the other pieces.
Agreed I am using now the value of rook as the maximum penalty when the opp king is at the corner and slightly lower values in other squares at the edge of the board.
This, however, still causes a problem if both Kings use the same PST, because then the attacking King will be glued to the center. So it will just trap the losing King in a corner with the aid of the light pieces, but cannot mate it there without help of the King, which it will refuse to involve. So it is really important to distinguish the attacking and the defending King. Fairy-Max 5.0 only does this for a bare King in the root (which then gets its centralization weight multiplied by 5).
I am experimenting on a king where it only get this big pst penalty depending on the mating potential of the opponent. Say KR-K, the black king will get this big penalty. KNQ-KQM, both sides will get this big pst penalty because both materials are capable of delivering mate when one's king is in the edge or corner. This seems to work fine in self test so far.
Another thing to experiment is by the presence of opp rooks. If opp has no rook (or even 1 rook) then use the big pst penalty as the general king pst for ending. So both sides will attempt to centralize its king and drive its opp king to the edge of the board.
Another approach could be to award proximity to the enemy King for all slow pieces. This probably would not hurt in any game stage.
I have this for all pieces but not much only a maximum of 6 cp bonus.
Mine is that times the distance of the piece to the enemy king. In the ending, there is an additional term that scales with the maximum distance to the enemy king. This has the effect of bringing all pieces closer, not just a few while keeping a crucial piece far away. I thought I had a quadratic term in there as well, but apparently not. I guess it didn't perform well.
One reason of not giving a higher penalty is that a king can actually trapped a bishop or a queen under some conditions. But evaluating this with consideration of overall proximity is a good one.
Ferdy wrote:I am experimenting on a king where it only get this big pst penalty depending on the mating potential of the opponent. Say KR-K, the black king will get this big penalty. KNQ-KQM, both sides will get this big pst penalty because both materials are capable of delivering mate when one's king is in the edge or corner. This seems to work fine in self test so far.
Ferdy wrote:There is a big difference between an engine that knows the counting rule and the engine that does not know it.
I don't see how knowing the counts could help other than in a very approximate way. Unless in tablebases, of course, where you know the exact DTM in all positions. E.g. if you can convert into KBQK from KBPKP, knowing that you get 44 - 4 = 40 moves to win it is no help if you don't know whether the position has DTM = 39 or 41. There is no way the engine would be able to calculate upto the checkmate, at such DTM (where in addition the conversion might occur close to the leaves). There is no heuristic that can give you the DTM accurate to a single move; if there was, tablebases would never be needed. At best you can hope for a quite inaccurate estimate of the DTM, and this would already be pretty complex. And even then knowing it is likely a won position is not worth much if the engine is not capable of DTM-perfect play. So the estimate of the likelihood that a given position can in practice be won must be extracted from empirically determined game length (against perfect play?) when the engine tries to win the game under its own power. Which likely is TC dependent.
E.g. in the first game against Alisa 98. b6=M+ is probably a blunder, because with two 'Bishops' you only get 22-7 = 15 moves to win KBBQQKR, while the latter (if it is won at all) probably takes far longer. If the engine would have recognized KBBQQKR as drawish, it would probably have refrained from promoting, and thus as long as it wants to first corner the enemy King in KBBQPKR as much as it can, and only promote when it gets the mate within the horizon.
BTW, for computer Makruk we really need an equivalent to the 50-move rule, or some games could take thousands of years. I propose to supplemet the counting rules with the rule that 64 reversible moves make a draw even when there still are Pawns.
About 88.6% of all KBQK positions with white to move is a (possibly cursed) win. This is quite low for a generally won end-game. The reason is that there are many positions where B or Q can be chased by the bare K to an edge, where it is then captured, if they start next to each other, and the B or Q cannot seek shelter with its own King. The average DTM is 32 moves, the max DTM is 57. The counting rule gives you only 40 moves to win, only about 7% of the won positions requires a longer win.
KBBK is another matter, though. 90.8% of the wtm positions is a (cursed) win. But the average DTM is 25.2, and the counting rule gives you only 18 moves. Only a minor fraction of the positions is a real win now.