Makruk engines and rating list

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Makruk engines and rating list

Post by Ferdy »

hgm wrote:Note that HaChu also plays Makruk. Very poorly, no doubt, because it was never tuned or even tested for it. But it was close enough to (dropless) Shogi variants to also program the rules in it. A Windows binary for HaChu can be found in the WinBoard Shogi Varinants package.
One forfeit from HaChu.

Code: Select all

[Event "MCA T2 Bullet"]
[Site "i7-2600K"]
[Date "2017.02.18"]
[Round "32"]
[White "HaChu 0.21b"]
[Black "PyChess 0.12.4"]
[Result "0-1"]
[TimeControl "120+1"]
[Variant "makruk"]
[Annotator "2. +1.38   1... +0.12"]

1. c4 Ne7 {+0.12/5 4} 2. Nc3 {+1.38/8 0.8} Nf5 {+0.09/4 4} 3. Mf2
{+1.52/8 0.8} Nd7 {+0.06/4 1.9} 4. Nge2 {+1.56/7 1.1} Nc5 {+0.29/4 1.7} 5.
Sc2 {+1.59/7 1.0} Kd7 {+0.38/3 4} 6. Nf4 {+2.20/8 2.4} Rg8 {+0.27/4 4} 7.
b4 {+2.49/8 1.2} e5 {+0.19/4 3} 8. Ng2 {+2.67/8 0.9} Ne6 {+0.05/4 2.1} 9.
Se2 {+2.16/8 4} Se7 {+0.35/3 4} 10. Na4 {+2.15/8 1.5} Kc7 {+0.09/4 4} 11.
Ke1 {+2.09/8 1.9} b5 {+0.26/4 1.6} 12. Nc3 {+2.05/9 4} Kb8 {+0.30/4 3} 13.
Kd2 {+2.09/8 2.4} bxc4 {+0.56/4 3} 14. dxc4 {+2.22/8 2.4} Re8 {+0.46/4 1.9}
15. Na4 {+2.30/9 5} Ng5 {+0.46/4 2.7} 16. g4 {+2.78/8 1.8} Ng7 {+0.36/4 4}
17. Nh4 {+2.79/9 3} a5 {-0.33/4 2.8} 18. Scd3 {+3.12/8 1.6} axb4
{-0.04/4 3} 19. axb4 {+3.24/9 2.2} N7e6 {-0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 {+7.81/8 0.9}
Rd6 {-9.41/4 3} 49. Rh1 {+7.78/8 1.1} Ng5 {-9.63/4 2.9} 50. Mg3
{+7.96/9 2.3} Ka8 {-9.51/4 2.7} 51. f4 {+8.35/9 2.1} exf4 {-11.56/4 2.6}
52. Mxf4 {+8.16/9 2.5} Ne6 {-11.46/4 2.5} 53. Rh7 {+8.34/8 0.9} Sg8
{-8.96/4 2.3} 54. Rh8 {+8.52/9 1.4} Sf7 {-11.59/4 2.3} 55. Rd1
{+8.98/9 2.1} Rxd1 {-13.09/5 1.6} 56. Kxd1 {+8.87/10 1.0} Nc7
{-14.83/5 1.2} 57. Rxd8+ {+8.89/10 1.7} Kb7 {-14.91/5 1.0} 58. Kd2
{+8.78/10 2.2} c5 {-14.92/4 0.7} 59. Rf8 {+9.15/9 0.9} Se8 {-14.82/5 1.2}
60. Kc1 {+9.16/9 1.7} c4 {-14.69/5 1.4} 61. Kc2 {+9.07/9 1.0} c3=M
{-14.81/4 2.2} 62. Kxc3 {+9.26/9 1.0} Nb5+ {-15.01/4 1.9} 63. Kd3
{+9.82/10 1.1} Nc7 {-16.39/4 0.7} 64. Sxf6 {+10.33/9 0.9} Ka7
{-16.53/4 1.4} 65. g5 {+10.61/9 1.0} Sd7 {-16.53/4 1.5} 66. Ke2
{+10.35/8 0.9} Se8 {-16.48/4 0.5} 67. g6=. {+10.60/9 1.1} Ka6
{-16.69/4 1.4}
{Xboard: Forfeit due to invalid move: g6g7m (g6g7 via `0, `0) res=24} 0-1
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Tournament Nr 2

Post by Ferdy »

A bullet TC gauntlet of SamChess and Hachu.

Code: Select all

Results from file mca-t2-bullet.pgn:

No. Name                Win Draw Loss Unf.  Score Games       %
---------------------------------------------------------------
  1 Bilis v1.0          +19   =1   -0   *0   19.5    20   97.5%
  2 SamChess-MK 1.0 #1  +14  =10  -26   *0   19.0    50   38.0%
  3 NebiyuChess_1.45    +16   =3   -1   *0   17.5    20   87.5%
  4 Fairy-Max 5.0b      +13   =5   -2   *0   15.5    20   77.5%
  5 HaChu 0.21b         +11   =6  -33   *0   14.0    50   28.0%
  6 Sjaak II 1.4.1      +10   =7   -3   *0   13.5    20   67.5%
  7 PyChess 0.12.4       +1   =0  -19   *0    1.0    20    5.0%

Total Games:     100
White Wins:       42 (42.0%)
Black Wins:       42 (42.0%)
Draws:            16 (16.0%)
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Makruk engines and rating list

Post by hgm »

Ferdy wrote: One forfeit from HaChu.
Interesting. It seems to think it is allowed to defer promotion (67. g6=), and then promote later.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

A match with the strongest makruk AI

Post by Ferdy »

Bilis is run on 1 core and ponder off. TC is set at game in 30 minutes.
Alisa is run on 2 cores and ponder on. Level Expert thinking at approximately 30s/move, on its own GUI.
Alisa Levels: Master, Expert, Skilled, intermediate, Adept, Disciple, Apprentice, Beginner, Children and Monkey :).
It seems like the level differs only on thinking time.

