Tuesday, December 8, 2009

Creating Tactics Problem Sets From Your Games Using ChessBase Products

I’ve played a lot of blitz online.  A LOT of blitz.  It seemed to me that if these games could be mined for tactical errors, they would make an ideal set of simple tactics problems for drills.  Manually mining them for gold, however, would take forever.  I routinely store and analyze my blitz games, but have been negligent in saving positions into databases for tactics or blunders (a project I started but didn’t keep up with).

One day I thought: what if I take Rybka and tell it to analyze the games to a depth of 5 ply?  That should roughly correspond to a Chernev and Reinfeld-ish “Seeing Three Moves Ahead” or simpler level of tactics, and should be fairly quick.   I was familiar with the ChessBase interfaces for Rybka and Fritz and new that it could automatically generate “Training Annotations”: when you load the game or position, it jumps to a position and opens a window prompting you for the correct move.  I decided to test this idea with my 800 most recent Blitz games (about 10% of my total games on record).


I set Rybka with the ChessBase interface (Fritz and others Chessbase engines should be similar) to do a “Blunder Check” oh a .cbh file of my games with “Training Annotations” checked.  I decided I would limit the set to obvious tactics, so I set the threshold at 300 (3 pawns, so approximately the value of a piece).  200 may be a better number (roughly equivalent to gaining a piece for a pawn), but I found with a threshold of 300 I was still getting results involving smaller advantages.  I set the program to replace the games in the database after analysis and let it run.  At 5 ply, it plowed through the games at quite a good clip.

After the database has been analyzed, and if you have ChessBase, you can right-click on the database in the main console and select “Properties”.  This will open a window that allows you to define what type of database it is.  Choose “training”, and if you want to randomize the questions you can hit the “training” button in this window and check that option. I would suggest not randomizing it at this point, so that you can pass through the first time in order and weed the results.

Depending on how much effort you want to put in, there are two ways to use the results.

The more thorough approach is to copy all the games with a black “tactics” medal to a new database, and proceed to move through them in order.  If there is a game with a training annotation, it will automatically prompt you for an answer (or should…sometimes in ChessBase 9 you have to manually turn the feature on by selecting “Enable Training” under the Game menu).  If you want to prune the game to the moves of interest, you can use the “[“ and “]” keys to delete moves before or after the highlighted move, respectively.  If the game has multiple training annotations, you can save multiple copies of the game and prune each to reveal only one tactic problem.  Otherwise, you have to forward through the moves to get to the next problem, and if you have a long game score you may not see that there’s another “***” lurking below.

If you open a game from the database that lacks a training annotation, you’ll still see that  the engine’s evaluation added as commentary after every move.  If the game earned a black medal, there should be some significant jumps in the evaluations.  You can manually check for tactics with the assistance of the chess engine, and add your own training annotations for certain moves.

However, if you’re lazy like me, and if you have the luxury of a large dataset of games, you can use the second method: just accept the automatically-generated training annotations and banish the other black-medal games to the dust heap.  Sure, there could be gold hidden in those games, but it takes time to pan for it.  You can easily select just the games with training annotations by going to the “Themes” tab in the database window (you may need to install a key) and selecting “Training Questions”…all the games with training annotations will be listed in the bottom of the window.  Select all, copy, and paste to a new database; definite it as a training database, etc.  You now have selectively pulled out only the games with training annotations.

Not all of the training annotations will be correct, but most will.  Sometimes the computer has picked a position where one side has an overwhelming majority, and the computer’s right answer is the one that mates in 18 moves instead of 17 (or, for the losing side, postpones inevitable mate slightly).  Sometimes the position is taken from an endgame, where the short ply length leads to large errors in evaluation.  Occasionally another move will be about as good, or better, and you can edit the training annotation to include it as a correct answer.  I would suggest playing through all the games serially (i.e. not turning on the randomizing feature) and deleting examples that you don’t find appropriate.  For games with multiple training annotations you can save multiple copies and prune each with the “[ ]” keys, as described above, if you want.

I think the advantages of this sort of a tactics set are:

  • they aren’t studies, but actual positions taken from your games.
  • they feature tactics that were either executed or missed by you or your opponent, so they are particularly memorable.
  • there will be a larger variety in difficulty, from pieces en prise up to (and occasionally beyond) the set ply length, which adds a touch of realism and requires you to be objective.
  • the Chessbase training annotations automatically create “Find the Best Move” quizzes.
I already feel that going through this pruned dataset of 549 games that I’m seeing tactics a lot more quickly.  What’s more, my spidey sense for certain motifs has gone up.  For example, I’m picking up on pieces that can be trapped much more often (it’s surprising how often that tactic appears in my games).

I’ve flagged some of my favorite tactics I’ve discovered in this data set with medals, and will be sharing them on the blog.   My next endeavour will be to take my complete database of 8000-odd games and do the same thing.  Based  on my test run, that should give a dataset of around 5000 problems, which should keep me busy for a while.

5 comments:

GM Kishore said...

Hmmm that's a pretty good idea ...Though I've been using these software for a long time this technique eluded me wonder why ?
Let me know more about your experiments in this direction ...
P.S can we the positions (alone or with games) in a zip file ?

regards from India
KK

Grandpatzer said...

I'm not sure how to do that, and personal information would have to be deleted. However, I will be posting positions that I particularly liked on the blog. When I get a chance I may even queue multiple examples and schedule the postings to be spread out over several days.

Right now my top concern is finishing my teaching for the semester :D

Chess friend said...

I'm note sure it is useful to analyze blitz games with computers, this is just another game, blitz moves with bad evaluations can be very good against a human player... Too bad that we play more & more like chess engines.

Anonymous said...

Does anyone know if this will work with chessbase light or perhaps chessdb?

Anonymous said...

Another option is to make a pgn database from your blitzgames and let ChessHero do the work. The engine will randomly choose positions from your base and asks you for the best move. use it for tactical and positional training, simply create bases from your games with your openings and feed it to ChessHero, great opening training. Get it here =
http://innokuo.altervista.org/chesshero.html
ChessHero ships with a pgn database of tactical puzzles (the famous Reinfeld, 2001 positions) already.

Regards, Gilbert