22 July 2020

Publishing games online using the ChessBase replayer

A question recently came up on the Chess.com forums about using Blogger with ChessBase to publish games; this blog switched to using the ChessBase online replayer back in 2018.

Since the instructions at the ChessBase site aren't quite step-by-step, I thought it was worth responding. It's worth noting that this doesn't require any ChessBase software, just a PGN file of the game, so anyone can use it to embed a game in a post.

Here's my answer reproduced:
If you're trying to use the ChessBase program's publish game feature, Blogger isn't going to work with it unless you host the game file separately and then link to it, which kind of defeats the purpose of using Blogger in the first place rather than your own web hosting solution. 
What does work in Blogger is the online ChessBase PGN publishing feature, which embeds the ChessBase game replayer in the post. I switched all of the pathtochessmastery.com published games to it back in 2018, you can take a look there if you want to see the results.
There are two things to do in Blogger to make the game replayer work. I'm still using the old Blogger interface, btw, so the new interface may be slightly different. 
1) In a post where you want to place a game, paste the PGN into the html view of the Create Post screen, wherever you want it to go. Then put
<div class="cbreplay">
right above the start of the PGN, and
</div>
at the end of it. If you post multiple games, do this only once, at the top and bottom of the entire group of PGNs. 
2) To enable the replayer function, do the below once for your blog.
Edit the html formatting for the blog by going to Design - Theme - Edit HTML button.
Towards the top of it (I put it around line 14 in mine) paste the following three lines and save/update
<link href='https://pgn.chessbase.com/CBReplay.css' rel='stylesheet' type='text/css'/>
<script src='https://pgn.chessbase.com/jquery-3.0.0.min.js'/>
<script src='https://pgn.chessbase.com/cbreplay.js' type='text/javascript'/> 
Note that this is done via https, so make sure that is enabled by default in the Blogger settings.

15 July 2020

Annotated Game #247: Winning this game, again

This first-round win highlights a concept mentioned before on this blog as one of the keys to gaining playing strength (and rating points) - identifying, studying and exploiting common errors made by opponents in the opening systems you play. This means not just memorizing trappy lines, but understanding the fundamental characteristics of the positions into the early middlegame.

In this game, which features the 3...c5 variation of the Advance Caro-Kann, that key element is the struggle for the d4 square, which is occupied by a White pawn. If White is not careful, Black can pile on the pressure and end up a pawn. Through experience, I've seen how this situation can sneak up on White if they just ignore the potential problem. So essentially I've won this game before, by picking up the d-pawn while not allowing White any counterplay. This gives Black a comfortable strategic edge, if not quite an outright victory.

Here, White went down this oblivious path, missing a last chance on move 12 to avoid problems, although the necessary sequence (found by Komodo) is long, complicated, and unlikely to be calculated over-the-board. Of course obtaining an advantage doesn't mean that your opponent goes away, or that you can put your own play on autopilot. The final outcome required careful play from move 14 on, but at least was relatively simple.

It's worth highlighting that finding the most rapid way to a win is irrelevant to the outcome. It's better to keep the advantage in hand, snuff out any counterplay from your opponent in advance, and win easily, rather than try to always play "best" moves and win quickly. This is even the case when you are low on the clock, since calculating "best" moves accurately can actually take longer - especially if the variations are more complex and you need to be absolutely sure of them, rather than simply blunder-checking the "good enough" ones.

