Thursday, December 17, 2015

Season 6 superfinal, games 17-24

This is part 3 of my looking back at the TCEC season 6 superfinal match between Stockfish and Komodo. Previous parts can be found at

part 1, games 1-8
part 2, games 9-16

After 16 games Stockfish led by 3-0 with 13 draws.

Game 17 started with an eval advantage for Stockfish, but after some exchanges the engines started shuffling pieces with very few pawn moves that were available. After a while Komodo sacrificed two pawns which allowed it to attack white's king, eventually forcing a 3-fold repetition. In game 18 Stockfish quickly equalized as black by sacrificing a pawn and opening up the queen side against Komodo's king (long castled). The evals showed a growing advantage for Stockfish within a few moves.



With so much firepower aimed at Komodo's king, mating threats at move 17, Stockfish was clearly in charge. Komodo started to lose material, first a knight for pawns, and then a rook for a knight.



This was game over, though it continued a bit until both engines had a high enough (negative) eval. A very impressive win for Stockfish especially considering the previous game. It clearly analyzed the opening much better than Komodo, from both sides of the board.

In game 19 Stockfish had an eval advantage out of the opening due to a bishop pair compared to Komodo's pair of knights. A few moves later after a bishop and knight exchange, Stockfish was a pawn up but with two pairs of doubled pawns, while Komodo had control of the center with a connected pair of passed pawns. Stockfish gave a rook for a knight to break the black center but this only led to a drawn ending of bishop and pawns against a rook. In game 20 Komodo went for an imbalance of BB vs R, which Stockfish thought was in its favor with white underdeveloped and the white king vulnerable in the center. After the queens were exchanged Komodo's pieces found more space and it built a fortress in the center for its king.



Cute !! After a few more moves the game was settled with 3-fold repetition.

Game 21 featured a bishop sacrifice by Stockfish in an attempt to expose the black king to attack. There followed many trades and threats on both sides, and in the end this was only good for a perpetual check draw. In game 22 Stockfish attacked as black, sacrificing a knight to open the h file against Komodo's king. Later Stockfish tried to put as many pieces as possible on the file, but Komodo used this to find a perpetual check on the other side.

In game 23 Komodo started with a pawn advantage as black, but it chose to give two pawns back to gain a connected pair of passed pawns. Stockfish sacrificed a knight to get rid of these pawns, leading to a drawn endgame of RR vs RRN with both kings exposed to check threats. The game was adjudicated before the perpetual checks started. In game 24 Stockfish kept the pawn and attacked the white king. Komodo exchanged pieces and successfully defended its king. As in the previous game Stockfish obtained a connected pair of pawns but only for a short while. The exchanges continued until there were only QR vs QR with no way to make progress for either side.

The result after these 8 games was 4-0 for Stockfish, which seems to be dominating this match. Komodo has not been able to find a way to win yet while Stockfish is constantly attacking and looking for chances.

Thursday, December 10, 2015

Season 6 superfinal, games 9-16


Welcome to part 2 of my look-back at the Season 6 superfinal. In this part I cover games 9-16. After the first 8 games Stockfish was up by 2 wins, with 6 draws.

Link to part 1, games 1-8

Game 9

The opening had a small bias for white and Stockfish gradually increased the eval advantage. After 21 moves the material was balanced but Stockfish was threatening f7.

It looked as though Komodo had it covered but the two knights were quickly chased away. Stockfish then initiated a combination that resulted in a Q vs RR imbalance.



With black's king exposed in the center the white queen could attack quickly from both ends of the board. Gradually Stockish converted this advantage into material, first pawns, then a bishop for rook exchange, and the game ended after the second black rook was exchanged for a knight.

The reverse game was very different. Stockfish as black neutralized the king side quickly and castled, while Komodo castled long, and the action concentrated on the queen side. After queens were exchanged and the pawns stabilized both engines reached a 0 eval and the game was declared a draw. So, 3-0 Stockfish and 7 draws.

