King of the Hill programs?

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

Moderator: Ras

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

Re: King of the Hill programs?

Post by hgm »

Well, I prepared a Fairy-Max version that supports 'king-of-the-hill'. It should be able to run in WinBoard 4.8.0, where king-of-the-hill should appear in the engine-defined-variants section of the New Variant dialog. It can be downloaded from:

http://hgm.nubati.net/hillmax.zip .

I just added 3 lines of code to Fairy-Max: one to define the 'hill' (basically a PST with only 4 squares non-zero), one to test at the top of Search() whether the King of the stm is on the hill, and return a king-capture score if it is, and one to set a global flag in the game initialization code routine, to enable that test. What triggers the use of this rule is a (white) Pawn value of 66 (read from the fmax.ini file), which I defined only for this variant.

I did one successful test in Two Machines mode: in a 40/1 game they ended up in a double Rook ending, and then suddenly the one that happened to have its King closer to the center discovered a forced win-in-6, by trading one of the Rooks (forking K+R with its R), after which the remaining one could not cut it off.

I still get the impression that at least in this stage of the game there should be a quite hefty bonus for being close to the center.
Guenther
Posts: 4718
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: King of the Hill programs?

Post by Guenther »

hgm wrote:Well, I prepared a Fairy-Max version that supports 'king-of-the-hill'. It should be able to run in WinBoard 4.8.0, where king-of-the-hill should appear in the engine-defined-variants section of the New Variant dialog. It can be downloaded from:

http://hgm.nubati.net/hillmax.zip .

I just added 3 lines of code to Fairy-Max: one to define the 'hill' (basically a PST with only 4 squares non-zero), one to test at the top of Search() whether the King of the stm is on the hill, and return a king-capture score if it is, and one to set a global flag in the game initialization code routine, to enable that test. What triggers the use of this rule is a (white) Pawn value of 66 (read from the fmax.ini file), which I defined only for this variant.

I did one successful test in Two Machines mode: in a 40/1 game they ended up in a double Rook ending, and then suddenly the one that happened to have its King closer to the center discovered a forced win-in-6, by trading one of the Rooks (forking K+R with its R), after which the remaining one could not cut it off.

I still get the impression that at least in this stage of the game there should be a quite hefty bonus for being close to the center.
Thanks a lot I downloaded HillMax and already made games against it!
At first I wasn't sure though if the variant shouldn't be available in the engine options too, which it wasn't.
Here I found some optical glitches BTW:

Image

The last(?) entry doesn't fit vertically and most also don't fit horizontally in the drop-down menu.
Also as single lines(drop-down menu closed) you can see that the text is cut from the left side(normally right side).

However here my first win. I admit I lost the first four attempts and I did not close the engine output window for now.
Thus I realized I missed a win 2 moves before already(score dropped from 79.x to nearly zero, but I believe the score was wrong anyway)

Great new sparring partner until I am tough enough to play against Humans at LiChess!