[Event "?"] [Site "?"] [Date "????.??.??"] [Round "?"] [White "Class B"] [Black "ChessAdmin"] [Result "0-1"] [ECO "B12"] [Annotator "ChessAdmin/Komodo 13.2"] [PlyCount "94"] 1. e4 c6 2. d4 d5 3. e5 c5 {a secondary but still popular line of the Advance variation of the Caro-Kann, with the main one being ...Bf5.} 4. Nf3 Nc6 5. c3 Bg4 {the point of not previously playing ...e6 and locking in the bishop, which now can go to g4 with the pin on the Nf3. This is more important in this line than in some others, as there is a big fight for d4.} 6. Be2 e6 7. Be3 ({ Relevant:} 7. Nbd2 Rc8 8. O-O a6 9. h3 Bh5 10. Re1 Bg6 11. Nf1 cxd4 12. Nxd4 Nxd4 13. Qxd4 Ne7 14. Bg5 h6 15. Qa4+ Qd7 16. Qxd7+ Kxd7 17. Be3 Nf5 18. Bf4 Bc5 19. Rad1 Rhd8 20. g4 Ne7 21. Be3 Ke8 22. Bxc5 Rxc5 23. Ne3 Bh7 24. f4 g5 25. Ng2 Be4 26. Bd3 Bxg2 27. Kxg2 gxf4 28. Kf3 d4 29. cxd4 Rxd4 30. Bb5+ Rxb5 31. Rxd4 Ng6 32. b4 a5 33. a4 Rxb4 34. Rxb4 axb4 35. Re4 b3 36. Rb4 Nxe5+ { Yuffa,D (2534)-Romanov,E (2619) Sochi 2016 0-1}) 7... Nge7 {ignoring the c-pawn in favor of development.} 8. h3 Bxf3 {removing a defender of d4 and not wasting time with the bishop by retreating.} 9. Bxf3 Nf5 {increasing the pressure on d4 and clearing the diagonal for the Bf8. Although the c-pawn is still hanging, capturing it would lose the e-pawn for White.} 10. O-O cxd4 { it is sometimes difficult to understand at what point it is best to exchange the pawns or keep the tension. Here Komodo evaluates the text move as equal for Black, favoring increasing the pressure with ...Qb6.} (10... Qb6 $5 { targeting both d4 and b2, which guarantees Black the pawn. Notice that the Nb1 cannot participate in the fight, unlike after the pawn exchange on d4.}) 11. cxd4 Qb6 {now White has a single way to stay level, with Nc3. The sequence is not obvious, however.} 12. Qd2 $2 (12. Nc3 Ncxd4 13. Bxd4 Nxd4 14. Qa4+ Nc6 15. Bxd5 {regains the pawn, in a very non-obvious way, as White has compensation if the bishop is captured.} exd5 16. Nxd5 Qd8 17. Rad1 Be7 18. Qb5 Rb8 19. Nf6+ Bxf6 20. exf6 (20. Rxd8+ Bxd8 $15) 20... Qxf6 21. Qc5 $11) 12... Ncxd4 { I thought here for a while to make sure the correct knight was being used.} ( 12... Nfxd4 {is inferior, for example} 13. Bh5 Qb4 14. Nc3 Nf5 15. Bf4 $17 { and compared with the game continuation, White retains the two bishops and is better developed.}) 13. Bd1 {now Black no longer has the ...Nxf3 tactical resource, so it's time to trade off the pinning bishop.} Nxe3 14. fxe3 { the trade-off is opening the f-file for White's rook versus creating a weak, doubled e3 pawn.} Nc6 $19 {at this point I judged that Black has a strategically won game, being up a pawn and with White's pawn structure shattered in the center. I still have to watch things like the weak f7 square though.} 15. Nc3 Bc5 {targeting the weak e3 pawn.} 16. Re1 O-O {I thought about taking the e5 pawn, but thought that improving king safety and dynamic play would be better than pawn snatching. Komodo agrees.} (16... Nxe5 17. Ba4+ Ke7 {is still winning but gives White extra chances, or at least hopes.}) 17. Rc1 d4 {I judged that the pawn advance would force the issue in the center and open it to my benefit. White's next move had to be taken into account, though.} (17... Nxe5 $5 {might be a simpler path, now that there is no downside to the capture.}) 18. Na4 Bb4 (18... Qb4 {is the other possibility.}) 19. Qc2 { not the best square for the queen, but White is lost anyway at this point.} ( 19. Nxb6 $6 Bxd2 20. Nxa8 Bxc1 {and I should pick up more material.}) (19. Qe2) 19... Qa5 20. Re2 dxe3 21. Qe4 {this was unexpected. I decided to take the opportunity to simplify.} Qxe5 22. Rxe3 {my opponent evidently thought this was a clever intermediate move before capturing the queen, but I have one too.. .} Bd2 {the bishop fork stays valid after the queen exchange on e5.} 23. Qxe5 Nxe5 24. Rxe5 Bxc1 {the extra exchange now seals the game, as my technique is sufficient to win.} 25. Bf3 Rad8 {favoring rook mobility over trying to hold onto the pawn.} 26. Bxb7 Rd1+ 27. Kf2 Rfd8 (27... Bxb2 $5 28. Nxb2 Rd2+ 29. Ke3 Rxb2) 28. Bf3 R1d2+ 29. Ke1 Bxb2 30. Nxb2 Rxb2 {now with a two-pawn and exchange material advantage and no White counterplay, it really is a matter of technique.} 31. Ra5 Rdd2 {being careful here, to calculate avoiding any back-rank issues.} 32. Rxa7 Rxa2 33. Rb7 g6 34. Rb1 Kg7 35. Kf1 Ra7 36. Re1 Rda2 37. Re3 Rc7 38. Kg1 h5 39. Kh2 Re7 {perhaps not the fastest plan, but the idea is simply to get a rook behind the passed e-pawn and push the pawn majority up the board.} 40. Kg3 Ra5 41. Re4 f5 42. Re1 e5 43. Re2 e4 44. Re3 Rd7 45. Be2 Rd2 46. Kf4 Kf6 47. h4 Raa2 0-1

