by Steve Lopez

One of the great things about Chessbase 7 is the flexibility of its search functions. There are a lot of underutilized methods for board positions searches in the program; this week we'll look at a few ideas.

Finding an exact board position in CB7 is pretty easy. You just set up the position (either by playing through the moves of a game or using "Setup position" and then either whacking SHIFT-F7 to search the reference database or using the Position button in the search mask to manually set up the position) to do your search for that exact board position. But it's also possible to set up position fragments (that is, partial positions) in CB7 and search for those, too.

Here's a really basic example. A lot of people hate isolated d-pawn positions. It's a complicated mess -- sometimes having an isolani is a strength, sometimes it's a weakness. Telling the difference can be a real pain. Books on chess strategy will often provide tips and a couple of examples, but not enough examples for dunderheads like me. I really need a lot of examples to grasp the concept. So let's use CB7 and do a search.

The first step is to bring up the search mask and click the "position" button. The following window appears:

It's really a ridiculously easy window to use. There are two rows of pieces to the right of the board; this is your "box of pieces". Just click on the piece you want to place on the board and then click on the square where you want the piece to be placed. There are a couple of shortcuts here. One is that if you've put the piece on the wrong square, just click on that square again to remove it. A real timesaver is the right mouse button. You can use it to place the same piece of the opposite color on the board. You could click on the White King, left-click on g1 to place it there, and then right-click on g8 to put a Black King on that square. This saves you the trouble of "going back to the box" to pick up the Black King.

Another shortcut is to organize the way you place the pieces on the board. When I'm setting up a position out of a book or magazine, I place the Kings first, then all of the pawns for both sides. This is because the pawn structure often dictates the plans both sides will follow. It also provides a nice set of reference points for the placement of the other pieces. Then I place the Queens on the board, then the Rooks, then the Knights, and finally the Bishops.

But in this case, we only want to see a position fragment. I want all of the games in which White has an isolated d4-pawn blockaded by a Black Knight on d5. The fact that the pawn is isoltaed requires two separate types of piece placements.

The first (and most obvious) one is to click the radio button next to "'Look for' board" and place a White pawn on d4 and a Black Knight on d5:

The 'look for' board is where you tell the program the location of what must be on the board for the position to qualify as a "hit". Also consider the numerical boxes for "First", "Length" and "Last". "First" refers to the first move number at which the position must appear in the game; likewise, "Last" refers to the last move that will be searched. "Length" is the number of moves for which the position must be on the board.

In this case, I'm looking for middlegame isolani positions, so I've selected "10" as the first move and "30" as the last. This means that when ChessBase 7 is searching through the games, it won't bother looking at any positions before move 10 or after move 30. This is a way to speed up your searches somewhat, albeit at the risk of missing a rare position that falls outside the range of moves you've entered.

So now we have the pawn on d4 and Knight on d5. How do we designate that it must be an isolated pawn? For this, we must click on the radio button beside "'Exclude board'":

The 'exclude' board is where we specify what must not be on the board for a position to qualify as a hit in our search. Notice that "First", "Length" and "Last" are already set to the parameters that were specified earlier in the 'look for' board.

A isolated pawn is defined as a pawn that has no pawns of the same color as itself on an adjacent file. This is why we've placed pawns on c2 through c7 and e2 through e7 (Of course, it would be dumb to place a pawn on the first rank, since it's illegal, or on the last rank, since the pawn would immediately be promoted to something else). We've also placed pawns on d2, d3, and d5 through d7. This is to prevent us from getting positions in which White has doubled d-pawns. Of course, we leave a "hole" on d4 -- we need for a White pawn to be on that square.

The "'Or' board" radio button isn't needed in this search. You can use this in other searches to specify multiple placements for the same piece. For example, if you're looking for positions in which the Black King must be on either g8 or h8, you'd use the 'Or' board and place a Black King on both squares.

A shortcut: if you want something for Black on a square but you don't care if it's a King, piece, or pawn, use the button that looks like a large black circle instead of the piece figurine buttons. This is a "wildcard" that signifies that any Black material can be on that square. The same things applies for White: use the White circle.

Let's have a quick review before we do the search:

We're all set to go -- let's hit "OK" and see what we get in Mega Database 2000...

By the way (while we're waiting for the results), position searches take much longer than header searches. This is because ChessBase 7 has to look at every board position within the range of moves you specify to see if any of them match your search criteria. So when you do a header search for "Kasparov", the program has to look at only the game headers to see if that name appears. When you do a search for a position occuring between moves 10 and 30, the program has to look at every position starting with move 10 and ending at move 30 to see if it matches your specified fragment. This obviously takes longer than a quick look at the player names, so don't be stunned if ChessBase takes longer to conduct the search than you initially expect.

If you're playing along at home, your search should be finished. The result? 35,253 games in Mega Database 2000 contain isolated White d4 pawns blockaded by a Black Knight on d5. If you've ever thought that the two or three sample games in a chess book didn't give you enough information, you'll never have that concern again!

At this point we can play through as many games as we want, seeing the ways White handles isolani positions. However, this can be construed as "too much" information ("he said with a laugh"). How do we manage all of these games?

The obvious solution is to find a way to narrow the search. Position searches can be combined with other searches. So, in this case, we'll do a search for this position fragment but limit it to White wins by putting a check in the "1-0" box in the main search mask. You'll notice that the search is somewhat faster this time. This is because the first thing ChessBase checks when doing a search is the header criteria. Since we specified White wins, it's completely ignoring draws and Black wins. When it spots a White win, it then checks the positions between moves 10 and 30 to see if any of them match the position fragment we specified.

We're doing a bit better here -- the search came back with 11,707 games this time. Still too many? How about if we look for annotated White wins with a White isolani on d4 blockaded by a Black Knight on d5? Here's another neat trick: if you want to look for annotated games, put a question mark in the "Annotator" box in the search mask. This will miss any uncredited annotated games, but is a slick way to find all games in which the annotator's name is given.

This knocks the total down to 452 games which, to me, is a manageable number for viewing. However, if you want to pare this number down a bit more, you could enter a range of years, a span of ECO codes, a range of Elo ratings, or even your favorite player's name into the search mask.

There are a couple of interesting additional tweaks that you can use. The "H-mirror" box means that any "mirror" positions along the horizontal center line of the board will also be found. So, in the case of our search, checking the box finds not only the White isolated d4-pawn position that we specified, but also games in which Black has an isolated pawn on d5 blockaded by a White Knight on d4.

"V-mirror" means that any mirror positions on the other side of the vertical center line of the board will be found. Using it on our search means that ChessBase 7 will also locate games with a White pawn isolated on e4 while blockaded by a Black Knight on e5.

If you want to save the results of a search, just copy the games into an empty "work" database which you can easily delete later when you're finished looking at the games.

We'll look at some other position fragment searches later, but this should get you started. Until next week, have fun!

You can e-mail me with your comments, suggestions, and analysis for Electronic T-Notes. If you love gambits and sacrificial play, stop by my Chess Kamikaze Home Page and the Yahoo Chess Kamikazes Club.