[pgn][Event "RWBC"]
[Site "CAPPUCCINO"]
[Date "2014.09.30"]
[Round "-"]
[White "Guenther Simon"]
[Black "Fairy-Max 4.8-hill"]
[Result "1-0"]
[TimeControl "40/240"]
[Variant "king-of-the-hill"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R
white to play
--------------}
1. d3 Nc6 {+0.14/8 9} 2. c4 f5 {+0.08/8 4} 3. Nf3 e5 {+0.13/8 4} 4. Nc3 Nf6
{+0.11/8 5} 5. e3 d5 {+0.05/8 4} 6. cxd5 Nxd5 {-0.02/9 4} 7. Qb3 Ndb4
{+0.00/8 3} 8. Qd1 Be6 {+0.13/8 4} 9. a3 Nd5 {+0.01/9 7} 10. Be2 Bd6
{-0.03/8 4} 11. e4 Nf4 {+0.01/9 5} 12. Bxf4 exf4 {+0.07/10 8} 13. d4 fxe4
{+0.10/9 3} 14. Nxe4 Be7 {+0.24/9 12} 15. Rc1 O-O {+0.37/7 4} 16. Ne5 Nxd4
{+1.06/9 3} 17. Bc4 Rf5 {+1.02/9 5} 18. Bxe6+ Nxe6 {+1.04/10 5} 19. Qxd8+
Rxd8 {+1.07/10 4} 20. Nf3 Rb5 {+1.30/10 4} 21. Rc2 Bxa3 {+1.43/9 4} 22. Nc3
Rxb2 {+2.35/11 3} 23. Rxb2 Bxb2 {+2.41/11 3} 24. Ne4 a5 {+2.80/12 5} 25.
Ke2 a4 {+3.39/11 10} 26. Rd1 Rxd1 {+3.40/11 9} 27. Kxd1 b6 {+2.86/12 18}
28. Kc2 Be5 {-0.53/10 2.7} 29. Kd3 Kf8 {-79.97/24 2.8} 30. Nfg5 Ke7
{-0.97/12 3} 31. Nf7 a3 {-79.97/21 2.9} 32. Nxe5 f3 {-79.98/28 0.2} 33. Ng5
Nxg5 {-79.99/28} 34. Kd4
{White mates} 1-0
[/pgn]

BTW I learned my first lesson. Exchanging Queens seems to be a good strategy then you are not killed easily by an attack when you decided
not to castle and go for the direct way with the King.

Edit:
Now when I look at the PGN again I notice that the move times for the Human(me) are not saved. IIRC this worked somehow in the past if my memors doesn't fail. I had only 5.6 seconds left after move 34.

Edit2:
The PGN viewer has some limitations with PGN tags. The timecontrol is not displayed e.g. it was 40/240(s).
May be it cuts all tags after the sixth one? Who knows?
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: King of the Hill programs?

Post by hgm »

OK, I made a new version, which starts drawing the King towards the center when the material drops to Q + 2 minors per side, and then rises linearly to about 200 cP.This version beat the previous one by 66% (56+ 20= 24-) at 40/1'. Another difference is that the 'parent variant' is now 'fairy' rather than 'wildcastle'. Normally the user would not notice at all what the parent variant is, but wildcastle was a stupid choice, because it is a shuffle variant, and this caused WinBoard to start shuffling the initial position in later games of a comp-comp match. The new version should be able to play comp-comp matches without problems.

I uploaded it to the same link.

And indeed, the space for selecting combobox options is a bit cramped. I guess I should make the dialog a bit wider. Because Chess with Different Armies needs both armies mentioned, the names of the choices are much longer than typical combobox choices, which also contributes to the problem.

For King of the Hill there is no need to select anything on the engine; it make suse of the concept of engine-defined variants, which is new in WinBoard 4.8.0. In principle the 'Variant fairy selects' option of Fairy-Max could be completely removed, and all the choices could be directly presented to WinBoard, so they would appear in the New Variant dialog for direct selection. (This displaces the problem, however, as also there space is limited, and the maximum number of engine-defined variants is currently 9 (or 12?).

I am not sure WinBoard ever saved thuman thinking time. Or perhaps it does it only in ICS mode.

I will check the issue with the PGN tags.
Guenther
Posts: 4718
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: King of the Hill programs?

Post by Guenther »

hgm wrote: I am not sure WinBoard ever saved thuman thinking time. Or perhaps it does it only in ICS mode.

I will check the issue with the PGN tags.
HG no need to check for the PGN tags on your side.
I was talking about the TalkChess PGN viewer :)

(If you click on quote or edit for the message containing the PGN you see
that all tags are there pasted from WB, but somehow tags are cut off with the pgn viewer code.)
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: King of the Hill programs?

Post by hgm »

Ah OK, that is a relieve. I had changed something in the tag code (adding the new VariantMen tag), and I was afraid that might have broken something. :?
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: King of the Hill programs?

Post by Evert »