02 July 2020

Training quote of the day #31: Kayden Troff

From GM Kayden Troff's blog "The Ongoing Life of Chess":

Be Honest with Yourself

This may be something you don’t really think about when it comes to improving in chess, but I think we all (especially chess players) have a tendency to overstate our mistakes or try to ignore them. We need a good in-between, which is honesty. Now the obvious question is why is that important? Well, I think of it as fixing a hole in a tire or fixing a leak in the pipes in your house. You can’t really do anything until you actually locate where the problem is. But once you do then you can decide the measures you need to take to fix the problem. And it is the same in chess. To fix the things you need to fix you first need to understand what you need to fix. And that is where honesty comes in. When you are honest and objective about the mistakes you are making then you are identifying the problem and thus one step closer to fixing it. Sometimes it is difficult to identify the problem yourself and that is where outside assistance comes in, but even then you have to be honest and humble in being able to say whether or not someone’s suggestion of what you need to work on is a correct suggestion. Honesty is not just accepting it, but it is not just rejecting it.

Full post: https://www.chess.com/blog/Troffy/the-road-is-not-the-same-for-everyone

29 June 2020

No draws

One of the chess books I read during my early scholastic career - it might have been GM Larry Evans' Chess Catechism - had a short anecdote about Bobby Fischer being offered a draw at a major tournament, in a very equal position; his opponent got the response "no draws!" At the time, I was rather enthusiastic about draws, to be honest, although intellectually I understood the idea of "no draws" even as I rejected it. As my chess understanding has matured, however, I've come around to more of a "no draws" mentality - although not as an outright refusal to take a draw under any circumstances, which is what I originally thought it meant.

Rather than a principle to be upheld unto death, I believe it is better to think of "no draws" as a mindset. The purpose of a competitive chess game is to win; failing that, to draw; failing that, to lose. There can be social aspects to chess, along with other factors that may come into consideration, but in the end we all normally want to win. The problem comes when our desire to avoid losing becomes stronger. At that point, I believe it will become very hard to make further progress along the path to chess mastery, unless the fear of losing can be accepted and in turn mastered.

In order to win more games, it is an unavoidable fact that more games will have to be played, meaning more losses as well. It also means that games that are balanced or draw(ish) should still be played out, as a rule. This builds positional understanding over time, going significantly beyond simply looking for winning tactics in every position. At the professional level, Magnus Carlsen is the latest and greatest professional to be able to squeeze wins from apparently dead equal positions, but this is actually a common phenomenon when stronger players when face weaker ones. Some players deliberately aim for this type of style (as IM Jay Bonin describes in Active Pieces), but in many cases it reflects a stronger player being able to implement their better understanding of the game, or them deliberately playing on long enough for their opponent to make a significant mistake. Hard to accomplish that if you regularly take an early draw.

So what does the practice of "no draws" look like at a practical level? Here is my scheme for it:
  • I will not ask for a draw unless the position is actually dead drawn. This means there is either a draw by repetition coming, or it is a theoretical draw in the endgame.
  • If my opponent asks for a draw, I will not accept it unless I think a draw is the best (and most likely) result for me.
