lichess.org
Donate

King of the Hill computer analysis

Whoa. Fingers crossed it doesn't /solve/ KotH and ruin the game.
It won't. I managed to survive quite a long time without even thinking much:

[Event "Casual game"]
[Site "http://l.org/COxdxPPC"]
[Date "2014.08.05"]
[White "thibault"]
[Black "lichess AI level 8"]
[Result "0-1"]
[WhiteElo "1622"]
[BlackElo "?"]
[PlyCount "60"]
[Variant "King of the Hill"]
[TimeControl "-"]
[ECO "?"]
[Opening "?"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SetUp "1"]
[Annotator "l.org"]

1. e4 e5?! { (0.60 → 1.25) Inaccuracy. The best move was d5. } (1... d5 2. Ke2 f5 3. e5 d4 4. Nf3 Qd5 5. d3 Kd7 6. Bf4 Kc6 7. c4 b5 8. Qb3 bxc4 9. Qa4+) 2. Nf3?! { (1.25 → 0.56) Inaccuracy. The best move was d4. } (2. d4 exd4 3. Qxd4 Nc6 4. Qe3 Qf6 5. e5 Nxe5 6. Nf3 d6 7. Kd2 Kd7 8. Nxe5+ Qxe5 9. Nc3 Ke6) 2... d5 3. exd5? { (1.21 → 0.08) Mistake. The best move was d4. } (3. d4 Nc6 4. dxe5 dxe4 5. Qxd8+ Kxd8 6. Kd2 Bc5 7. Ng5 Nxe5) 3... e4 4. Nd4?? { (0.70 → -4.58) Blunder. The best move was d4. } (4. d4 exf3 5. Qxf3 Nf6 6. Kd2 Bg4 7. Bb5+) 4... Qxd5 5. c3? { (-4.26 → -5.43) Mistake. The best move was Nc3. } (5. Nc3 Qxd4 6. d3 Ke7 7. Be3) 5... Ke7 6. d3 Kf6 7. Bf4 Bd6 8. g3 Bxf4 9. gxf4 Qe5?! { (-6.84 → -6.32) Inaccuracy. The best move was Nh6. } (9... Nh6 10. Kd2 Qe5 11. dxe4) 10. Ne2 Bg4? { (-5.75 → -4.52) Mistake. The best move was g5. } (10... g5 11. Na3 gxf4 12. Kd2) 11. d4 Qf5? { (-4.47 → -3.42) Mistake. The best move was Qa5. } (11... Qa5 12. Kd2 Nh6 13. Qb3 Nc6 14. Na3 Bf3 15. Rg1 Nf5 16. Rg5 h6 17. Rxf5+ Qxf5 18. Ke3 Rad8 19. Qxb7) 12. h3? { (-3.42 → -4.86) Mistake. The best move was Nd2. } (12. Nd2 Nh6 13. Qb3 Re8 14. Qxb7 e3 15. Nc4 exf2+) 12... Bf3 13. Qd2? { (-4.56 → -5.94) Mistake. The best move was Rg1. } (13. Rg1 h6 14. Kd2 Ne7 15. Bg2 Qb5 16. Bxf3 Qd3+ 17. Kc1 Qxd1+ 18. Kxd1 exf3 19. Kd2) 13... Nc6 14. Ng3?! { (-5.56 → -6.11) Inaccuracy. The best move was Rg1. } (14. Rg1 Qd5 15. f5 h6 16. Qf4 Nge7 17. Kd2) 14... Qa5 15. Bc4? { (-4.35 → -6.81) Mistake. The best move was Qe3. } (15. Qe3 Bxh1 16. Nxh1 Nh6 17. Ng3 Nf5 18. Nh5+ Ke6 19. Qxe4+) 15... Nh6? { (-6.81 → -5.10) Mistake. The best move was Nge7. } (15... Nge7 16. a4 b5 17. Bxb5 a6 18. Bc4 g6 19. b4 Qb6 20. Qc2 Bxh1 21. Ke2 Qxd4 22. cxd4 Nxd4+ 23. Kd2) 16. Qe3 Nf5 17. Nxf5 Qxf5 18. Rg1 Na5 19. b3 h6 20. Nd2?! { (-5.27 → -6.06) Inaccuracy. The best move was Be2. } (20. Be2 c5 21. Bxf3) 20... Nxc4 21. bxc4 Rae8 22. Rb1 b6? { (-5.12 → -2.44) Mistake. The best move was g6. } (22... g6 23. d5 c5 24. Rxb7 Qc8 25. Rxa7 h5 26. Ra5 h4 27. Rxc5 Qxh3 28. Rc6+) 23. Rb5 c5 24. a4?? { (0.87 → -4.19) Blunder. The best move was dxc5. } (24. dxc5 Rd8 25. cxb6 Qe6 26. bxa7 Rd3 27. Qc5 Rc8 28. Rb6 Rxc5 29. Rxe6+ Kxe6 30. a8=Q Rxc4 31. Rg6+ fxg6) 24... g5 25. Nb3?? { (-3.85 → -20.30) Blunder. The best move was dxc5. } (25. dxc5 Qxf4 26. Qd4+ Re5 27. cxb6 Ke6 28. Rxe5+ Qxe5 29. Nxf3) 25... gxf4 26. Qd2 e3 27. fxe3 fxe3 28. Qxe3?! { (-33.08 → Mate in 4) Checkmate is now unavoidable. The best move was Nc1. } (28. Nc1 exd2+ 29. Kxd2 Qf4+ 30. Kc2 Qh2+ 31. Kb1 Be4+ 32. Ka1 Qxg1 33. Kb2 Qf2+ 34. Ka3 Qd2 35. Nb3 Qxc3) 28... Rxe3+ 29. Kf2 Re2+ 30. Kf1 Bg4# { White is checkmated } 0-1