The ending favors Bilis but could not finish off Alisa due to perhaps missing mating knowledge.

I just call it a draw and stop the game. It seems like Alisa knows very well the counting rules.

Code: Select all

[Event "Makruk match"]
[Site "i7-2600K"]
[Date "2017.02.18"]
[Round "1"]
[White "Bilis v2.1.3"]
[Black "Alisa 2.0 2_threads"]
[Result "1/2-1/2"]
[TimeControl "1800"]
[Variant "makruk"]
[Annotator "1. +0.05"]

1. e4 {+0.05/23} Sd7 2. Se2 {+0.05/24 54} c5 3. Se3 {+0.07/24 23} Nc6 4. d4
{+0.11/23 27} f5 5. Sc2 {+0.10/23 17} Nf6 6. Ne2 {+0.20/22 14} Se7 7. Mf2
{+0.23/23 34} Rc8 8. Sd3 {+0.33/19 16} Kf7 9. g4 {+0.23/22 35} fxe4 10.
fxe4 {+0.27/25 21} Rf8 11. Mg3 {+0.44/23 21} g5 12. Nd2 {+0.48/21 28} Kg6
13. Rf1 {+0.56/18 12} Mc7 14. Kc2 {+0.53/17 15} b5 15. Rac1 {+0.47/16 17}
h5 16. gxh5+ {+0.55/18 14} Kxh5 17. Rh1 {+0.54/19 14} cxd4 18. cxd4
{+0.70/21 9} Kg6 19. Kb2 {+0.82/19 14} Rh8 20. h4 {+0.87/22 27} gxh4 21.
Mxh4 {+0.92/22 16} Kf7 22. Mg5 {+0.97/22 15} Rxh1 23. Rxh1 {+0.90/21 4} Ne8
24. d5 {+1.04/19 13} Ne5 25. Nf4 {+1.04/19 14} Kg7 26. Sdd4 {+0.97/19 13}
Ng6 27. dxe6=M {+0.76/20 21} Sexe6 28. Nh5+ {+0.77/19 12} Kg8 29. b4
{+0.70/21 12} Mb6 30. Rg1 {+0.68/23 36} Se5 31. Sd5 {+0.89/21 11} Kf7 32.
Mf4 {+0.78/21 12} Nf6 33. Mxe5 {+1.01/20 12} Nxh5 34. Sxd6 {+1.04/22 18}
Rh8 35. Rxg6 {+1.26/21 23} Kxg6 36. Sxd7 {+1.30/21 6} Rh6 37. Sc6
{+1.36/20 11} Kf7 38. Sb7 {+1.39/21 11} Mc7 39. Nb3 {+1.44/20 11} Rb6 40.
Na5 {+1.56/20 16} Rh6 41. Nc6 {+1.59/20 11} Ng7 42. Sd4 {+1.80/19 10} Ne6
43. Sd5 {+1.72/20 8} Rh2+ 44. Kc1 {+2.27/20 10} Rh1+ 45. Kd2 {+2.35/20 10}
Rh2+ 46. Ke1 {+2.18/21 23} Rh1+ 47. Kf2 {+2.26/20 10} Rh2+ 48. Kf1
{+2.30/19 10} Ng5 49. Sxa6 {+2.21/20 8} Nf3 50. Mf4 {+2.21/20 8} Kf6 51.
Me3 {+2.23/19 10} Ra2 52. Sxb5 {+2.27/19 9} Nh2+ 53. Ke1 {+2.29/20 9} Nf3+
54. Kd1 {+2.26/19 9} Rxa3 55. Ke2 {+2.33/20 38} Ng1+ 56. Ke1 {+2.35/17 9}
Nf3+ 57. Kf2 {+2.36/19 7} Ne5 58. Md4 {+2.33/18 9} Nd3+ 59. Ke2
{+2.36/17 8} Nf4+ 60. Kd1 {+2.37/18 15} Kg5 61. Sbc4 {+2.48/17 7} Mb6 62.
e5 {+2.50/17 8} Kf5 63. Ne7+ {+2.40/17 12} Kg5 64. b5 {+2.51/18 18} Rh3 65.
Kd2 {+2.42/18 18} Rh2+ 66. Ke3 {+2.57/18 12} Rh7 67. Nc6 {+2.63/18 15} Kf5
68. Se4+ {+2.54/17 7} Kg5 69. Nd8 {+2.54/16 7} Rh3+ 70. Sf3 {+2.71/18 7}
Kf5 71. Nf7 {+2.66/19 16} Mc7 72. Nh6+ {+2.77/18 7} Ke6 73. Ke4
{+2.86/19 7} Rxh6 74. Sxf4 {+2.87/18 7} Rh1 75. Sf5+ {+2.90/18 12} Kd7 76.
Mc5 {+2.91/20 22} Rb1 77. e6=M+ {+2.90/19 6} Kc8 78. Kd3 {+2.89/20 6} Kb7
79. Kc2 {+2.90/21 15} Re1 80. Md4 {+2.90/21 6} Kb6 81. Kd2 {+2.90/18 6} Ra1
82. Md5 {+2.82/18 7} Md6 83. Me4 {+2.88/18 13} Rh1 84. Se6 {+2.82/18 6} Rg1
85. Sed5 {+2.90/18 6} Mc7 86. Sc6 {+2.90/18 5} Md6 87. Md3 {+2.90/19 8} Rh1
88. S6d5 {+2.92/19 6} Mc7 89. Mc5+ {+2.91/18 5} Ka7 90. Me4 {+2.91/19 5}
Rh3 91. Md4 {+2.92/19 5} Mb6 92. Sd6 {+2.92/19 5} Rh4 93. Sd5 {+2.92/19 5}
Rh1 94. Mc5 {+3.14/19 5} Rh3 95. Mxb6+ {+3.16/20 7} Kxb6 96. Sc4
{+3.19/19 2.8} Rg3 97. Sdc5+ {+3.22/16 5} Kc7 98. b6=M+ {+3.24/16 5} Kd7
99. Sd5 {+3.28/16 5} Ke7 100. Scd6+ {+3.25/19 8} Kf6 101. Mc5 {+3.24/18 5}
Rb3 102. Md4 {+3.25/17 5} Kg5 103. Se5 {+3.26/18 5} Rb1 104. Me3
{+3.26/18 4} Rb3 105. Sde6 {+3.26/17 5} Kh4 106. Md4 {+3.26/18 5} Kg5 107.
Sf5 {+3.26/19 10} Rb2+ 108. Ke3 {+3.27/18 5} Rb3+ 109. Kf2 {+3.28/18 4} Kh4
110. Mc5 {+3.26/17 4} Kg5 111. Ke2 {+3.25/18 5} Rb2+ 112. Kd3 {+3.25/18 4}
Rb1 113. Md6 {+3.25/17 10} Rb3+ 114. Kc4 {+3.26/18 4} Ra3 115. Sfe6
{+3.25/18 9} Ra1 116. Sd5 {+3.24/18 9} Rd1 117. Mc5 {+3.24/17 4} Ra1 118.
Md4 {+3.25/18 5} Re1 119. Kd3 {+3.26/18 4} Rd1+ 120. Ke3 {+3.26/18 4} Re1+
121. Kf2 {+3.26/18 4} Rc1 122. Me3 {+3.26/18 4} Kg4 123. Mf4 {+3.25/18 8}
Rc2+ 124. Ke3 {+3.25/18 4} Rc3+ 125. Kd2 {+3.23/20 10} Ra3 126. Ke2
{+3.23/18 3} Kh3 127. Sde6 {+3.24/19 6} Kg2 128. Sf5 {+3.23/18 3} Ra2+ 129.
Kd3 {+3.21/17 3} Ra3+ 130. Kc4 {+3.21/18 2.7} Ra4+ 131. Kb3 {+3.21/17 3}
Ra1 132. Kb2 {+3.19/19 7} Ra4 133. Kc3 {+3.20/18 3} Kf2 134. Kd3
{+3.20/17 3} Ra3+ 135. Kc4 {+3.20/18 3} Ra4+ 136. Kb5 {+3.20/17 3} Ra7 137.
Kb4 {+3.19/17 3}
{Adjudicated} 1/2-1/2
[d]8/r7/8/4BB2/1K2QQ2/8/5k2/8 b 78 137
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A match with the strongest makruk AI