The first point takes care of the majority of the angst usually involved in thinking about draws. If you enter a game with the mindset of playing it out, then there is never the need for a decision - and the added stress that comes along with it - about when to request a draw yourself. This has some other positive effects on your ability to improve as a chessplayer, such as deeper experience with positions reached and a better ability to play endgames. One of my persistent weaknesses has been the endgame, in part because early on I happily took draws to avoid going into them. This is a self-defeating practice in the long run.

The second point, concerning what to do when a draw offer is received, is that it should be treated as a welcome admission from your opponent that they no longer think they can win the game. Following some old tournament advice, you now have the opportunity to take as much time as you like (that is still on your clock) to consider the offer, since it cannot be withdrawn.
  • If you assess you can play on without risk and have at least a slight advantage, then the decision is easy to reject the offer.
  • If there are other factors in play, such as lack of clock time, then you may have to be practical about it and take a draw if you honestly assess that you could not win (or could very easily blunder) before making the next time control. This is where "no draws" becomes a guideline rather than an iron rule. 
  • In longer games, fatigue and declining calculating ability at the board may also be a consideration, even if enough time remains on the clock. Your own objective self-assessment as a player is what you must rely on for your decision.
  • In the end, the burden of proof should be on the reason to take a draw; the default should be to reject the offer.
Following the "no draws" mindset is one of the things that has measurably boosted my strength over the last several years, including my best game ever. Once you start seeing practical results from this approach, it's easier to put aside the loss avoidance reflex and concentrate more on the progress you can make over time. Plus, I've honestly found it more fun to have the appetite to play a full game, rather than worrying about making or accepting draw offers.

06 June 2020

Annotated Game #246: A thematic Stonewall victory

This last-round tournament game is thematic in a number of ways, not just for the opening in consideration. I had only played a handful of Stonewall games at this point, and it's clear through analysis that I missed some subtleties (and not-so-subtle aspects too). It is exactly this process of experience, analysis, and understanding that drives improvement, however, whether it's a new opening you are playing or any other aspect of your game.

Here I was fortunate enough to win in the end, pressing through a kingside attack that finishes nicely, but could have been defended against (or completely refuted) by exchanging one of my primary attacking pieces. I would also like to highlight some more universal chess observations that stemmed from the analysis, including about how Class players think.
  • White's opening a3 and h3 rook pawn moves are a common tendency among players at a certain level. It struck me during the game that my opponent was playing these moves more as a "system" or automatically, rather than through careful consideration of the needs of the position; a3 in particular looks out of place. The time lost was not decisive, but it allowed me to accelerate my attack plans and grab the initiative.
  • My opponent prematurely resolves the pawn tension in the center on move 9, a common mistake previously discussed in Annotated Game #245; it's interesting to see how these kinds of themes keep cropping up in games and analysis.
  • I missed two key strategic (and tactical) ideas involving piece exchanges and mobilization. I never considered trading off my well-placed Ne4 during the game, although the knight could have profitably given itself up for White's dark-square bishop. A related idea was mobilizing the Nd7 sooner, with the general principle of bringing more pieces into an attack.
  • As previously highlighted in Pitfalls of Computer Analysis, trusting superficial engine assessments can lead you astray. Here on move 16 that would have lead to thinking ...Qh4 was a mistake, based on an initial full-game analysis pass.
  • There are a number of calculation mistakes on both sides regarding the kingside attack that Black launches, starting around move 14. For my part, it reinforces the fact that I should be looking harder for my opponent's ideas, including in this case the very disruptive idea of Nxe4. In general, though, the process and outcome is an object lesson on the practical benefits of the initiative of being the attacker, since an under-pressure defender usually has more costs associated with calculation failures (mate, in this case).
