ELECTRONIC T-NOTES


CHESSBASE USA'S WEEKLY ON-LINE NEWSLETTER


FOR THE WEEK OF AUGUST 22, 1999


YARD WORK

by Steve Lopez

Yard work -- ugh. I hate it. I generally delay mowing the lawn until the crabgrass is as high as an elephant's eye. Around the time we shoot a few antelope who are partially concealed by tall grass as they drink from the swimming pool, I know that it's time to drag out the mower and get to work.

So when I downloaded the latest upgrade patch for Fritz5.32 and noticed a new function called "Weed tree", I had to surpress an involuntary shudder. "Weed"?? "Tree"?? Whatever it is, I don't want to know about it!

Curiosity eventually got the better of me, though, and I e-mailed my friend Mathias Feist, one of Fritz' programmers, who gave me the lowdown on what this feature is all about.

As we know, Fritz has a built-in learning function. If Fritz does poorly in an opening variation, it eventually tends to avoid that variation in future games. A curious by-product of this feature is that after a large number of games it will wind up playing side variations instead of main line variations. In other words, the law of averages eventually catches up with Fritz after hundreds of games. It will have lost a few games in each of the main lines and will start looking in the opening book for alternative moves; this will eventually send the program into inferior side lines. These side variations are in the book so that Fritz will know how to respond if its opponent (you or another computer program) plays them, but should never play them itself.

So this presents a problem for us: how do we keep Fritz from playing these side variations, while still retaining them in the opening book so that Fritz will know how to respond when its opponent plays them? That's where the "Weed tree" function comes into play. It marks these sidelines so that Fritz will avoid making these moves itself but will still know how to react to them if they come up in a game.

Once you've downloaded the latest upgrade patch for Fritz5.32 from www.chessbase.com and applied the patch, open a tree in Fritz (by hitting the [F11] key) and then right-click on a blank area in the tree display. You'll see a menu appear on the screen; one of the menu items is "Weed tree". Click on it and the following window will appear:


The first item in this window is "ply depth". This allows you to tell the program how deeply into the tree you'd like to weed out the side lines. Remember that a ply is a half-move (that is, one move made by one player). So if you leave this set for the default value of 10, the program will weed the tree through Black's fifth move.

The second item is "min games". This means that a move must have been played in at least that many games before being weeded out of the tree. With the default setting of ten, any move that has been played in less than ten games will be marked as a "no play" move for Fritz. The logic behind it is this: move that are played frequently are good moves, hence they become the "main lines" in the opening. Moves that are played less often are usually not as good, which is why they become "side lines". You want Fritz to play good moves, therefore it should stick to the "tried and true" main variations.

I can already hear you saying "Wait a minute! What happens when you get further into the tree and no move is played more than ten times? Won't that cripple the opening book after the first few plies?" That's where the third value in the window comes in: "Decrease min". This allows you to decrease the minimum number of games needed for retention as the weeding function advances through the tree.

Let's consider an example of this. Assume that you're about to weed a tree and you set "10" as the minimum number of games needed for a move to qualify as a "main line" on the first ply. If you set "Decrease min" to "1", this will mean that on the second ply (i.e. Black's first move), a move in the tree must have been played nine times for it to avoid being weeded out. On the third ply (White's second move), a move will need to have been played eight times to avoid weeding. On the fourth ply, a move must have appeared in seven games to dodge the axe, and so on.

The figures used in determining the number of appearances are derived from the database of games you used when creating a tree (or the database we at ChessBase used when we created a tree that comes on one of our CDs).

Before weeding a tree, you'll need to stop and think about the size of the pool of games used to create the tree. If the tree was created from a database of tens (or hundreds) of thousands of games, you'll want to set the values somewhat higher than you would for a tree created from a few hundred games. Conversely, if the database was created from a database of just a few hundred games, you'll likely want to set the values fairly low (or you risk making the entire tree invisible to Fritz).

Let's have a look at a practical example. I took a database of nearly 20,000 Alekhine Defense games and merged them into a tree. Upon opening the tree, I see these moves:

Note that there are a large number of moves in the tree besides 1.e4. This is due to transpositions. There are 115 games in the database that started with a different opening move for White, but transposed into the Alekhine Defense at a later time.

Right-clicking on a blank spot in the tree gave me a menu from which I selected "Weed tree". I left the values set at the defaults of "10", "10", and "1". The program worked on the tree for a minute or two, after which I saw that the tree had changed:

Notice that both 1.d4 and 1.d3 appear to have been removed from the tree. In reality, these moves are still there, but are "invisible" to Fritz as candidate moves. The only way that Fritz can now see these moves in the book is if I play either of them as White. Fritz will then be able to use the book to react to these moves.

The move 1.Nf3 was narrowly spared by the weedwhacker -- it had been played ten times, the exact number required for it to qualify as a valid opening move for Fritz.

Let's step ahead one move in the tree to the second ply (Black's first move) after 1.e4:

Remember that with a "Decrease min" value of "1", any move that was played less than nine times on the second ply should be removed from the tree. The original tree had two moves at this point which were played in fewer than nine games: 1...c6 and 1...Nh6. The weeding function should remove these from the tree. (Please note that I made a series of tree graphics for the first several plies of the tree before running the "Weed tree" function -- you do not have to run the function multiple times). Let's take a look at what happened to this ply after I ran "Weed tree":

Sure enough, the expected two moves were removed and 1...d6 just missed falling to the scythe.

Moving on to the third ply (White's second move, immediately following 1...Nf6):

Any move that appeared in fewer than eight games will be rendered invisible to Fritz here, so we can expect some major carnage. Six of the eleven candidate moves should be weeded out. Let's check:

Sure enough, the last six on the list have disappeared and only the top five remain (with 2.Qe2 making the cut by a comfortable margin).

By now you should have a pretty good grasp of what this function does -- it's simply a way to get Fritz to avoid playing odd "side" moves without actually physically deleting these moves from the tree. In this manner, Fritz avoids playing substandard opening variations, while still knowing how to react to them if you play them.

A caveat for you: if you're also using a Fritz opening book as a study tool (to examine the statistical evaluations of various opening moves), you do not want to use "Weed tree" as it will render part of the opening tree invisible not only to Fritz but to you as well. However, running "Weed tree" does not affect the appearance of the game tree when viewed using ChessBase 7. After running the function on my Alekhine Defense opening tree (used in the above examples), I took a look at the tree using ChessBase 7. The "invisible" moves 1.d4 and 1.d3 are still visible in the tree using ChessBase (along with the relevant statistical info) but are in half-tone grey. Owners of both Fritz5.32 and ChessBase 7 will be able to use "Weed tree" with no loss of visible information. However, owners of just Fritz5.32 are advised to have two copies of the tree available if they're still interested in using a particular opening tree as a study guide as well as an opening book for the program's use.

Another caveat: it's a good idea to have a backup of the opening tree available before running "Weed tree" in case you don't like the results. Just copy the opening tree files to another folder on your hard drive, or use WinZip to make an archived .zip file that spans multiple floppy disks. Or back the tree files up to a tape drive, etc. etc. etc.

Heading Questions Off at the Pass Dept: No, you can't advance the tree to a later move (White's fifth move, for example) and have the "Weed tree" function begin the weeding process at that point. It always begins weeding from the tree's first ply, regardless of the board position in the tree when you start the process (it doesn't work that way -- I tried it).

It's time for me to go outside now and yank a large thorn bush out of my hedge ("he typed with a loud sigh"). Until next week, have fun!

Special thanks to Mathias Feist for valuable advice about this week's issue!

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