Post by hgm »

One of the problems when you have to checkmate with a large horde of very weak pieces is that the normal evaluation draws these pieces towards the center. But to force checkmate, several of them will have to leave the center. And they will have to leave it for many moves, as these slow pieces take a long time to get anywhere. If this incurs an eval penalty, null moves will anihilate most of the winning lines.

It would be interesting to try this position with neutral PST for the 'Queens' and 'Bishops', and a lot of penalty for black when his King gets cornered, to see if it can find the mate then. If that helps, it could be an idea to recognize theoretically won material combinations in the root, and switch to such a PST.

Another approach could be to award proximity to the enemy King for all slow pieces. This probably would not hurt in any game stage.

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.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: A match with the strongest makruk AI

Post by Evert »

hgm wrote: Another approach could be to award proximity to the enemy King for all slow pieces. This probably would not hurt in any game stage.

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 both those terms, but this is still a very difficult ending because of spite checks by the defending rook, which can also cut-off your own king. Ideally, you want to use one of your Queens to defend the king, which can then help in driving the defending king towards the side of the board. Preferably without letting it get behind of the attacking Bishops first. This seems pretty hard to do.

The ending does appear to be won for White, but a large fraction of play-outs from the earlier position [D]8/2k5/8/1PB5/2B1Q3/6r1/3K4/8 w 4 98
still end up as draws (my own Makruk engine and the released version of Bilis taking alternate turns at playing black and white; the release version of Bilis has a handicap in that it considers KMMK to be won rather than drawn). There's definitely something to be gained from special knowledge here (but I don't think counting rules make the difference).
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: A match with the strongest makruk AI