[Event "?"] [Site "?"] [Date "????.??.??"] [Round "?"] [White "Class C"] [Black "ChessAdmin"] [Result "0-1"] [ECO "A84"] [Annotator "ChessAdmin/Komodo 13.2"] [PlyCount "46"] {A84: Dutch Defence: 2 c4 Miscellaneous} 1. d4 d5 2. c4 c6 3. Nc3 e6 4. Nf3 f5 {the Slav Stonewall} 5. a3 {this neglects development} Nf6 6. h3 $146 {Secures g4, but also neglects development. We are now out of the database.} Bd6 { Black has now reached the standard Modern Stonewall setup. With White underdeveloped, Black has equalized by this point.} 7. Bd2 {a rather passive choice for the bishop.} (7. Bg5 h6 $11) 7... O-O 8. e3 Nbd7 {this is where I had my first real think. I defer for the moment deciding on where to put the light-square bishop.} (8... b6 9. Be2 Bb7 $11) 9. cxd5 $6 {this prematurely releases the pawn tension in the center. If Black can recapture with the e-pawn in the Stonewall, it usually is an advantage, since the c-file remains blocked for White while the half-open e-file can be better exploited by Black.} exd5 $15 10. Be2 Ne4 {the thematic Stonewall knight jump.} 11. O-O Qf6 { this is another strategic point for thought. The square f6 can be used by the queen, the Nd7 or the Rf8, so Black needs to formulate a plan here.} (11... Qe7 $5 {Komodo agrees that developing the queen is a good idea, but prefers e7. One point is that it fights for control of e5 just as well from here, leaving f6 free for another piece.}) 12. Qb3 {this normally would signal a desire by my opponent to pursue a queenside strategy, also importantly occupying the a1-h8 diagonal. This allows some tactical ideas based on the d5 pawn pin. Having learned my lesson in a previous game, I move my king out of the line of fire.} Kh8 {this also clears g8 for a rook.} 13. Rad1 $6 {this does nothing for the rook, as it has no future on the d-file, and contradicts to some extent the previous queen move.} g5 {I now get a standard kingside attack rolling.} (13... Nxd2 $5 {is a better version of the idea, as found by Komodo. The removal of the Bd2 gives Black an advantage on the dark squares, as well as weakening the defense of f4.} 14. Nxd2 (14. Rxd2 g5) 14... g5 {with the idea of ...Qh6 and ...Nf6 to mobilize additional forces, and ...g4 and ..f4 to storm the king position.}) 14. Nh2 $6 {a premature retreat. White would do better to exchange his largely useless Nc3 for my well-placed Ne4 first.} (14. Nxe4 dxe4 15. Nh2 $15 {Black has only a slight advantage, at most, as White can defend his king and has ideas of pushing d4-f5.}) 14... g4 $2 {played after a lot of thought, but a mistake. I am missing both the ...Nxd2 idea and the key follow-up of ...Qh6.} (14... Nxd2 $5 {again is the key idea.} 15. Rxd2 Qh6 $17 {now ...g4 is a real threat, especially after ...Nf6.}) 15. hxg4 $6 { this misses my next idea.} (15. Nxe4 $5 {would allow White to at least equalize.} fxe4 16. Nxg4) 15... Bxh2+ {this also took a good deal of thought, but this time with success...mostly.} 16. Kxh2 Qh4+ {here a previous version of Komodo (11.2) on the first pass thought this was a mistake, instead preferring ...Qh6, as does version 13.2 initially, but after some additional time the engine agrees the text move is best.} 17. Kg1 fxg4 $4 {Komodo via the Fritz interface gives this two question marks, since White now has an only move that wins. Another long think that does not go well for me, in a complex position.} (17... Ndf6 18. Qb4 Rf7 19. Nxe4 Nxe4 $17) 18. Be1 $2 {a logical defensive idea in general terms, but White is better by exchanging off the Ne4 attacker, which also opens up the center.} (18. Nxe4 $1 dxe4 {and now White breaks through in the center while Black's attack has evaporated.} 19. d5 $18 { and now after Bc3, White will cut into Black's position along the diagonals and also the d-file.}) 18... Rf6 $2 {the idea of a rook lift does not lose, but ignores the correct path to victory. The f6 square is better used to mobilize the Nd7, which also opens up the Bc8's path to the kingside.} (18... Ndf6) (18... Nxc3 $5 {followed by ...Rf6 also should win and may be a simpler path.}) 19. f3 $4 {this loses, as I had calculated.} (19. Nxe4 {again would save the game.} Rh6 (19... dxe4 $2 20. d5 $18) 20. f4 Qh2+ 21. Kf2 $11) 19... g3 $19 20. Bxg3 {forced} Nxg3 21. Rfe1 Rh6 {I chose this as a certain win, not being able to fully calculate the ...Nh1 idea at this point, due to fatigue.} ( 21... Nh1 {can be played immediately here.}) 22. Rf1 {now with f1 blocked and the rook already on h6 cutting off the h-file, the tactical idea is much clearer.} Nh1 23. Rfe1 Qf2# 0-1