In game 11 Stockfish launched a strong king side attack, with eval rising above 0.9 (Komodo peaked at about 0.5). Komodo defended well, first stopping the attack and exchanging material, and then finding a perptual check for the draw. In the reverse game it was again Stockfish that had a slight advantage as black, but it was not enough for a win.

Game 13 reached a NN vs BN endgame on move 27, with the evals close to 0 throughout the game, resulting in a quick draw. The pieces stayed on longer in game 14 and Komodo had some hopes with a small eval advantage. After Komodo took over the 7th rank Stockfish responded by trading most pieces and securing a passed pawn. This threat forced Komodo to draw with perpetual check even though it was a pawn up.

In game 15 Stockfish had a small eval advantage for a while, but with only QRB vs QRN with many pawns left at move 23 the game looked to be heading for a quiet draw. For a short period Stockfish got excited with eval jumping to 0.5 and even 0.9 for one move, but Komodo remained cool and defended against any pawn breaks or king attacks. When the queens were exchanged the evals dropped to 0, and while Stockfish had a passed pawn on the 7th rank Komodo ended the game by check repetition. Game 16 developed along similar lines with the same piece composition for the endgame. Here there were no attempts to break the pawn lines and the game ended quickly in a shuffle with 0 evals.

Tuesday, December 8, 2015

Season 8 superfinal, games 91-100


Finally season 8 has come to an end. The final result of the Komodo-Stockfish match is a win for Komodo, 9-2 with 89 draws. No real surprises here, we've seen this win for Komodo coming for a long time. It even grabbed another win in the last 10 games to increase the lead. The engines and their programmers can take a well deserved break, and then start preparing for season 9 - even better hardware and better engines, fewer bugs and more exciting games.

Game 91 reached a RB vs RB endgame by move 27, with Komodo a pawn up but with doubled pawns. The evals quickly dropped to 0 and the bishops and pawns were gradually exchanged. The game ended in a 6-man tablebase draw where Komodo had a two pawn advantage, the f+h rook endgame - easy if you have access to 6-man tablebases. Game 92 was very short, a 3-fold repetition on move 26 with a lot of pieces still in play.

Game 93 started with an eval advantage of over 0.6 for Komodo and a pawn advantage as well. The evals jumped up to over 1.2 when Stockfish was tempted to take a pawn, and Komodo gave a rook for a bishop to gain a passed pawn and a strong pair of bishops. Komodo fans started to fantasize about another win but Stockfish patiently defended, blocking the center with a knight, giving back the exchange and trading rooks. Komodo remained optimistic for a while longer but in the end the kings were too exposed and the game ended with perpetual check. In game 94 Stockfish could not hold on to the initial eval advantage and by move 34 the only pieces left were the queens. It took a while for the game to be adjudicated because of all the pawn moves and captures, but the draw was inevitable.

In game 95 Komodo had a small advantage after the opening even though Stockfish was a pawn up. Black's position was very cramped and less developed than white at first, but after a while the position opened a little and it seemed Stockfish could hold out. Komodo's eval started to rise again to over 1, causing more anxiety for Stockfish fans. At one point Komodo regained the pawn and had a dangerous passed pawn, but after queens were exchanged the position stabilized at a RB vs RB ending with opposite color bishops and Komodo a pawn ahead. It took a lot more moves for both engines to see that the position was drawn. In game 96 Stockfish regained the pawn very quickly, and there were many exchanges in the opening. The game reached a BBN vs BBN position on move 23, and the evals dropped after knights were exchanged. Stockfish kept a small eval that let the game continue for a long bishop shuffle before agreeing to a draw.

Game 97 was more or less balanced with a small eval advantage for Komodo. Stockfish seemed to be defending well until move 30.



For no apparent reason Stockfish weakened its king position by moving the f pawn forward. The evals started to jump immediately and within a few moves the h file was open for attacking the king.


Stockfish position deteriorated very fast. After the queens and a few pawns were eliminated the game was stopped with another Komodo win.