Post by Ferdy »

hgm wrote:One of the problems when you have to checkmate with a large horde of very weak pieces is that the normal evaluation draws these pieces towards the center. But to force checkmate, several of them will have to leave the center. And they will have to leave it for many moves, as these slow pieces take a long time to get anywhere. If this incurs an eval penalty, null moves will anihilate most of the winning lines.

It would be interesting to try this position with neutral PST for the 'Queens' and 'Bishops', and a lot of penalty for black when his King gets cornered, to see if it can find the mate then. If that helps, it could be an idea to recognize theoretically won material combinations in the root, and switch to such a PST.
My bishop pst is not that heavy and just an estimate. But this indeed is one of the reasons why it would not leave the center easily. I already have this penalty for the king close or at the edge or corner of the board, but unfortunately the penalty is only 16 cp max :). And also have this king-king proximity bonus but again only small value. I thought the search would be able to find it. I noticed Bilis has still around 4 minutes left on the clock and using,
movetime = timeleft/100 = 2.4 sec/move, whereas alisa is thinking 30s/move.
This is one variant I observe where you have to preserve time for the ending grind.

Code: Select all

const int bishop_pcsq_op_tab[] = {
	-6,  -2,  -2,  -2,  -2,  -2,  -2,  -6,
	-5,   2,   3,   4,   4,   3,   2,  -5,
	-4,   2,   5,   8,   8,   5,   2,  -4,
	-3,  -1,   6,   9,   9,   6,  -1,  -3,
	-4,  -2,   6,   8,   8,   6,  -2,  -4,
	-6,  -4,  -2,   4,   4,  -2,  -4,  -6,
	-8,  -6,  -4,  -2,  -2,  -4,  -6,  -8,
   -18, -14, -12,  -8,  -8, -12, -14, -18,
};

