The Chess Blog of the Boylston Chess Club ...
The Boylston Chess Club (BCC) is a part of the Boylston Chess Foundation (BCF).

Sunday, November 23, 2008

A Knight's Tale - Part IIby Alex Cherniack

Adamson-Cherniack Foxwoods 2008

I’m writing a sequel to my April post on this Knight ending with Robby Adamson for three reasons:

1. Paul MacIntyre complimented me on the effort I put into the original article, but complained that I didn’t come to any definitive conclusion. My own human brain with the help of one chess engine (Fritz) surmised that while theoretically it is possible to hold this ending, practically it’s very difficult. If you want to see how I arrived at this conclusion, click here.

2. Jason Rihel asked me in the comments section what would happen if I let Fritz play against one of the other chess engines, and let them play it out 1000 times in quick games overnight.

3. I have chess software tools loaded on my laptop, but almost never use them. I wanted to see what these little used purchases could do, and let them do the heavy lifting.

TO RECAP MY IMPRESSIONS FROM PART I: White wins if the c pawn reaches the 5th rank (no matter where Black places the a pawn), while keeping back the other pawn no farther than a3. Then White has less distance to defend the squares around the advanced c pawn and attack Black’s a pawn simultaneously, and can use the threat of knight forks to ram the extra pawn down to the last rank.

If, however, Black can keep the c pawn on the 4th rank (which is MUCH easier said than done), then White will eventually be forced to advance his a pawn farther and farther up the board to avoid three-fold repetition claims. Then you’ll reach an ending where White’s a and c pawns are so close together that both can be attacked at once, leading one to be captured and obtaining a draw.

For more on this evaluation, see below. First I will tabulate the evaluated game positions of three chess engines in ChessBase; then each engine will play itself; then the engines will play each other in a round robin; and then I will extrapolate the results.

I used Fritz 10, Rybka 2.3.2a, Shredder 11, and ChessBase 9.0 for this exercise. And I mentioned this in part I, but it bears repeating here: the Nalimov tablebases cannot be applied to the Adamson-Cherniack position because they deal with endings with 6 pieces or fewer; this ending had 7.

Kibitzer Evaluations Inside ChessBase

This table came from loading the chess engines in ChessBase 9 by using the 'Add Kibitzer' (Control K) function, and then replaying the ending. Although evaluations from chess engines can change by waiting 5-500 seconds, for practical purposes the longest I waited for a move’s evaluation was 20 seconds.

Move

Adamson

Cherniack

Fritz (+)

Rybka (+)

Shredder (+)

53

Ke5

.88

.62

.70

54

Nb5

.73

.50

.49

Nc6

.74

.70

.61

55

c3

.64

.48

.28

Kd5

.65

.47

.30

56

Na3

.56

.46

.21

Kc5

.64

.47

.40

57

Kc2

.59

.46

.34

Ne5

.65

.46

.34

58

Nb1

.46

.46

.28

Nd7

.66

.47

.39

59

Nd2

.66

.47

.39

Nb6

.90

.74

.62

60

Kb3

.87

.64

.62

Nd5

.95

.77

.75

61

Ne4+

.91

.79

.74

Kc6

.92

.79

.74

62

Kc4

.92

.72

.74

Nc7

.94

.79

.79

63

Ng3

.92

.79

.79

a6

.95

.85

.89

64

Nf5

.96

.85

.89

Kb6

.99

1.02

.96

65

Ne7

.93

.79

.71

Nb5

.93

.79

.63

66

Ng6

.72

.53

.50

Kc6

1.02

.80

.89

67

Nf4

.93

.79

.54

Kb6

.99

.89

.80

68

Kb3

.72

.56

.63

Nc7

1.14

1.19

1.16

69

Nd3

.94

1.02

.91

Nb5

.94

1.14

.91

70

c4

.94

1.14

.91

Nd4+

.94

1.14

.91

71

Kc3

.94

.89

.71

Nc6

1.14

1.02

.94

72

Nc1

1.03

.41

.80

Kc5

1.00

1.19

.97

73

Nb3+

.97

.83

.80

Kd6

.97

.83

1.12

74

Nd4

.97

.79

.80

Nd8

1.01

1.85

.88

75

Kb4

1.01

1.84

.88

Nb7

1.05

2.38

1.97

76

Nb3

1.05

2.21

1.82

Kc6

1.55

4.09

1.82

77

Kc3

1.00

1.01

.84

Nd6

1.04

1.02

.96

78

Nd4+

1.04

1.12

.99

Kc5

1.04

1.12

1.01

79

Ne6+

1.04

1.12