Komodo is only a pawn ahead but the b pawn is unstoppable with too many black pieces stuck on the king side. Another case of Stockfish not playing well in a closed position. 9-2 Komodo, not even a miracle can change the result now. In game 98 pawn lines were formed very quickly and both engines started to shuffle pieces at move 16. From move 38 the pawns became static and the game continued until nearly the 50 move rule, when Stockfish lowered its eval enough for the game to be stopped.

In Game 99 Komodo had an eval advantage of about 0.5 with many exchanges after the opening. Stockfish sacrificed a knight for two pawns, this time as a defense and not an attacking move. Pieces were gradually exchanged and the position simplified to a RBN vs RB ending. After the bishops and all white pawns were gone the RN vs R game was theoretically drawn, it just took a while to get there.Game 100, the last game, everyone was tired and wanted to go home, including the engines. Stockfish had an eval advantage for a while, but the pawn structure became static on move 26 and then the evals reached 0. The game was adjudicated as fast as the TCEC rules allowed.

Saturday, December 5, 2015

Season 8 superfinal, games 81-90


After 90 games in the Komodo-Stockfish superfinal match, Komodo is leading 8-2 with 80 draws. With 10 games left there is no question which engine is going to win. Cato's openings are now 5/24 decisive, quite a change comparing to the first 5/66 decisive games. Stockfish has managed to win a second time, a small consolation for all the games Komodo has shown its superioirity.

In game 81 there were many exchanges in the opening stage and by move 30 the queen side was cleared and the pieces left were RB vs RN. Komodo was a pawn up but there wasn't enough material to increase the advantage. The game was adjudicated shortly after the rooks were exchanged. In game 82 many pieces were exchanged as well. Stockfish sacrificed a bishop for two pawns to get a pair of connected passers, but Komodo responded by giving back the material to stop the pawns from marching.This led to a drawn RN vs RN ending.

In game 83 there was some drama not directly related to chess. It started with an eval advantage for Komodo which gradually grew. It got to a point where the trend was clear and both engines seemed to agree that Komodo is going to win. I had something to do and did not watch for a couple of hours, but when I came back the game was still going on, or rather it was replayed. Later I understood from the chat that the server crashed in a clearly winning position for Komodo. There were some angry Komodo fans, but the protest wasn't so loud because Komodo was leading 6-1 at this point - if it were Stockfish the noise would still be heard.
When game 83 was replayed Komodo again started with an eval advantage that grew to over 1. Komodo won a pawn in a complicated position.



The evals stayed about the same for the next 15 moves while there were many exchanges on the board. It was not clear if a single pawn would be sufficient for a win with this pawn structure and the remaining pieces.



After the rooks were exchanged the black DSB was very weak and the LSB could not afford to be exchanged, allowing Komodo to gain another pawn.



Now the game was over, Stockfish could not defend against the king side pawns without losing more on the queen side. So in the end Komodo won in the rematch and the server crash did not change the result. For game 84 Stockfish fans hoped that if Komodo could win twice in a row as white then perhaps Stockfish could as well.However, with Stockfish as white the evals went down very quickly and material was equal. Each engine had a passed pawn but neither was able to get an advantage in the game. When both sides started to shuffle the game was adjudicated. Komodo was at 7-1, a bit embarassing for Stockfish.

In game 85 the board was cleared very quickly leaving a lot of space for the heavy pieces, especially on the queen side where there was only one pawn left by move 22. On move 38 an endgame of RPP vs RP was reached which was theoretically drawn. Komodo kept an eval over 0.6 which meant the game would be played on for a long while. It took another 60 moves before the game was stopped. Game 86 started on a different path, with pawns blocking the center and pieces shuffling behind. There were opportunities for flank attacks but with equal material and both evals at 0 it seemed like a potential quick draw.



Then out of nowhere the evals became negative at about -0.9, Komodo was pressing on the king side and Stockfish defending. Another case of "shuffle to Komodo win" for this match? But where was the win coming from? Knights were exchanged and with so many pawns the heavy pieces had a hard time moving. Komodo was able to infiltrate white's ranks and to get a pawn advantage, but there was a long sequence of shuffling moves with no eval change, perhaps Stockfish is holding? After queens were exchanged Komodo started to improve its eval.