hgm wrote:(This displaces the problem, however, as also there space is limited, and the maximum number of engine-defined variants is currently 9 (or 12?).
Ah yes, that's something I've been meaning to complain about. :P

I love that I can select engine-defined variants from the "new variant" menu, but it's pretty annoying that most of them never show up there. Would it be possible to change the selection to a listbox rather than… whatever it is now… buttons, I think? Or at least add a box for any variants that don't get to go on buttons? Or make more space by re-using buttons for unsupported variants (which only delays the problem, of course).

Not sure what the best shape for that dialog box is, perhaps a listbox and a bunch of options that can be ticked to filter the contents of the list box?
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: King of the Hill programs?

Post by hgm »

I guess a listbox would be best. The whole dialog could be made into another clone of Load Engine (as Theme already is). That would require a pretty big change of the code, however. The listbox could only contain what the engine plays. (OTOH, this would not advertize standard variants, and inspire people to go looking for engines for them.) It could also be used to group variants in groups that can be opened and closed like a tree widget, as you can do with egines and themes. (But the engine would have to define the groups somehow in its variants feature, requiring new protocol.) The possibilities are huge, but it would be a lot of work. And you, Daniel and (perhaps I) are likely the only 3 persons in the World forwhich the current 9 reserved buttons are not enough! :D

Adding 9 additional radio buttons would be pretty trivial, though. Would that be enough for you? Since this was essentially an experimental feature, I did not want to go over board on it immediately.

I have not decided yet if it is actually desirable to make every possible combination of armies in Chess with Different Armies a separate choice in the New Variant menu. It might be better to give Fairy-Max a single new engine-defined variant CWDA, and equip it with two comboboxes to independently choose army 1 and army 2. It would be an annoyance that you had to set them (and better set them alike!) in both engine 1 and engine 2. But hey, who would ever use that for engine-engine games? Most of this stuff is meant for human-engine, exactly what Guenther is doing now. Fairy-Max is ideal for that, because it does not completely overwhelm humans tactically, although it does have an edge there. But its general strategic ignorance can be exploited by a careful human.
Guenther
Posts: 4718
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: King of the Hill programs?

Post by Guenther »

hgm wrote:But hey, who would ever use that for engine-engine games? Most of this stuff is meant for human-engine, as Guenther is using it now. Fairy-Max is ideal for that, because it does not completely overwhelm humans tactically, although it does have an edge there. But its general strategic ignorance can be exploited by a careful human.
Hey not always ;-) I thought plugging them together gives me new ideas I can try later. It seems you have improved HillMax quite a lot already.
Despite a piece down in game 1 but with a completely blocked center and a helpless plus Bishop version 2 succeeded in creating zugzwang and a beautiful finish.
Game 2 was lopsided and the new version showed how to tactically free a center square and again with an amazing finish.

Still don't know though if early castling should be discouraged?

BTW how do I start both in match mode per commandline telling WB
this is king-of-the-hill? So far I played one game after another.

Code: Select all