.99

Kc6

1.04

1.12

.99

80

Kb4

.97

.80

.80

Nb7

2.47

3.31

3.50

81

Kc3

0.00

0.00

.89

Kd6

1.02

1.20

.95

82

Nd4

0.00

0.00

.80

Nc5

.97

1.23

.80

83

Nc2

.90

.73

.79

Kc6

1.13

1.14

1.14

84

Nb4+

1.13

1.14

1.14

Kd6

1.13

1.34

1.31

85

Nd3

1.13

1.64

1.31

Nb7

1.47

2.25

2.08

86

Kb4

.97

1.20

.98

Kc6

.96

1.20

.98

87

a3

.93

1.24

.94

Kd6

1.04

1.73

1.54

88

Nc1

.96

.80

.75

Kc6

1.18

1.30

1.18

89

Nb3

1.16

1.30

1.18

Kd6

1.64

2.52

2.08

90

Kc3

.97

1.14

.80

Nd8

1.04

1.19

.80

91

Na5

.94

.79

.77

Kc5

.94

.80

.80

92

Kd3

.94

.80

.75

Kd6

.94

.80

.80

93

Nb3

.94

.80

.75

Kc6

.97

.89

.79

94

Kd4

.94

.82

.75

Ne6+

.94

.80

.79

95

Kc3

.94

.80

.73

Nd8

.97

1.20

.79

96

Nd2

.93

.80

.72

Kc5

.96

.81

.80

97

Ne4+

.94

.81

.75

Kc6

.94

.81

.75

98

Ng5

.92

.80

.75

Kc5

.92

.80

.75

99

Kd3

.93

.80

.58

Nb7

1.41

1.28

1.26

100

Ne4+

1.28

1.37

1.05

Kc6

1.18

1.37

.97

101

Kd4

1.18

1.36

.97

Kb6

1.30

1.75

1.54

102

Kc3

.94

.80

.80

Kc6

.97

.83

1.16

103

Kb4

.97

.83

.80

Kb6

.97

.83

.80

104

Nd2

.97

.83

.80

Nc5

.97

1.20

.90

105

Nb3

1.04

1.20

.90

Nb7

2.29

2.85

2.24

106

a4

2.27

2.13

2.43

Kc6

7.46

5.09

7.09

107

Na5+

+ -

+ -

+ -

Nxa5

+ -

+ -

+ -

108

Kxa5

+ -

+ -

+ -

Kc5

+ -

+ -

+ -

109

Kxa6

+ -

+ -

+ -

Kc6

+ -

+ -

+ -

110

a5

+ -

+ -

+ -

Kc7

+ -

+ -

+ -

111

Kb5

+ -

+ -

+ -

Kb7

+ -

+ -

+ -

112

c5

+ -

+ -

+ -

Kc7

+ -

+ -

+ -

113

c6

+ -

+ -

+ -

Kc8

+ -

+ -

+ -

114

Kc5

+ -

+ -

+ -

Kc7

+ -

+ -

+ -

115

Kd5

1-0

+ -

+ -

+ -

Obviously Fritz, Rybka, and Shredder all gave White an advantage because of the extra pawn, but the three engines disagreed on the extent of White’s advantage. Fritz was the most gung-ho in giving White a winning advantage, Shredder gave Black the most optimistic drawing chances, and Rybka was somewhere in between.

Also, Rybka and Fritz both believed that the position after White’s 81st and 82nd moves is dead equal. I went back and left the engines on those moves for an hour with the same result. For the life of me I cannot see any threefold repetition there. If anyone knows why the algorithms in these engines would declare the ending drawn at those moves, please let me know!

I ran Shoot Out Mode in several different ways, experimenting with the quantity of games, type of game, move limit, and ply depth fields. The part of me who wanted to recreate exactly the playing conditions of the original tournament game clashed with the part of me who wanted to extract the maximum possible data from the shootout matches.

Various fast speed controls (5 minute, 10 minute, and 30 minute) were erratic, because at some point each of the engines tried the inexplicable continuation 53…Ke5 54.Kc3 Nd5+ 55.Kd3? (not forced: 55.Kc4 Nb6+ 56.Kd3) which gave Black a certain draw after 55…Nb4+ and 56…Nxa2. In the end I decided to heck with it, and chose one game for each engine with 60 minutes for each side, the same conditions that Adamson and I had during the ending.

Considering the initial evaluations of the ending (Fritz .88, Rybka .62, and Shredder .70), I wasn’t that surprised at the results. My firsthand experience with computers’ deadly defensive accuracy was confirmed - all the position evaluations in the games never tipped above 1.00.