So I'd say it's significally weaker than normal stockfish.
<Haha, look at that! Analysis recommends 2. Kd2 clbin.com/gv8soT.png It's coming!>

lol, i think i can beat it at level 8. Still lot of tweaking is needed if it recommands move like 2. Kd2. And most of all human analysis is required before engines can understand it. that is how it happened with normal chess and that is how engines evolved over the years. may be after 6 months or 1 year it may consider 2. Kd2 as a blunder instead of recommending it. Though it is a good start lot of human analysis is needed first in almost all major openings, that is why i think i have started team for KotH analysis.

Apart from that SF is more positional engine. If we can tweak a more tactical engine we can have some good ideas about basics than we can modify stockfish accordingly but it is beyond the scope of our resources here i think... lot of coding and master or GM level involvement is needed at every stage before code is locked, and still even after that lot of scope for improvement..
"Sir," the technician remarked, his words weighed by hesitation as he pulled off his headset. "Stockfish recommended...it recommended the Bongcloud."

Tord Romstad looked on with considerable disdain as his fingers locked tightly onto his chin with well-worn contemplation. His eyes pierced the screen with a reflected glow of wanting to find the culprit responsible for this blasphemous act.

"Identify the branch responsible for this. Find out who authorised the pull request." He turned away swiftly and strode to his office, his feet tempered with restraint.

"And...and then what, Sir?" the technician gulped.

"Checkmate them."
Ha, I suppose the modified SF doesn't play openings well & tweaking is required. It somewhat reminds me of a friend who always played the King's Gambit only to find his king on h3 or d3!

From the beginning I've been thinking about tweaking two things:
1. Static bonus values assigned for "king to the center" distance probably need tweaking. I had copied these values from SCIDB's 3-checks "check count" values, although I'm not sure how to read them:
#ifdef KOTH
const Score KOTHDistanceBonus[4] = {
S(9*PawnValueMg + PawnValueMg/2, 9*PawnValueEg),
S(4*PawnValueMg + PawnValueMg/2, 4*PawnValueEg),
S(2*PawnValueMg + PawnValueMg/2, 2*PawnValueEg),
S(0, 0)
};
#endif

2. The koth_distance() function which is used in conjunction with these bonuses doesn't account for positions where the path to the center or the path to the center is "obviously" blocked by enemy or friendly pieces. You might say it's overly optimistic. :)
I could move the bulk of these bonuses into SF's endgame code, but then SF might miss early wins... at any rate, tweaking is required!
I have joined tuskerking's KotH analysis team and I agree with him that human analysis is required to understand this game. Even as computers evolve, so far we are better able to learn and teach than they are!

I pushed another change to greatly reduce opening and middlegame bonuses for king distance to the center, to more accurately measure king distance to the center, and to improve performance (by only measuring king distance to the center after a king move):
http://github.com/ddugovic/Stockfish/commit/edce146c25af6d85a0229f3044fd4c0c80cc75a1

Sadly, after 1. d4 d5 it no longer plays 2. Kd2. :(
Yeah, those bonuses for distance from the center are incredibly high.

Such values would be like weighting doubled pawns as +2 (a bit of an exaggeration, sure). No surprise it wasn't playing so strongly :)

This topic has been archived and can no longer be replied to.