[Event "RWBC_45TM"]
[Site "CAPPUCCINO"]
[Date "2014.09.30"]
[Round "-"]
[White "Fairy-Max 4.8-hill"]
[Black "Fairy-Max 4.8-hill2"]
[Result "0-1"]
[TimeControl "40/240"]
[Variant "king-of-the-hill"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R
white to play
--------------}
1. Nc3 {+0.09/8} d6 {+0.22/9 12} 2. d4 {+0.10/8 6} Na6 {+0.18/9 20} 3. Bg5
{+0.11/7 4} Be6 {+0.21/8 10} 4. Nf3 {-0.08/8 14} c6 {+0.19/8 7} 5. Bf4
{-0.13/8 7} Qb6 {+0.13/8 5} 6. b3 {-0.15/8 5} h6 {+0.14/8 5} 7. Qd2
{-0.14/8 4} O-O-O {+0.15/8 3} 8. h4 {+0.10/8 4} Nf6 {+0.03/8 5} 9. O-O-O
{+0.14/8 5} Qb4 {+0.09/8 2.9} 10. Kb2 {-0.14/9 7} Nh5 {-0.08/8 3} 11. Bh2
{-0.06/8 3} Qb6 {-0.17/8 7} 12. e3 {+0.17/8 5} g6 {-0.08/8 8} 13. Na4
{+0.11/10 7} Qc7 {-0.26/10 2.8} 14. Bxa6 {+0.31/11 7} bxa6 {-0.27/11 7} 15.
Nc5 {+0.22/10 4} Qb6 {-0.15/10 20} 16. Nxe6 {+0.14/11 15} fxe6 {-0.15/10 7}
17. Qd3 {+0.08/10 8} Rg8 {-0.10/9 2.8} 18. Qe4 {+0.10/10 8} Kd7 {-0.12/9 4}
19. c3 {+0.01/9 4} Nf6 {+0.07/9 3} 20. Qd3 {+0.00/9 4} Rc8 {+0.00/8 4} 21.
e4 {+0.00/8 3} g5 {+0.04/7 2.5} 22. e5 {+0.09/9 2.9} Ng4 {-0.27/9 4} 23.
Bg3 {+0.27/9 4} Qb5 {-0.60/9 8} 24. c4 {+0.59/9 5} Qb4 {-0.67/8 2.7} 25.
hxg5 {+0.63/8 8} hxg5 {-1.24/9 4} 26. Qe4 {+1.51/9 2.9} Nxf2 {-1.87/9 4}
27. Bxf2 {+1.92/9 3} g4 {-1.92/9 5} 28. Nh4 {+1.87/8 2.7} d5 {-1.84/9 3}
29. Qe1 {+1.82/9 3} Qxe1 {-1.79/11 3} 30. Bxe1 {+1.80/12 4} Bh6
{-1.95/10 6} 31. Bg3 {+1.88/10 2.7} Be3 {-1.91/11 4} 32. a4 {+1.93/10 2.7}
Rb8 {-2.04/10 6} 33. Rd3 {+1.95/12 4} Bg5 {-2.03/11 2.7} 34. c5
{+1.95/12 3} Rb4 {-1.96/11 3} 35. Rh2 {+1.93/12 3} Rb7 {-1.96/11 2.5} 36.
Bf2 {+1.92/13 4} Rf8 {-1.98/12 6} 37. g3 {+1.94/12 3} Rbb8 {-1.96/12 2.6}
38. Rc3 {+1.93/13 3} Rb4 {-1.94/11 2.8} 39. Ng6 {+1.91/12 4} Rg8
{-1.92/11 2.7} 40. Nf4 {+2.02/12 3} Rbb8 {-2.07/11 3} 41. Be3 {+1.98/13 4}
Rbf8 {-2.02/12 4} 42. Rd3 {+1.93/14 8} Rf7 {-2.03/13 6} 43. Rh1
{+1.93/14 6} Rff8 {-2.03/13 5} 44. Rh5 {+1.93/14 6} Rf5 {-2.20/13 6} 45.
Rh7 {+1.93/13 5} Rff8 {-2.22/14 6} 46. Nh5 {+2.22/13 5} Rh8 {-2.33/14 4}
47. Rxh8 {+2.31/16 5} Rxh8 {-2.57/18 5} 48. Bxg5 {+2.31/18 8} Rxh5
{-2.80/17 4} 49. Bd2 {+2.35/17 7} Rh1 {-3.66/17 5} 50. Kc2 {+2.40/17 5} Ke8
{-3.05/16 7} 51. Bf4 {+2.31/15 6} Rf1 {-2.14/15 6} 52. b4 {+2.29/15 4} Ra1
{-1.78/15 4} 53. Rd1 {+2.26/17 8} Ra3 {-1.75/15 3} 54. a5 {+2.25/15 6} Kf7
{-1.74/18 7} 55. Rd3 {+2.30/17 4} Ra1 {-2.27/17 5} 56. Bg5 {+2.26/16 4} Kg6
{-2.24/18 4} 57. Bxe7 {+2.29/17 5} Kf5 {-2.04/16 4} 58. Re3 {+2.35/20 5}
Ra3 {-2.20/18 13} 59. Kd2 {+2.34/20 5} Rb3 {-2.21/18 3} 60. Bd6
{+2.30/20 7} Rxb4 {-2.27/22 6} 61. Kd3 {+2.26/20 11} Rb5 {-1.86/22 4} 62.
Bc7 {+2.21/21 4} Rb7 {-1.79/22 5} 63. Bd8 {+2.25/22 5} Rb3+ {-1.78/23 4}
64. Kd2 {+2.26/21 9} Rb8 {-1.81/22 8} 65. Bc7 {+2.31/20 6} Rb7 {-0.86/21 6}
66. Bb6 {+0.61/19 4} axb6 {-0.85/21 5} 67. axb6 {+0.71/19 6} Rh7
{-0.71/20 10} 68. Kd3 {+0.68/18 6} Rh1 {+0.14/21 6} 69. Re2 {-0.09/19 6}
Rd1+ {+1.00/21 6} 70. Ke3 {-0.71/20 9} Rg1 {+1.70/20 4} 71. Rf2+
{-0.75/20 7} Kg5 {+2.27/19 4} 72. Kd2 {-0.79/19 7} Rxg3 {+2.34/18 4} 73.
Rf7 {-0.79/17 4} Rb3 {+2.56/17 4} 74. Ke2 {-1.95/16 4} g3 {+4.06/17 5} 75.
Rf6 {-2.02/16 4} Kg4 {+4.20/17 4} 76. Kf1 {-5.49/16 4} Rb2 {+79.93/22 5}
77. b7 {-79.94/21 5} g2+ {+79.94/28 4} 78. Kg1 {-79.95/28 4} Kg3
{+79.95/28 0.7} 79. b8=Q {-79.96/28 0.7}
{Xboard adjudication} 0-1