const int bishop_pcsq_en_tab[] = {
   -20, -16, -14, -10, -10, -14, -16, -20,
   -10,  -8,  -6,  -4,  -4,  -4,  -8, -10,
	-6,  -4,  -2,   4,   4,  -2,  -4,  -6,
	-6,  -4,   6,   8,   8,   6,  -4,  -6,
	-6,  -4,   6,   8,   8,   6,  -4,  -6,
	-6,  -4,  -2,   4,   4,  -2,  -4,  -6,
   -10,  -8,  -6,  -4,  -4,  -4,  -8, -10,
   -20, -16, -14, -10, -10, -14, -16, -20,
};
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.
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.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: A match with the strongest makruk AI

Post by Evert »

Evert wrote:[D]8/2k5/8/1PB5/2B1Q3/6r1/3K4/8 w 4 98
Analysis:

Code: Select all

Makruk engine:
 20	+2.83 	19.4M  	1:11.06	1.  b6M  Kd7   2. Sd3   Ke6   3. Kc3   Rg7   4. Kc4   Rh7   5. Sdd4  Rh1   6. Sd5   Kf6   7. Kd4   Rc1   8. Scd6  Rd1   9. Md3   Kg7   10. Mc7   Kg8   11. Se6   Kf8   12. Sde7  Kg8    
 19	+2.76 	9.78M  	0:35.44	1.  b6M  Kb8   2. Sd3   Kc8   3. Kc3   Kd7   4. Kd4   Rg5   5. Sc4   Ke8   6. Sd5   Kf8   7. Scd6  Kg8   8. Se5   Rg1   9. Mf5   Rc1   10. Sde6  Kf8    
 18	+2.76 	5.27M  	0:18.32	1.  b6M  Kd7   2. Sd3   Rh3   3. Kc3   Rh5   4. Kd4   Ke7   5. Sc4   Ke8   6. Sd5   Kf8   7. Scd6  Kg8   8. Mc7   Rg5   9. Se5   Rg7   10. Sed6   
 17	+2.73 	4.08M  	0:14.45	1.  b6M  Kd7   2. Sd3   Kd8   3. Kc3   Rg5   4. Kd4   Ke7   5. Sc4   Ke8   6. Sd5   Rh5   7. Scd6  Kf8   8. Mc5   Ke8   9. Se6   Kf8    
 16	+2.69 	2.60M  	0:09.42	1.  b6M  Kb7   2. Md3   Kc8   3. Kc3   Rg4   4. Kb4   Kd7   5. Kb5   Ke6   6. Kc6   Kf6   7. Sd5   Kg6   8. Kd7   Rg3   9. Me4    
 15	+2.73 	1.44M  	0:05.52	1.  b6M  Kd7   2. Sd3   Ke8   3. Kc3   Rh3   4. Kd4   Rh5   5. Md5   Kf8   6. Se4   Ke8   7. Sd6   Kf8   8. Mc7   Rh3    
 14	+2.69 	880003	0:03.48	1.  b6M  Kd7   2. Sd3   Ke8   3. Kc3   Rg5   4. Kd4   Rh5   5. Md5   Rf5   6. Sc6   Rf3   7. Mc7   Rh3   8. Me6    
 13	+2.65 	494728	0:02.12	1.  b6M  Kd7   2. Sd3   Kd8   3. Kc3   Rg5   4. Kd4   Rh5   5. Md5   Ke8   6. Se4   Kf8   7. Sd6   Rh3    
 12	+2.66 	289888	0:01.33	1.  b6M  Kc8   2. Sd3   Rg5   3. Ke3   Kd8   4. Kd4   Rh5   5. Sc4   Ke8   6. Md5   Rf5   7. Sd6    
 11	+2.61 	146109	0:00.70	1.  b6M  Kd7   2. Sd3   Rh3   3. Kc3   Rh5   4. Kd4   Kd8   5. Sc4   Ke8   6. Sd5   Rh3    
 10	+2.62 	96684  	0:00.49	1.  b6M  Kd7   2. Sd3   Ke8   3. Kc3   Rg5   4. Kd4   Kd8   5. Sc6   Rh5   6. Md5    
  9	+2.56 	49969  	0:00.27	1.  b6M  Kd7   2. Sd3   Ke8   3. Kc3   Rh3   4. Kd4   Rh5   5. Sc4   Rh3    
  8	+2.60 	39269  	0:00.22	1.  b6M  Kd7   2. Sd3   Ke8   3. Kc3   Rg5   4. Kd4   Rh5   5. Md5    
  7	+2.48 	17310  	0:00.11	1.  b6M  Kd7   2. Sd3   Kd8   3. Kc3   Rg7   4. Kd4   Ke8    
  6	+2.40 	10821  	0:00.08	1.  b6M  Kd8   2. Sd3   Rg7   3. Kc3   Rd7   4. Kc4    
  5	+1.64 	2841    	0:00.02	1.  b6M  Kd8   2. Sd5   Ra3   3. Se6   Ra1    
  4	+1.65 	1187    	0:00.01	1.  b6M  Kd8   2. Sd5   Rh3   3. Scd6   
  3	+1.62 	323      	0:00.00	1.  b6M  Kd8   2. Sd5   Rg7    
  2	+1.66 	65        	0:00.00	1.  b6M  Kd8   2. Sd5    