One pair of rooks was exchanged and the black king attacked the central white pawns. Stockfish's only asset was the passed a pawn but it was not enough.



There was no way for Stockfish to keep the a pawn or to defend against all of Komodo's pawns advancing. 8-1 for Komodo, unbelievable, inconceivable (as Inigo would say...).

Game 87 was very quiet, reaching a BNN vs BNN endgame on move 29. The pawns and pieces were gradually exchanged and the game reached a tablebase draw. In game 88 Stockfish started with a small eval advantage, but around move 20 it started to jump up to a level of 1.5, while Komodo remained skeptic. And then came the knight sacrifice.



We haven't seen such a move from Stockfish in a long time. Right away Komodo saw it was in trouble, with too many pieces on the queen side and a vulnerable king side. There came a beautiful series of moves, Stockfish opened the king side and forced a series of exchanges that left it two pawns ahead.



The game wasn't formally over for another 25 moves but there was no doubt that Stockfish would win, two pawns in the endgame is just too much at this level of play. This was a totally unexpected win for Stockfish. Not that 8-2 is a lot better than 8-1, but this is the style we love to see in Stockfish games, and Komodo doesn't usually allow this to happen.
 
Game 89 reached an RB vs RN endgame by move 28. Komodo's small eval advantage was gone after the rooks were exchanged, and the game turned into a queening race. Both engines queened a pawn which eventually led to a tablebase draw. Game 90 reached a RRN vs RRN position in move 24. Stockfish had a pawn advantage but weak pawn structure with two pairs of doubled pawns. Stockfish rooks were more active and the eval increased to 0.6. Komodo defended well and the evals remained constant until dropping to zero as the game winded down to another tablebase draw.

Tuesday, December 1, 2015

Season 8 superfinal, games 71-80


After 80 games in the Komodo-Stockfish superfinal match, Komodo is leading 6-1 with 73 draws. In the last 10 games Komodo has struck twice, both wins in black, both started with white having an advantage. With only 20 games left is seems almost certain that Komodo will win the match. The two wins by Komodo also show that it is better than Stockfish in getting out of long shuffles with a winning position.

With two decisive games and several exciting draws, Cato's opening choices are doing well.

Game 71 started with a small eval advantage for Komodo, which then decreased gradually to 0 when there were only RRN vs RRN left. Stockfish had a passed pawn that wasn't going anywhere but may be the reason Stockfish gave a negative eval at this stage. There came a long period of shuffling that got close to the 50-move mark, and after a Komodo pawn move there came a gradual removal of all pieces. The game stopped at a drawn RN vs R tablebase position. Game 72 started similarly with a small eval advantage for Stockfish. Starting from move 20 the engines shuffled for 25 moves, while all pieces were still on the board.

Here Stockfish pushed the b pawn with Komodo countering with the f pawn, a few moves later the board was less crowded.

Stockfish's king looked a little vulnerable, and the evals favored Komodo - why stop shuffling if this is the result? Komodo put its knight on f3 making life harder for the white king and gradually increasing the eval. After queens were exchanged Komodo put a rook on the second rank and the pressure on the white king increased.


Could Stockfish hold this position? After a rook exchange Komodo used a threat on the h pawn and its passed e pawn to force Stockfish to lose the bishop for a pawn.


Stockfish was lost here, both engines saw that the white pawns were soon to be captured and the last black pawn couldn't be stopped. Stockfish lost the game just because it wouldn't continue the shuflling, and Komodo saw how it could turn the game around better than Stockfish. Well done Komodo, Stockfish needs to improve its skills.

Game 73 was a bit wild, with exposed kings and advancing passed pawns for both engines. Komodo started with an eval advantage, but as the game progressed and the threats became evident the evals went closer to 0, and then Komodo went for a RNP vs Q trade. What could have been an interesting imbalance turned into a perpetual check draw in a few moves. Game 74 started with a rook for bishop exchange by Komodo, followed by a queen exchange, but then the action stopped. By move 22 the game reached a RRB vs RBB endgame, and gradually the pawn structure made it difficult for the pieces to move and a draw was adjudicated.