[Event "RWBC_45TM"]
[Site "CAPPUCCINO"]
[Date "2014.09.30"]
[Round "-"]
[White "Fairy-Max 4.8-hill"]
[Black "Fairy-Max 4.8-hill2"]
[Result "0-1"]
[TimeControl "40/60"]
[Variant "king-of-the-hill"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R
white to play
--------------}
1. Nf3 {+0.21/7} Nc6 {+0.17/7 1.7} 2. c3 {+0.23/7 1.4} a5 {+0.08/7 1.4} 3.
g3 {+0.06/8 6} d6 {+0.14/7 1.0} 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4 {-2.99/10 0.6} g5 {+2.93/9 0.7} 33. fxg5
{-3.14/10 1.3} fxg5 {+3.00/10 1.0} 34. f4 {-3.24/10 1.5} gxh4 {+3.13/9 0.9}
35. Nf3 {-3.30/9 1.5} Rxe2 {+3.49/9 0.9} 36. Nxh4 {-3.36/9 0.5} Kg7
{+3.38/9 0.9} 37. Bf3 {-2.86/9 0.6} Rb2 {+3.19/10 2.4} 38. Bxh5
{-2.77/9 0.8} Kf6 {+3.11/9 1.0} 39. h3 {-2.74/9 1.1} Nc4 {+2.72/8 0.5} 40.
Rc1 {-3.10/9 1.0} Bd3 {+2.75/8 0.6} 41. Rd1 {-2.94/10 1.2} Be4
{+2.90/9 1.0} 42. Bf3 {-3.07/10 0.8} Nb5 {+3.16/11 1.5} 43. Bg4
{-3.48/10 1.2} Ne3 {+3.18/9 2.0} 44. Re1 {-4.12/11 1.0} Nc2 {+3.19/9 0.9}
45. Rf1 {-3.99/10 1.6} Ncxd4 {+3.49/11 3} 46. Rc1 {-3.94/10 1.8} e5
{+3.87/10 2.4} 47. f5 {-4.38/9 1.4} Bc2 {+4.64/10 5} 48. Ra1 {-4.99/9 1.8}
e4 {+5.36/10 1.9} 49. Ng6 {-6.12/10 0.9} e3 {+5.84/9 0.8} 50. Re1
{-6.98/11 2.3} Bxf5 {+8.21/11 0.9} 51. Rf1 {-9.67/10 0.9} Rb1
{+17.31/11 1.6} 52. Bd1 {-79.96/11 1.0} Rxd1 {+79.96/18 0.8} 53. Kh1
{-79.97/25 0.9}
{Xboard adjudication} 0-1
[pgn][Event "RWBC_45TM"]
[Site "CAPPUCCINO"]
[Date "2014.09.30"]
[Round "-"]
[White "Fairy-Max 4.8-hill"]
[Black "Fairy-Max 4.8-hill2"]
[Result "0-1"]
[TimeControl "40/240"]
[Variant "king-of-the-hill"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R
white to play
--------------}
1. Nc3 {+0.09/8} d6 {+0.22/9 12} 2. d4 {+0.10/8 6} Na6 {+0.18/9 20} 3. Bg5
{+0.11/7 4} Be6 {+0.21/8 10} 4. Nf3 {-0.08/8 14} c6 {+0.19/8 7} 5. Bf4
{-0.13/8 7} Qb6 {+0.13/8 5} 6. b3 {-0.15/8 5} h6 {+0.14/8 5} 7. Qd2
{-0.14/8 4} O-O-O {+0.15/8 3} 8. h4 {+0.10/8 4} Nf6 {+0.03/8 5} 9. O-O-O
{+0.14/8 5} Qb4 {+0.09/8 2.9} 10. Kb2 {-0.14/9 7} Nh5 {-0.08/8 3} 11. Bh2
{-0.06/8 3} Qb6 {-0.17/8 7} 12. e3 {+0.17/8 5} g6 {-0.08/8 8} 13. Na4
{+0.11/10 7} Qc7 {-0.26/10 2.8} 14. Bxa6 {+0.31/11 7} bxa6 {-0.27/11 7} 15.
Nc5 {+0.22/10 4} Qb6 {-0.15/10 20} 16. Nxe6 {+0.14/11 15} fxe6 {-0.15/10 7}
17. Qd3 {+0.08/10 8} Rg8 {-0.10/9 2.8} 18. Qe4 {+0.10/10 8} Kd7 {-0.12/9 4}
19. c3 {+0.01/9 4} Nf6 {+0.07/9 3} 20. Qd3 {+0.00/9 4} Rc8 {+0.00/8 4} 21.
e4 {+0.00/8 3} g5 {+0.04/7 2.5} 22. e5 {+0.09/9 2.9} Ng4 {-0.27/9 4} 23.
Bg3 {+0.27/9 4} Qb5 {-0.60/9 8} 24. c4 {+0.59/9 5} Qb4 {-0.67/8 2.7} 25.
hxg5 {+0.63/8 8} hxg5 {-1.24/9 4} 26. Qe4 {+1.51/9 2.9} Nxf2 {-1.87/9 4}
27. Bxf2 {+1.92/9 3} g4 {-1.92/9 5} 28. Nh4 {+1.87/8 2.7} d5 {-1.84/9 3}
29. Qe1 {+1.82/9 3} Qxe1 {-1.79/11 3} 30. Bxe1 {+1.80/12 4} Bh6
{-1.95/10 6} 31. Bg3 {+1.88/10 2.7} Be3 {-1.91/11 4} 32. a4 {+1.93/10 2.7}
Rb8 {-2.04/10 6} 33. Rd3 {+1.95/12 4} Bg5 {-2.03/11 2.7} 34. c5
{+1.95/12 3} Rb4 {-1.96/11 3} 35. Rh2 {+1.93/12 3} Rb7 {-1.96/11 2.5} 36.
Bf2 {+1.92/13 4} Rf8 {-1.98/12 6} 37. g3 {+1.94/12 3} Rbb8 {-1.96/12 2.6}
38. Rc3 {+1.93/13 3} Rb4 {-1.94/11 2.8} 39. Ng6 {+1.91/12 4} Rg8
{-1.92/11 2.7} 40. Nf4 {+2.02/12 3} Rbb8 {-2.07/11 3} 41. Be3 {+1.98/13 4}
Rbf8 {-2.02/12 4} 42. Rd3 {+1.93/14 8} Rf7 {-2.03/13 6} 43. Rh1
{+1.93/14 6} Rff8 {-2.03/13 5} 44. Rh5 {+1.93/14 6} Rf5 {-2.20/13 6} 45.
Rh7 {+1.93/13 5} Rff8 {-2.22/14 6} 46. Nh5 {+2.22/13 5} Rh8 {-2.33/14 4}
47. Rxh8 {+2.31/16 5} Rxh8 {-2.57/18 5} 48. Bxg5 {+2.31/18 8} Rxh5
{-2.80/17 4} 49. Bd2 {+2.35/17 7} Rh1 {-3.66/17 5} 50. Kc2 {+2.40/17 5} Ke8
{-3.05/16 7} 51. Bf4 {+2.31/15 6} Rf1 {-2.14/15 6} 52. b4 {+2.29/15 4} Ra1
{-1.78/15 4} 53. Rd1 {+2.26/17 8} Ra3 {-1.75/15 3} 54. a5 {+2.25/15 6} Kf7
{-1.74/18 7} 55. Rd3 {+2.30/17 4} Ra1 {-2.27/17 5} 56. Bg5 {+2.26/16 4} Kg6
{-2.24/18 4} 57. Bxe7 {+2.29/17 5} Kf5 {-2.04/16 4} 58. Re3 {+2.35/20 5}
Ra3 {-2.20/18 13} 59. Kd2 {+2.34/20 5} Rb3 {-2.21/18 3} 60. Bd6
{+2.30/20 7} Rxb4 {-2.27/22 6} 61. Kd3 {+2.26/20 11} Rb5 {-1.86/22 4} 62.
Bc7 {+2.21/21 4} Rb7 {-1.79/22 5} 63. Bd8 {+2.25/22 5} Rb3+ {-1.78/23 4}
64. Kd2 {+2.26/21 9} Rb8 {-1.81/22 8} 65. Bc7 {+2.31/20 6} Rb7 {-0.86/21 6}
66. Bb6 {+0.61/19 4} axb6 {-0.85/21 5} 67. axb6 {+0.71/19 6} Rh7
{-0.71/20 10} 68. Kd3 {+0.68/18 6} Rh1 {+0.14/21 6} 69. Re2 {-0.09/19 6}
Rd1+ {+1.00/21 6} 70. Ke3 {-0.71/20 9} Rg1 {+1.70/20 4} 71. Rf2+
{-0.75/20 7} Kg5 {+2.27/19 4} 72. Kd2 {-0.79/19 7} Rxg3 {+2.34/18 4} 73.
Rf7 {-0.79/17 4} Rb3 {+2.56/17 4} 74. Ke2 {-1.95/16 4} g3 {+4.06/17 5} 75.
Rf6 {-2.02/16 4} Kg4 {+4.20/17 4} 76. Kf1 {-5.49/16 4} Rb2 {+79.93/22 5}
77. b7 {-79.94/21 5} g2+ {+79.94/28 4} 78. Kg1 {-79.95/28 4} Kg3
{+79.95/28 0.7} 79. b8=Q {-79.96/28 0.7}
{Xboard adjudication} 0-1