Fritz 10 has another feature called 'Engine Match,' where a chess engine can be pitted against another chess engine. To set up these matches I had to do the following:

In ChessBase 9:

1. Delete the first 53 moves and last 62 moves in the Adamson-Cherniack game2. Save the truncated game as a new database

In Fritz 10:

3. Select File > New > Engine Match… which always displayed the starting position and the following window:

4. Click the Define buttons in this window to select the engines in the match5. Click the Openings DB button in this window to select the database with the Adamson-Cherniack ending, in order to determine the starting position of the match.

I spent 2-3 weeks casting about in trying to find the ideal time setting for Engine vs. Engine matches. After establishing that the games in a 4 game match between two competing engines was not an exact duplicate of a two game match, the biggest challenge was finding the ideal balance between quantity (cf. Jason Rihel: “Hey Alex, What happens if you let Fritz play against one of the other chess engines, and let them play it out 1000 times in quick games overnight?”) vs. quality (does an engine with sixty five minutes play better chess than with sixty minutes?).

With high hopes, I set up a 100 game match with one hour for both Fritz and Rybka, and let the computer run for an entire weekend. The results of this match left much to be desired:a). All the games were drawnb). At the same time control settings, the same narrow range of themes was repeated 50 times over.

I settled upon staggering different time controls between all the chess engines: 10 games at one hour, 4 games at one hour thirty minutes, and 2 games at two hours.

I am fully aware that this game set is inherently limited – I actually obtained a decisive result in Fritz vs. Shredder, but that was only because I mistakenly entered ‘60’ in the hours field, and created a 4 day game that went as follows:

By the way, Black’s 56th move in this game makes no sense – why not 56…Kc5 preventing 57.Kc4?

I was not going to experiment with games of this duration - let’s face it, this isn’t a reenactment of Remembrances of Things Past. For those of you with multiprocessor versions of these chess engines, knock yourselves out.

Extrapolating the Results

The most obvious result was that all the games were drawn, so (unless a supercomputer proves otherwise) Black always has a draw with best play.

All the match games were automatically saved as databases in the default folder C:\My Documents\ChessBase\CompBaseChessBase. I used two nifty tools in ChessBase 9 to filter the games:

• Filter (Control F) by position with white/black pieces occupying a specific square

• Filter (Control F) by manoeuvres to pinpoint a piece moving from one specific square to another

and moved the pieces around the board until the same patterns repeated themselves. The following game themes arose during the various time settings:

Fritz vs. Rybka

Time Control

Fritz-Rybka

Rybka-Fritz

G/60

Rybka as Black kept a stranglehold on the c4 square. The c pawn was blockaded on the third rank. The best Fritz could do was play its King to b5. Rybka played a6+, Fritz took the a pawn, and Rybka won the c pawn with a draw.

Rybka as White exchanged Knights with Fritz, but left its King on a4 and the c pawn on the second rank. Fritz, having captured Rybka’s Knight on d4, played Kc3 and obtained a drawn pawn ending.

G/90

Rybka maintained a blockade on the c4 square. Fritz won the a pawn and was actually two pawns up. However White’s Knight was tied down to the defence of the c pawn, and could not advance the a pawn. Fritz had to give up one of the pawns with a draw.

Rybka as White could not advance its King beyond the third rank. Eventually Rybka’s King was able to reach e4, but Fritz with its King on a4 was able to wipe out all of Rybka’s pawns.

G/120

Rybka as Black kept a stranglehold on the c4 square. The c pawn was blockaded on the third rank. The best Fritz could do was play its King to b5. Rybka played a6+, Fritz took the a pawn, and Rybka won the c pawn with a draw.

Rybka was able to push the c pawn to the fifth rank, but at the concession of playing the a pawn to the fourth. Fritz’s Knight picked off the a pawn with a draw.

Fritz vs. Shredder

Time Control

Fritz-Shredder

Shredder-Fritz

G/60

Fritz as White did not move any pawns and kept the King on b2. Shredder placed the Knight on e5 to control the c4 square, played the King to d3, advanced the a pawn past the fourth rank to divert Fritz’s King, and won the c pawn with a draw.

Shredder won Fritz’s a pawn, but was boxed in as follows: WKa6, a4, c4, BKc6, BNd3. Shredderhad to give up one of the pawns so that the King could escape, and give Fritz a draw.

G/90

Shredder as Black kept a stranglehold on the c4 square. The c pawn was blockaded on the third rank. The best Fritz could do was play its King to b5. Rybka played a6+, Fritz took the a pawn, and Shredder won the c pawn with a draw.

