Say you have a database of a lot of games.

How would you go about finding good tactics problems? I suppose you would search until there was a spot where the score shifted, and there was only one good move on the previous move. But that isn't the whole story, sometimes you need to go back a couple of moves to find where the tactic really started.

For now, ideas of how to do this manually is fine (with the help of an analysis engine), but automating this process is the idea.

3 Answers 3


One approach might be to go through all the moves of a high level game, and if the engine evaluation changes significantly, then save the position for human review.

In this case, "significantly" is probably half a pawn or more, although you could also require it to be one full pawn for easier tactics.

The rationale behind only looking at high level games is that the score will really only change significantly with a blunder. High level games won't have obvious blunders (i.e. hanging a piece) so the blunders will possibly be a not-so-obvious tactic.

This won't be perfect, but it might get some positions worth looking at "by hand".

Just one more note - if you allow the chess engine to search to a sufficient depth (14-16 in most positions should be good) - then you won't have to worry about missing the start of the tactic. The engines will be able to see most tactics, even if they are complicated.


If you want to find extremely tactical games, start by looking at extremely tactical players (Alekhine, Tal and Fischer and any other crazy chess guy you like).

Second best would be games between any grandmasters, regardless of the century the game was played. Chess tactics almost always show up even in the most positional of games.

If you want to find tactics that win early on, search for miniatures (games that end in a win in, let's say, less than 30 moves).

There are sites out there that let users save chess collections (chessgames.com is one example, there are a few good results if you search for tactics or famous players). But you said you have a database in which you wish to search, so you might not be interested in this.

Also not involving your chess database, you could find plenty of variety in tactics in books written by chess coaches or in video playlists created by chess coaches (my favourite example here would be MatoJelic, but there are many more).

If you want to find games that involve a lot of captures, search for the number of x occurrences (if you have a database with games in PGN and you know regular expressions you could search for occurrences of x in consecutive moves but that won't get you enough value for the effort, so i wouldn't recommend).

What you can't find are tactics that are avoided. At least you can't find them by looking at the game moves alone. You'll need a human to say what if...?, then make the move, then check with a computer.

  • 1
    I guess I could have worded my question more clearly, but what I meant was I wanted to pull out specific positions that involve tactics from my database, in order to present them as interesting problems (it seems to me that chesstempo must use something like this to find its tactics problems). May 12, 2012 at 5:53

I guess I could have worded my question more clearly, but what I meant was I wanted to pull out specific positions that involve tactics from my database, in order to present them as interesting problems (it seems to me that ChessTempo must use something like this to find its tactics problems).

Just brainstorming here, but as a programmer, I can see a way to do this. Get Stockfish and write an application that submits the position to it. Save the evals, and when the eval changes significantly (whatever that means lol), save that position as FEN along with the "solution". I have most of the code to do the grunt work, I don't think it would be hard to write this. I just don't have the interest as a hobby to do this.

How do you get the positions to submit to Stockfish? For that, you iterate on a file containing many PGN formatted games, and generate the FEN for each virtual board position. I have already written similar code in C# and Java.

  • I've actually done some work on this since asking this question: gist.neo4j.org/?6506717 :) Dec 22, 2013 at 16:20
  • Nice! Is your approach saving out every FEN position in a game, and using that as a database? I don't think chessTempo is going that far, but this is an ambitious idea if that's what you're doing. I would think it's going to be extremely large with many games. But if all you want is to extract tactical problems to present a`la ChessTempo, I don't think you need the queries.
    – ezaspi
    Dec 22, 2013 at 17:09
  • What I want, as a Chess player, is something your work might solve. We all want to improve our game. If I can feed all my games to your program, and have it classify my mistakes, I could understand better where I need to improve. Chess.com tracks your history of tactics, and does something similar. But many of its tactics are not realistic to me. Your program would be much more personal!
    – ezaspi
    Dec 22, 2013 at 17:14
  • One more thing, if you look at CTART (google it, IMO the best database of tactics problems) you will find the developer took the positions from real games. He even references the games! However, to avoid the copyright issue, he removes a single pawn that is inconsequential to the position. Given the huge amount of games CTArt has, one can appreciate the effort was huge. Get a copy on Amazon. :)
    – ezaspi
    Dec 22, 2013 at 17:20
  • Cool. I've registered the domain chessgraph.org, although nothing is there yet. Hope to get something where you can submit PGNs and have the game analyzed by stockfish, and have the games connected by their FEN positions. We'll see how fast it blows up. :) Dec 22, 2013 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.