[Event "RWBC_45TM"]
[Site "CAPPUCCINO"]
[Date "2014.09.30"]
[Round "-"]
[White "Fairy-Max 4.8-hill"]
[Black "Fairy-Max 4.8-hill2"]
[Result "0-1"]
[TimeControl "40/60"]
[Variant "king-of-the-hill"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R
white to play
--------------}
1. Nf3 {+0.21/7} Nc6 {+0.17/7 1.7} 2. c3 {+0.23/7 1.4} a5 {+0.08/7 1.4} 3.
g3 {+0.06/8 6} d6 {+0.14/7 1.0} 4. d4 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.99/10 0.6} g5 {+2.93/9 0.7} 33. fxg5
{-3.14/10 1.3} fxg5 {+3.00/10 1.0} 34. f4 {-3.24/10 1.5} gxh4 {+3.13/9 0.9}
35. Nf3 {-3.30/9 1.5} Rxe2 {+3.49/9 0.9} 36. Nxh4 {-3.36/9 0.5} Kg7
{+3.38/9 0.9} 37. Bf3 {-2.86/9 0.6} Rb2 {+3.19/10 2.4} 38. Bxh5
{-2.77/9 0.8} Kf6 {+3.11/9 1.0} 39. h3 {-2.74/9 1.1} Nc4 {+2.72/8 0.5} 40.
Rc1 {-3.10/9 1.0} Bd3 {+2.75/8 0.6} 41. Rd1 {-2.94/10 1.2} Be4
{+2.90/9 1.0} 42. Bf3 {-3.07/10 0.8} Nb5 {+3.16/11 1.5} 43. Bg4
{-3.48/10 1.2} Ne3 {+3.18/9 2.0} 44. Re1 {-4.12/11 1.0} Nc2 {+3.19/9 0.9}
45. Rf1 {-3.99/10 1.6} Ncxd4 {+3.49/11 3} 46. Rc1 {-3.94/10 1.8} e5
{+3.87/10 2.4} 47. f5 {-4.38/9 1.4} Bc2 {+4.64/10 5} 48. Ra1 {-4.99/9 1.8}
e4 {+5.36/10 1.9} 49. Ng6 {-6.12/10 0.9} e3 {+5.84/9 0.8} 50. Re1
{-6.98/11 2.3} Bxf5 {+8.21/11 0.9} 51. Rf1 {-9.67/10 0.9} Rb1
{+17.31/11 1.6} 52. Bd1 {-79.96/11 1.0} Rxd1 {+79.96/18 0.8} 53. Kh1
{-79.97/25 0.9}
{Xboard adjudication} 0-1[/pgn]
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: King of the Hill programs?