Code: Select all

Bilis:
 18	+4.48 	221.8M	2:17.17	b5b6m c7d7 c4d5 g3g2 d2e3 d7e7 c5d6 e7f6 b6c5 g2g1 e3d2 g1b1 c5d4 b1g1 d6e5 f6g5 d2e2 g1h1 d5e6 g5h5 d4e3 h1a1 e6d5 a1b1 (2.3) 
 17	+4.47 	97.0M  	1:00.70	b5b6m c7d7 c4d5 g3g2 d2e3 d7e7 c5d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5d6 g1e1 e3f2 e1h1 f2e3 d8e8 (2.0) 
  7	+4.50 	24205  	0:00.02	b5b6m c7d8 c4d5 g3g2 d2e3 g2g1 c5d6 g1e1 e3f2 e1b1 b6c5 (2.0) 
  6	+4.44 	10280  	0:00.01	b5b6m c7d8 c4d5 g3g2 d2e3 g2g1 c5d6 g1e1 e3d4 (1.7) 
  5	+4.45 	4726    	0:00.00	b5b6m c7d8 c4d5 g3g8 c5d6 g8g1 (1.5) 
  4	+4.42 	1658    	0:00.00	b5b6m c7d7 c4d5 g3g2 d2e3 d7d8 (1.3) 
  3	+4.45 	664      	0:00.00	b5b6m c7d7 c4d5 g3g1 (1.5) 
  2	+4.58 	223      	0:00.00	b5b6m c7d7 c5d4 (1.0) 
  1	+4.46 	61        	0:00.00	b5b6m c7d8 