Fritz allowed Shredder to advance the c pawn to the sixth rank, but was able to counterattack the a pawn with the King. Shredder gave up the Knight defending the a pawn and advanced the King to d7, but Fritz’s Knight held the draw.

G/120

Shredder maintained a blockade on the c4 square. Fritz won the a pawn and was actually two pawns up. However White’s Knight was tied down to the defence of the c pawn, and could not advance the a pawn. Fritz had to give up one of the pawns with a draw.

Shredder as White was able to advance the c pawn to the fifth rank, but could make no progress in the following position: WKb4, WNd3, c5, a3, BKc6, BNd2, a6. Shredder had to jettison the c pawn with a draw.

Rybka vs. Shredder

Time Control

Rybka -Shredder

Shredder -Rybka

G/60

Rybka as White exchanged Knights with Shredder, but left its King on a4 and the c pawn on the second rank. Shredder, having captured Rybka’s Knight on d4, played Kc3 and obtained a drawn pawn ending.

Rybka as Black kept a stranglehold on the c4 square. The c pawn was blockaded on the third rank. The best Shredder could do was play its King to b5. Rybka played a6+. Unlike Fritz, Shredder did not take the a pawn. However Shredder eventually played its a pawn up to the fourth rank, where Fritz blocked it with a5, and later picked it off with a draw.

G/90

Shredder maintained a blockade on c4. Rybka went after Shredder’s pawn on a5, giving up the c pawn with a draw.

Rybka as Black maintained a blockade on c4. Shredder’s King went after Rybka’s pawn on a7, giving up both of its remaining pawns with a draw.

G/120

Shredder as Black maintained a blockade on c4. Rybka went after Shredder’s pawn on a5, giving up the c pawn with a draw.

Rybka exchanged Knights with Fritz, but left its King on d7 and the c pawn on the second rank. Fritz, having captured Rybka’s Knight on d4, played Kc3 and obtained a drawn pawn ending.

From these games I can give Paul MacIntyre a more definitive assessment of the ending. The new knowledge from analyzing the computer match games is in red.

TO RECAP MY IMPRESSIONS FROM PART I:

(This ending is always a draw with best play on both sides.)

White wins if the c pawn reaches the 5th rank (no matter where Black places the a pawn), while keeping back the other pawn no farther than a3.

(In the actual Adamson-Cherniack game, Adamson won with a Knight exchange having played his pawn to a4. If the Knights are exchanged and Black goes for the c pawn, the crucial factor is how many moves White needs to win the Black’s a pawn without allowing the King to be boxed in. If the Knights are not exchanged, White’s a pawn if advanced will give Black better defensive chances, because once captured by the Knight that piece is closer to White’s remaining pawn, and once that remaining pawn is captured, the game is a draw.)

Then White has less distance to defend the squares around the advanced c pawn and attack Black’s a pawn simultaneously, and can use the threat of knight forks to ram the extra pawn down to the last rank.

(More accurately, White wins if he(she,it) can advance the c pawn to the fifth rank and control the c6, b5, and d5 squares around it. Then the advanced pawn is in no danger of being captured, and the above mentioned threats of knight-exchange forks will yield won pawn endgames and force the c pawn down to promotion.)

(In short, to win with the pawn on the fifth rank, White must first have a stable fourth rank.)

If, however, Black can keep the c pawn on the 4th rank (which is MUCH easier said than done), then White will eventually be forced to advance his a pawn farther and farther up the board to avoid three-fold repetition claims.

(The easiest way for Black to draw is to win one of White’s extra pawns – then, barring the remaining pawn promoting, that pawn will be captured with a draw. The next easiest way for Black to draw is to grab the c4 square and never let it go, as shown in multiple computer match games; White is then forced to lead the King into left field to win Black’s a pawn, which proved to be a draw many times over (Fritz-Rybka G/60, Fritz-Shredder G/90, and Rybka-Shredder G/120 among others) even if Black didn’t immediately win back the c pawn.)

(Even if the c pawn reaches the 5th rank, all is not lost. In the Shredder-Fritz G/120 game the following position arose:

White here does not have the tempi to play the King to c4, check the Black King away from c6, and support the advance of the c5 pawn. If White goes after Black’s a pawn, Black picks off the advanced c pawn with a drawn pawn ending. If White can play the King to d5 and then play c6, then I believe saving the game is no longer possible.)

Then you’ll reach an ending where White’s a and c pawns are so close together that both can be attacked at once, leading one to be captured and obtaining a draw.

(True.)

There, I've scratched the itch. I won’t be analyzing this ending any more.