Post by hgm »

Umm, for some reason selecting an engine-defined variant from the command-line does not work. Have to look into that.

The way I did the 100-game match was by just starting with the two engines, then selecting king-of-the-hill from New Variant, and finally selecting 'Machine Match' from the Mode menu (after setting 'default match games' in Common Engine Options or Tournament Options, if you did not already have a satisfactory default there).

Note that to play a match between the old and new, you should replace the fmax.ini file of the old by that of the new. There was a problem with the game definition in the old fmax.ini file, which made WinBoard shuffle the pieces after the first game.

I must admit that +100 Elo for just one extra eval term, which was not even optimized but just guessed, is not bad at all. 8-) Nevertheless, if I look at the games, it is almost always the case that the losing engine "doesn't know what hit him". They are both playing with quite normal scores, and suddenly one of them sees the forced hill climb. (The one that was drawn in closer by this extra eval term more often than the other).

This is a sign the evaluation is woefully inadequate. A serious engine should really do a careful analysis of how robustly the piece conformation in the center denies the Kings access, and start to be extremely worried when this defense starts to crumble. The center becomes sort of an inverted King fortress. Normal Chess programs give large penalties for squares next to your King attacked by enemy pieces. Here there should be large penalties for leaving squares in the center unattacked.
Guenther
Posts: 4718
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: King of the Hill programs?

Post by Guenther »

Guenther wrote:Currently I am watching sometimes the 'King of the Hill' chess variant in online games and I like it quite a lot.
I guess I will try this myself after fully understanding the strategical aspects.

For explanation: the rules(pieces and board etc. too) are exactly the same as in normal chess, except you also win
when your King legally enters one of the two center squares of your side, e.g. d4/e4 or d5/e5.

Are there programs out which are capable of playing this variant?(strength is not important)

Guenther
Just to clarify I noticed an error in my understanding of the rules!
You win if you enter one of the 4 center squares d4/d5/e4/e5 not like I wrote above.
@HG may be you have implemented it right despite my wrong description, because one game I posted it seems Black headed for e4 without crossing d5 or e5 which were blocked.
(Not sure though because adjudication was on and the final moves were not played)