Sunday, January 21, 2007

Position : white to play and calculate

During my long chess-free period since Benasque last summer, I've spent a lot of time playing email chess which (as S&B members who attended a talk I once gave at the club will know) I don't really like that much. Nevertheless, it's what I've got - and since (thanks to Angus' generosity) I now have a chessplaying program, it means I don't lose every game I play. In fact, since acquiring the program I haven't lost a tournament game, which naturally makes one wonder what function the human player still has in correspondence chess.

It's a shame. I'm past forty now, the sort of age at which a player's OTB strength tends inevitably to decline - and I'd always envisaged myself turning to correspondence chess when that occurred. What point there is in that, is currently unclear: if, in ten years' time, we will all have access to programs which in a few minutes will produce moves of world champion class or better, then one suspects that the human elelment will be very small, since any intervention we make is likely to produce a worse move than the one which the computer proposed.

For the moment, though, this is not quite true. While one can very well mess up the game by deviating from the computer's preferred choice, one can also work in a number of ways, both with and without the computer, either ignoring it (for a while) so as not to be overinfluenced by its preferences, or understanding its strengths and deficiencies in order to direct its thoughts to lines which it had neglected or misunderstood.

I don't pretend to be any sort of expert on the subject: anyone looking for well-informed commentary could do worse than try Robin Smith's Modern Chess Analysis, which deals at some depth with the various strengths and weaknesses of computer progams. (There is, by the way, a copy at the Barbican Library, which I would very strongly recommend that anybody living in London take the trouble to join. It is absolutely - a qualified librarian writes - the best public library I have ever been in.)

What I propose to begin here, in my best reasonably-informed-layman-and-amateur kind of way, is a discussion which will hopefully illustrate some of the potential ways in which computers either still fail at correspondence chess, or in which they succeed only with human help. I'll start with a position in an ongoing game from the International Email Chess Group: the game is now well past the diagram position.

What I'd like people to do, rather than give any suggestions of their own, is simply say what their computer wants to play as White. Without making any suggestions to the computer - don't put in a move to see what changes! We're asking what would happen if we relied purely on the computer. If you can give more detail, excellent: i.e. if the preferred move changed after x ply, the program's second and third choices, what program you used.

After we've had a few responses I'll come back to the position and explain what actually happened and why: and we'll see if the human element was actually helpful or not. So - suggestions please!

[A note to anybody who has not previously left a comment on here and is unsure of the procedure: don't be put off by the stuff about Blogger accounts and so on. You do not need to have one - just enter yourself as an anonymous user and leave your name, if you wish, as part of the comment. ]

19 comments:

Anonymous said...

Here are the moves the chess engines I have on my computer suggested:

Shredder9 (Linux):
1. Ng4 Rh5 2.Qd2 Nxe1 3. Rxe1 (+0.25)

Spike1.2 (in ChessAssistant 7 Lite, Linux Crossover Office):
1. Ng4 Rh5 2.Qd2 Nxe1 3. Rxe1 (-0.06)

GambitFruit 4bx (in ChessAssistant 7 Lite, Linux Crossover Office):
1. Ng4 Rh5 2.Qd2 Nxe1 3. Rxe1 (+0.25)

Crafty 20.0 (Linux)
1. Ng4 Rh5 2.Qd2 Nxc1 3. Rxc1 (-0.29)

All engines I tested decided quickly on 1. Ng4. The only deviation I have found is the different choice for Black's second move by Crafty (I looked only at the first 5ply, though.

I enjoy correspondence chess very much, but play only on Servers that do not allow the use of computer engines. For myself as a beginner I see not much of a point to use a computer - pure computer matches can be done automatically and if I would play something else than the computer wants I would probably lose the game because I don't know much about strategy (yet).

I am very curious about your opinion on the human influence here, looking forward to the next post!

Tom Chivers said...

Fritz initially thinks black has a clear advantage, but then soon switches to around =, after a matter of seconds.

It gives 1. Ng4 Rh5 2. Qd2 then changed its mind from 2. ... Nxc1 to 2. ... Nxe1 after a minute or two. The lines seem to indicate white gets a lot of activity with his queen plus threats on the long diaganol under his control - enough for = but 0.22, ie very marginally in white's favour.

However, the more time it thinks (5 minutes in now) the less it likes black's position, and the more options it sees for white.

It's now gone back to analysing the position after 1. Ng4 Rh5, so might think it's found something better than 2. Qd2. Presumably 2. Qe3.

Btw, as I wait, for those who prefer to c&p FENs, here's the FEN for this positon: 2q1r1k1/1bp2p1p/3pnBpQ/r7/1p2P3/1P1n2PP/P4PBN/2R1R1K1 w - - 0 1 Also note the second line Fritz gives it gives as dead = ie 1. Ba1 since this allows 1. ... Rg5, ready to meet 2. Ng4 with 2. ... Rxg4 ('Kingdom for a horse' and all that.)

My human hunch, btw, is that after 1. Ba1 Rg5, 2. h4 - gaining a tempo for a later Bh3 and still allowing Ng4 after - might be a better way for white to preserve the inititiave.

It's quite interesting that Crafy & Shredder disagree over who is better - I thought they were both meant to be very strong calculators...

Anonymous said...

I haven't got a machine, but I'm trying to make 1 e5 work, with the idea of playing a rook to h4. If 1..ne1
2 rc4 re5
3 be5 and 4ng4
but I think it is a phantasy...
(Martin)

ejh said...

Thanks for replies - any more unaided-computer answers, please?

Anonymous said...

Well, Rybka 1.2f started off with 1 Ng4 and negative score for White. Slowly the score for White increased and turned positive. I think at 14 ply it was about +0.2, still with 1 Ng4. Then at 15 ply (a little more than five minutes on my PC) it switched to 1 Bf3 followed by 1 Ng4… Then at 17 ply it was 1 Bf3 closely followed by 1 Ba1 closely followed by 1 Ng4… Then at 18 ply (about 25 minutes) 1 Ng4 (0.24) was favourite again… I note that there are 49 possible first moves for White and I think my version of Rybka is struggling to consider the position in depth.

Angus.

ejh said...

Well, 18-ply isn't so poor for depth, is it?

I looked at it again yesterday - my Rybka only got to 14-ply, recommending 1.Ng4. After further twenty minutes, on 15-ply, it still hadn't finished considering that move as its first option, so I decided to pack it in.

Interestingly, while it was going through the options on 14-ply, it suddenly slowed down and spent a lot of time considering what had been, up to then, only its twelfth choice. It didn't supplant 1.Ng4, though, and according to Angus it would not have done so.

1.Ng4 looks like the choice of all programs at all speeds, doesn't it?

But I think there's a winning move in the position, the move I played. And it's not 1.Ng4.

Anonymous said...

At 21-ply Rybka sees e5!

Anonymous said...

21 +0.54 1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Bc6 6.Bc3 Ng5 7.Qd4 Ne6

21 +0.56 1.e5 Bxg2 2.Rc4 g5 3.Rg4 Rxe5 4.Rxe5 Nxe5 5.Rxg5+ Ng6 6.Ng4 Qa6

22 +0.73 1.e5 Nxe1 2.Bxb7 Qxb7 3.Rxe1 Rxe5 4.Rxe5 dxe5 5.Ng4 Qe4 6.Be7 Qxg4 7.hxg4 Rxe7

Anonymous said...

23 +0.74 1.e5 Nxe1 2.Bxb7 Qxb7 3.Rxe1 Rxe5 4.Rxe5 dxe5 5.Ng4 Qe4 6.Bxe5 Qe1+

ejh said...

It'd be useful if the anonymous user could append their name...

Anonymous said...

24 +0.74 1.e5 Nxe1 2.Bxb7 Qxb7 3.Rxe1 Rxe5 4.Rxe5 dxe5 5.Ng4 Qe4 6.Bxe5 Qe1+

The Rybka lines above were posted by JLJ.

Anonymous said...

JLJ is John Jerz.

Anonymous said...

Just wondered: How long did it take your machine to get to 24 play with Rybka, JLJ? If you have the figures I'd be also interested in the times for the lower ply counts.

Thanks,
Angus.

Anonymous said...

Angus, I am at work now and the machine in question is at home, but I will get you the times. The machine is a dual core Pentium D and I am running another computer analysis at the same time as this one, so that should make the times a little bit suspect. Using Nodes/sec I can calculate how long it would have taken running with full use of both processors. The machine has now reached 25-ply with the exact same analysis line as for 24-ply. JLJ

Anonymous said...

Horton-NN, IECG
2q1r1k1/1bp2p1p/3pnBpQ/r7/1p2P3/1P1n2PP/P4PBN/2R1R1K1 w - - 0 1

Analysis by Rybka WinFinder 2.2 32-bit:

1.Nf3
µ (-1.03) Depth: 2 00:00:00
1.Nf3
µ (-1.03) Depth: 2 00:00:00
1.Ng4
= (-0.13) Depth: 4 00:00:00
1.Ng4
³ (-0.27) Depth: 5 00:00:00
1.Ng4 Rh5
³ (-0.27) Depth: 6 00:00:00 10kN
1.Ng4 Rh5 2.Qd2
= (-0.06) Depth: 7 00:00:00 22kN
1.Ng4 Rh5 2.Qd2 Nxc1
= (-0.06) Depth: 8 00:00:00 41kN
1.Ng4 Rh5 2.Qd2 Nxc1 3.Rxc1 Nc5
= (0.00) Depth: 9 00:00:01 88kN
1.Ng4 Rh5 2.Qd2 Nxc1 3.Rxc1 Nc5 4.f3
= (0.00) Depth: 10 00:00:02 175kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8
= (0.00) Depth: 11 00:00:04 347kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Bh4 Nc5 5.Nf6
= (0.13) Depth: 12 00:00:09 693kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Bh4 Nc5 5.Nf6 Rxh4
= (0.06) Depth: 13 00:00:14 1144kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Bh4 Nc5 5.Nf6 Rxh4 6.gxh4 Re5
= (0.06) Depth: 14 00:00:29 2377kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Nc5 6.Bc3 Nxe4
² (0.27) Depth: 15 00:01:12 5908kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Qa6 6.Bc3 Ng5 7.Qd4
² (0.34) Depth: 16 00:02:24 11721kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Qa6 6.Bc3 Ng5 7.Qd4 Nxh3+
² (0.48) Depth: 17 00:05:10 25149kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Bc6 6.Bb2 Ng5 7.Qc3 Nxh3+
² (0.41) Depth: 18 00:09:46 47594kN
1.e5
² (0.44) Depth: 18 00:17:44 47594kN
1.e5
² (0.41) Depth: 18 00:18:51 47594kN
1.e5
² (0.61) Depth: 18 00:31:34 47594kN

Rybka WinFinder on an AMD Athlon 4000+ finds e5 after nearly eighteen minutes. Presumably 64-bit multi-processor systems will find the move in well under ten.

Marek Soszynski

Anonymous said...

Angus, to answer your previous question, here is Rybka depth and time, read MM:SS or HH:MM:SS

14 00:27
15 01:06
16 01:50
17 03:03
18 07:25
19 15:20
20 38:15
21 59:16
21 1:58:07
22 4:57:43
23 7:39:08
24 13:07:15
25 23:51:41

JLJ

Unknown said...

Note that John Jerz explained in the chess computer club that he
used Rybka in "Ultra slow" and Ultra optimistic settings and that this setting tries harder for the side to move

Default rybka(that John Jerz did not use) does not find a different move than Ng4 at depth 23 but when I stopped it after 16 hours of analysis on slow PIV3.19 ghz it considered e5 at depth 24 so it is possible that it could change it mind to e5 at this depth and serious correspondce players may use it for more time than 16 hours.

Note that the question is also if Ng4 does not win.

Here is rybka default analysis on that hardware:

1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Nc5 6.Qc3 Ne6 7.Bh4 g5
² (0.60) Depth: 21 00:58:06 142382kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Kf8 4.Qxb4 Qa8 5.Qd2 Qa6 6.a4 Qb6 7.b4 Ra8
² (0.59) Depth: 22 01:38:20 246336kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Nc5 4.Bb2 Nd7 5.Qd4 f6 6.Nxf6+ Nxf6 7.Qxf6 Rhe5
² (0.61) Depth: 23 03:24:10 522571kN
1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Nc5 4.Bb2 Nd7 5.Qd4 f6 6.Nxf6+ Nxf6 7.Qxf6 Rhe5
² (0.66) Depth: 24 07:01:22 1080437kN


Uri

ejh said...

Thanks for all of these: I will comment in due course!

Anonymous said...

I decided to repeat the analysis with default rybka2.2n for 68 hours and 50 minutes

This time default rybka could find it at depth 24 in less than 20 hours and did not change it's mind
at depth 25 or depth 26

1.Ng4 Rh5 2.Qd2 Nxe1 3.Rxe1 Nc5 4.Bb2 Nd7 5.Qd4 f6 6.Nxf6+ Nxf6 7.Qxf6 Rhe5
² (0.66) Depth: 24 07:01:26 1080437kN
1.e5 Nxe1 2.Bxb7 Qxb7 3.Rxe1 Rxe5 4.Rxe5 dxe5 5.Ng4 Qb5 6.Bxe5 f5 7.Nf6+ Kf7
± (0.80) Depth: 24 19:47:21 3026210kN
1.e5 Nxe1 2.Bxb7 Qxb7 3.Rxe1 Rxe5 4.Rxe5 dxe5 5.Ng4 Qe4 6.Bxe5 Qe1+
± (0.79) Depth: 25 32:18:56 567428kN
1.e5 Nxe1 2.Bxb7 Qxb7 3.Rxe1 Rxe5 4.Rxe5 dxe5 5.Ng4 Qe4 6.Bxe5 Qe1+
± (0.72) Depth: 26 57:57:17 72585kN

(Uri, MyTown 04.02.2007)