King Indian like and usefulness of engines

Discussion of chess software programming and technical issues.

Moderator: Ras

Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: King Indian like and usefulness of engines

Post by Henk »

Time for a KID tournament. See which engine plays Kings Indian best.
Vinvin
Posts: 5312
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: King Indian like and usefulness of engines

Post by Vinvin »

Henk wrote:Time for a KID tournament. See which engine plays Kings Indian best.
With starting positions already in middle game to see if engines play well (Black attacks king side and white attacks queen side).
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: King Indian like and usefulness of engines

Post by Henk »

And Lyudmil Tsvetkov giving live comments on the games. Kasparov may not be available.
jdart
Posts: 4420
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: King Indian like and usefulness of engines

Post by jdart »

Those are good but Kasparov did not always win with the classical king side clamp/attack.

Here is a good recent correspondence game that shows Black winning:

[pgn]
[Event "MT-Borzenko (RUS)"]
[Site "ICCF"]
[Date "2015.09.01"]
[Round "?"]
[White "Shapiro, Vladislav Borisovic"]
[Black "Nekhaev, Andrey Ivanovich"]
[Result "0-1"]
[ECO "E99"]
[WhiteElo "2358"]
[BlackElo "2525"]
[PlyCount "118"]
[EventDate "2015.??.??"]

1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6 5. Nf3 O-O 6. Be2 e5 7. O-O Nc6 8. d5
Ne7 9. Ne1 Nd7 10. f3 f5 11. g4 a5 12. Nd3 b6 13. Kh1 Nc5 14. Rg1 f4 15. Bd2
Bd7 16. b3 g5 17. Nb5 Qb8 18. Bc3 Ng6 19. Nxc5 bxc5 20. Rb1 Kf7 21. Qd2 Qb6 22.
Qc2 Rh8 23. Bf1 Qb8 24. a3 Nh4 25. Qd1 h5 26. Bh3 Qc8 27. Rb2 Bf6 28. Rf2 Be7
29. Rc2 Rh6 30. Qf1 Ng6 31. b4 axb4 32. axb4 cxb4 33. Bxb4 Nh4 34. Rb2 Ra4 35.
Qd3 hxg4 36. Bxg4 Bxg4 37. fxg4 Qd7 38. Nc3 Ra8 39. h3 Ng6 40. Rh2 Kg7 41. Nb1
Nf8 42. Nd2 Qa4 43. Rb1 Nd7 44. Kg2 Nf6 45. Rhh1 Qd7 46. Qf3 c6 47. Bc3 c5 48.
Kf2 Rah8 49. Ra1 Qc8 50. Kg2 Rh4 51. Rag1 Qg8 52. Nb3 Qh7 53. Be1 Nxe4 54. Bxh4
gxh4 55. Qd3 Rf8 56. Ra1 f3+ 57. Kh2 Ng3 58. Qxh7+ Kxh7 59. Ra7 Re8 0-1
[/pgn]
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: King Indian like and usefulness of engines

Post by carldaman »

cdani wrote:
jdart wrote:I think modern engines are dangerous opponents even in the openings they play badly. But they do still have trouble with the long-term attack plans of Black in the KID.

Back a few years ago my program played some online games with some IMs and FMs and I noticed too some cases where they just gradually shrank its mobility until it was practically in zugzwang. May be harder to do now that search depths are greater and engines are stronger, but this is also a kind of long-term plan that can be hard to counter.

--Jon
I think is reasonable that when engines are able to play well such schemas, they will be able also to help to discover new long term plans that people now are unaware of. And consequently, those engines will win the current ones.
Stockfish has been able to play the classical Mar del Plata KID structures very well from the Black side for a few years now. The problem is that it has trouble steering the game into these favorable structures in the first place.

Its eval lets it down and is as bad as other top engines, wrongly showing Black with a -0.70 deficit after about 12 moves into the E98-99 KID lines, but this usually gets smaller very fast and turns positive for Black if it manages to push the f-pawn to f4, and then moves up the g-pawn. SF then typically wins these positions with spectacular ease.

This is what prompted me to open up the special topic on "pointed pawn chains" that Pawel referred to, as I believe that the key is to help the engines recognize interlocking chains that point towards the enemy King as favorable and thus something to aim for. Once this happens and the favorable KID structure is reached, any engine with good search will be able to work out the attack on its own, the way SF does.