Code: Select all

SjaakII:
 25	+3.79 	37.5M  	1:23.15	1.  b6M Kd7 2. Sd5 Ke7 3. Scd6 Kf7 4. Se5 Kg6 5. Sf4 Ra3 6. Mc5 Kh5 7. Se5 Ra5 8. Sed6 Ra6 9. Sd7 Ra5 10. Sd6 Ra3 11. Se6 Rb3 12. Sd5 Kh4 13. Se5 Kg3 14. Mf5 
 24	+3.79 	20.7M  	0:46.60	1.  b6M Kd7 2. Sd5 Ke7 3. Scd6 Kf7 4. Se5 Kg6 5. Sf4 Ra3 6. Mc5 Kh5 7. Se5 Kg4 8. Ke2 Ra5 9. Sdd6 Ra3 10. Md4 Kh3 11. Md3 Kg3 12. Ke3 Kg2 13. Sf4 Rc3 
 23	+3.79 	18.9M  	0:42.66	1.  b6M Kd7 2. Sd5 Ke7 3. Scd6 Kf7 4. Se5 Kg6 5. Sf4 Ra3 6. Mc5 Kh5 7. Se5 Rg3 8. Sdd6 Kg4 9. Md4 Kh4 10. Me3 Rg6 11. Se7 Rg5 12. S5f6 Rc5 13. Kd3 
 22	+3.78 	15.7M  	0:35.86	1.  b6M Kd7 2. Sd5 Ke7 3. Scd6 Kf7 4. Se5 Kg6 5. Sf4 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14	+3.82 	383561	0:01.05	1.  b6M Kd8 2. Sd6 Ke8 3. Sd5 Kf7 4. Se5 Kg6 5. Mc5 Kh5 6. Md6 Kh4 7. Mf5 Kh3 8. Sf4 
 13	+3.84 	302774	0:00.85	1.  b6M Kd8 2. Sd6 Ke8 3. Sd5 Kf7 4. Se5 Kg6 5. Sf4 Rb3 6. Mf5 Kh5 7. Mc5 Kh4 8. Md6 
 12	+3.86 	232869	0:00.67	1.  b6M Kd8 2. Sd6 Ke8 3. Sd5 Kf7 4. Se5 Kg6 5. Sf4 Rb3 6. Mf5 Kh6 7. Mc5 
 11	+3.83 	141162	0:00.42	1. Kc2 Kd7 2. Sd5 Ke8 3. Scc6 Kf7 4. Md3 Kf6 5. Se4 Rg2 6. Kc3 
 10	+3.90 	96151  	0:00.29	1. Kc2 Kb8 2.  b6M Re3 3. Sd5 Kc8 4. Md3 Kd7 5. Scc6 Ke7 6. Mc5 
  9	+3.86 	66886  	0:00.21	1. Kc2 Kb8 2.  b6M Re3 3. Sd5 Kb7 4. Sdc6 Ka6 5. Md5 Re4 
  8	+3.88 	19914  	0:00.06	1.  b6M Kd8 2. Sd5 Ke8 3. Scd6 Kf8 4. Mc7 Kg7 5. Mf3 
  7	+3.84 	16993  	0:00.05	1.  b6M Kd8 2. Sd5 Ke8 3. Scd6 Kf7 4. Se5 Kg7 
  6	+3.84 	8450    	0:00.03	1.  b6M Kd8 2. Kc2 Ke8 3. Md5 Kf7 4. Sd6 
  5	+3.86 	3659    	0:00.01	1.  b6M Kd8 2. Md5 Kd7 3. Sc6 Kd6 4. Kc2 
  4	+3.89 	1511    	0:00.00	1.  b6M Kd8 2. Sd6 Rg2 3. Kd3 Rf2 
  3	+3.80 	768      	0:00.00	1.  b6M Kd7 2. Sd5 Kd8 
  2	+3.96 	178      	0:00.00	1.  b6M Kd8 2. Sd6 
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.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A match with the strongest makruk AI