In game 75 the evals went down to 0 in a quiet game, and then when the draw was sure the action started. A rook for bishop exchange, a rook and queen sacrifice followed by a queening and regaining the rook, and finally another  rook sacrifice and a perpetual check. A roller coaster draw. In game 76 Stockfish was able to keep an eval advantage of about 0.7 well into the game, reaching a RB vs RN endgame by move 30 with a pawn advantage. That's as far as it got for Stockfish, Komodo patiently exchanged pawns and the evals kept going down until they reached 0 again.

In game 77 all the queen side pawns were taken by move 21, and by move 31 the only pieces left were B vs N. The game continued until a tablebase draw, at least the game was relatively short.In game 78 most of the pawns remained on the board with the heavy pieces in a standoff behind them.

Stockfish started seeing repetitions in the PV while Komodo saw a small advantage in eval, two warning signs for Stockfish fans. Stockfish put all possible pressure on the c6 pawn, neglecting the king side.



Komodo very quickly took advantage, breaking the pawn structure on the king side and trapping the white king.



By the time Stockfish could untangle its pieces it was too late. It was an exchange down, the king trapped and with too many pawns to defend.



The game was adjudicated but the PV shows that once queens are exchanged there is nothing to stop the rook from attacking the pawns from behind, the bishop cannot defend them all and the king is too far away. So, another win for Komodo, again showing it gets out of pawn blockades better that Stockfish. Is Komodo just seeing farther than Stockfish? Is this the result of a bug?

Games 79 and 80 started with a pawn advantage for white out of the opening. In game 79 after many captures by move 24 all queen side pawns were gone except for a passed pawn for Komodo, and a few moves later the remaining pieces were BN vs BN with opposite colored bishops. Komodo kept an eval advantage for many more moves but could not advance the passed pawn or make any progress on the king side. After a few more exchanges the game was finally adjudicated on move 113. In game 80 Stockfish kept a pawn advantage on the queen side but quite unexpectedly gave a rook for a knight. The white pieces were much more active than the black pieces as compensation, and Stockfish managed to capture a second pawn. In the RN vs RR endgame Komodo blocked the white pawns advancing and finally gave the exchange back to get a pawn back. Material equality was reached after the remaining rooks were exchanged and though both sides queened a pawn no side had an advantage.

Season 8 superfinal stats

Draw rate, wins


Final draw rate was 89%, very high but perhaps expected since it is very hard to beat these engines starting from a close to balanced position. The openings Cato chose in games 67-100 were slightly more unbalanced, and their draw rate was only 82.4%.

Moves per game


Average=63.26
Median=55.75

Games were much shorter than I expected. The draws tended to be short where both engines had 0 eval and the TCEC adjudication stopped the game. The median number of moves in the decisive games was 74.5.

Time per game (hours)


Average=5:36
Median=5:27

My prediction for time per game in the superfinal was off by 45 minutes... The short draws were something I didn't think would happen. In the end the games of the superfinal were similar in duration to the games of stage 3, even though each engine had 30 more minutes.

Openings

The first letter of the ECO codes of the superfinal openings was distributed as follows:

More or less even, biased for irregular openings and against open games and Sicillians.

If we use the opening 'family name' (using format FAMILY_NAME: VARIANT....) the top 3 are:

English - 16 times
Sicillian - 12 times
QGD - 8 times


Reverse pairs, wins


As much as Cato tried to choose biased openings, the engines still found ways to draw. Still, excellent choices by Cato since there were no biased 1-1 results.


Reverse pairs, same moves

How many plys did the engines play after book until the first divergence in the reverse games? 


Divergence was usually within the first move (2 plies). This shows that Cato chose openings that didn't have forced continuations so that each engine could try its own strategy. The longest the two engines agreed was 13 plys in games 47-48.