Komodo with a 'souped up' king safety is also capable to execute such attacks well in my tests, and now we hope that Houdini 5 can impress us in this area as well.

Lyudmil Tsvetkov has often made the good point that KID-like structures can be reached from other common openings, too, and even as White, so this is a very important and relevant topic. (He also suggested better move ordering to favor kingside moves/maneuvers over other moves in closed positions.)

I would also like to see more KID-type positions included in test suites. Otherwise, this weakness will continue to be neglected for a long time, and we'll be stuck with these supposedly unbeatable engines that cannot even give a reliable evaluation in many closed positions.

CL
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: King Indian like and usefulness of engines

Post by Lyudmil Tsvetkov »

there are 2 approaches to perfect play:

1) write an eval with some 100 000 terms, some fully psqtised, some partially, and do a full-width 1-ply search, no move ordering

it is definitely possible to do that, but extremely difficult to tune

2) consider only piece values in eval, and do full-width 200-ply search (impossible because of lacking resources) or highly selective search with sophisticated move ordering, again to ply 200.

maybe possible to do, but, when you compare the 30 plies current top engines reach in the opening position to the 200 plies needed to reach 200 plies and solve chess, you will need a century or so.

Without having definitive answers to all endgame positions, one can not of course even dream of solving chess (deciding which first move is best), as the best move at ply 1 will depend on the best move at ply 200.

So, when engines can not do neither the one, nor the other, they try to do whatever they can, increasing their eval and going deeper in the search. At some point, engines will be very close to both huge sophisticated eval and extremely deep search, but it will takes very very long.

Pawel is rigth, everything should be thoroughly psqtised, at least all 32 squares (horizontal symmetry) for most terms, some might do without or partially. But saying that an isolated central d4 pawn is equal to any other isolated pawn, as SF very much would like to simplify, is simply ludicrous. In some positions wrong values are compensated by other wrong values, by that is not very helpful in the majority of positions.

And, of course, new eval terms should be added.

I think it is very easy to define just about any eval term (and there migth be some 100 000 reasonable ones), problem is that this might not work in a particular engine for the following reasons:

1) terms is not tuned to other terms
2) search is tuned in a way that good eval terms fail in tests simply because some stupid search formula cuts where it should not, or extends where it should not
3) move ordering would discard most of the moves where the term has any influence
4) testing is done at very short TC; some terms require much deeper search to succeed

etc., etc.
So many thing to bear in mind, people are at a loss, and just tune and tune.

When I try to grasp SF code nowadays, I am astounded beyond measure how any of those formulas in the search or eval could actually work: they are multiplyting some random number by another random number, then by another random array value, then divide by some number, which is the std::max or log of something else, also not very much known, and, as a final touch to the art work, they divide the eval by pawnvalue_eg (198 or something). I completely can not understand what happens, but as they are running some 500 cores and more, as well as 50+ testers, some patches simply have to succeed.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: King Indian like and usefulness of engines

Post by Lyudmil Tsvetkov »

btw., another difficulty in tuning eval is that there are simply extremelu numerous parameters with very small or infinitesimal values, that never get considered (too few elo gained, you need speed, you know), but still influence the game outcome.

for example (no time for diagrams now, hope people can follow imagery), white pawns c2,b3, white knigth c3, black isolated pawn on a5. you can have a term like defended (b3) pawn & knigth simultaneously attacking the square (a4) in front of enemy isolated pawn, with some very small values, like {5,3};

the a5 pawn simply can not advance without being lost, and that is some asset. now, the term is small, but when you add couple of those; in some positions such terms will not happen, but what about those positions where couple similar terms would occur? No matter how good you tune your eval, you will still get wrong.

or, another one: white pawns on c3,e3, black isolated pawn on d5. again, d5 can not advance without being lost, even with the help of own pieces.

there are innumerable such small and infinitesimal terms, but engines never consider them.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: King Indian like and usefulness of engines

Post by Lyudmil Tsvetkov »

not to mention the big terms.

anyone can figure out why KRB vs KRPP is a draw, while KRRB vs KRRPP is a win for the stronger side? it looks like you just add another rook each side? (but the pawns of the weaker side should not be very advanced, promoting, etc.)
BeyondCritics
Posts: 415
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: King Indian like and usefulness of engines

Post by BeyondCritics »

Can you give an example of that?
I think this is a practical way to make progress. Post some critical stockfish results and point out what you believe is wrong with them.