Post by hgm »

In the late end-game these bonuses should be far higher. You could switch to specialized PST in the root, like you would do for KBNK in chess.

As to the 'Bishops': I think it is really important to have a forward-backward bonus relative to the King also at large distance. You want to prevent the King from sneaking behind them. E.g. if the (white) Bishop is at d6, it really matters whether the black King is at h7 or h6. If it is at h7 you can prevent it from reaching h1 (if you have the move), if it is on h6 not.

BTW, the spurious HaChu promotion is due to the fact that HaChu sets the flag that indicates whether deferral is allowed for a certain piece automatically, based on the promoted piece being upward compatible with the unpromoted piece. And a Makruk Queen is not upward compatible with a Pawn, because it does not have the forward non-capture. And it still has moves on 6th rank, so it would force promotion only on 8th rank, and considerit optional on 6th and 7th. I guess I have to add an if statement to treat Makruk special in the piece initialization code.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: A match with the strongest makruk AI

Post by Evert »

Evert wrote: 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.
I managed to get this:

Code: Select all

1. Md3 Kd8 {-2.57/15} 2. Kc3 Rg4 {-2.57/15} 3. Sd5 Rf4 {-2.76/14} 4. Me4 Rh4 {-2.28/14} 5. Kd4 Rh5 {-2.86/14} 6. Scd6 Ke8 {-2.97/14} 7. Se6 Kf8 {-3.17/14} 8. Se5 Rh1 {-3.02/13} 9. Sf6 Kg8 {-3.11/13} 10. Sef7+ Kh7 {-2.40/14} 11. b6=M Kh6 {-2.41/14} 12. Mc5 Rb1 {-3.00/14} 13. Ke3 Rf1 {-3.09/14} 14. Mf3 Rd1 {-3.15/13} 15. Md4 Kh7 {-3.17/13} 16. Me5 Rf1 {-3.12/14} 17. Ke2 Ra1 {-3.00/15} 18. Kf2 Rc1 {-3.14/15} 19. Kg3 Kh6 {-3.30/15} 20. Mg4 Rf1 {-3.17/14} 21. Kh4 {+3.14/13} Rh1+ {-3.00/14} 22. Mh3 Rg1 {-2.92/14} 23. Mf4 Rb1 {-3.37/14} 24. Mg5+ Kh7 {-3.15/2} 25. Kh5 Rb7 {-6.54/16} 26. Mg4 Rxf7 {-6.86/22} 27. Sxf7 Kg7 {-6.96/24} 28. Se6 Kf8 {-7.07/24} 
Which should be a relatively straightforward win, except it needs to be done in 39 moves according to the counting rules. Might be doable, I haven't checked.