Answers.Body: <p>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).</p>
  
  <p>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.</p>
  
  <p>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).</p>
  
  <p>There are sites out there that let users save chess collections (<a href="http://www.chessgames.com/perl/collections" rel="nofollow noreferrer">chessgames.com</a> 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.</p>
  
  <p>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 <a href="http://www.youtube.com/user/MatoJelic" rel="nofollow noreferrer">MatoJelic</a>, but there are many more).</p>
  
  <p>If you want to find games that involve a lot of captures, search for the number of <code>x</code> occurrences (if you have a database with games in PGN <strong>and</strong> you know regular expressions you could search for occurrences of <code>x</code> in consecutive moves but that won't get you enough value for the effort, so i wouldn't recommend).</p>
  
  <p>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 <em>what if...?</em>, then make the move, then check with a computer.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-05-12T05:53:03.643Z
Answers.Text: 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).
Answers.UserDisplayName: Eve Freeman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2012-05-11T15:42:56.583Z
Answers.LastActivityDate: 2020-03-03T16:59:28.960Z
Answers.LastEditDate: 2020-03-03T16:59:28.960Z
Answers.UserDisplayName: Valentin Brasso
Answers.Body: <blockquote>
    <p>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).</p>
  </blockquote>
  
  <p>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. </p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-22T16:20:57.407Z
Answers.Text: I've actually done some work on this since asking this question: http://gist.neo4j.org/?6506717  :)
Answers.UserDisplayName: Eve Freeman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-22T17:09:41.437Z
Answers.Text: 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.
Answers.UserDisplayName: ezaspi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-22T17:14:42.540Z
Answers.Text: 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!
Answers.UserDisplayName: ezaspi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-22T17:20:21.007Z
Answers.Text: 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. :)
Answers.UserDisplayName: ezaspi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-22T18:48:48.247Z
Answers.Text: 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. :)
Answers.UserDisplayName: Eve Freeman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2013-12-22T14:31:28.227Z
Answers.LastActivityDate: 2020-03-03T16:59:50.797Z
Answers.LastEditDate: 2020-03-03T16:59:50.797Z
Answers.UserDisplayName: ezaspi
Answers.Body: <p>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.  </p>
  
  <p>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.  </p>
  
  <p>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.  </p>
  
  <p>This won't be perfect, but it might get some positions worth looking at "by hand".</p>
  
  <p>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.  </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-05-11T19:57:42.410Z
Answers.LastActivityDate: 2012-06-12T18:09:40.150Z
Answers.LastEditDate: 2012-06-12T18:09:40.150Z
Answers.UserDisplayName: Andrew
Body: <p>Say you have a database of a lot of games.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
Tags: <analysis><engines><tactics>
Title: How can I find good tactics problems?
ThreadText: # How can I find good tactics problems?
  
  (Asked by: username_0 on 2012-05-11)
  
  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.
  
  **Tags:** analysis, engines, tactics
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2012-05-11. Score: 11 | Accepted answer
  
  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.
  
  
  ---
  
  ### Answer by username_1 on 2012-05-11. Score: 3
  
  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](http://www.chessgames.com/perl/collections) 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](http://www.youtube.com/user/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.
  
  > **Comments:**
  > **username_0**: 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).  
  
  ---
  
  ### Answer by username_2 on 2013-12-22. Score: 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).
  
  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.
  
  > **Comments:**
  > **username_0**: I've actually done some work on this since asking this question: http://gist.neo4j.org/?6506717  :)  
  > **username_2**: 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.  
  > **username_2**: 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!  
  > **username_2**: 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. :)  
  > **username_0**: 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. :)  
  
  ---
  
  