Notes on the chess database 'ChessDB'
ChessDB is a chess database based, which extends the functionality of Scid for which developed was ceased several years ago. ChessDB runs on Windows, Mac, Linux and UNIX systems. The Windows installer can be downloaded from here Thre is a full tutorial oneline at the ChessDB website. These brief notes cover the following aspects of using ChessDB, but are not anywhere near as complete as the tutorial. There is also a list of frequently asked questions which has translations into both English and Spanish. More of the ChessDB website will be converted to Spanish later, with the eventual hope of covering all 14 languages that ChessDB supports, although that aim is a long way from completion, and may never be met.- Starting ChessDB
- Creating a ChessDB database
- Reading PGN files into ChessDB
- Checking for duplicate games in a ChessDB database
- Compacting a ChessDB database
- Sorting a ChessDB database
- Viewing games in ChessDB
- Advanced searching in ChessDB
- Exporting games as PGN files from ChessDB.
- Using a chess engine to analyze games.
- Using the Tree Window
1. Starting ChessDB
Typically one might have a icon on the desktop to start ChessDB. My icon is called 'ilustrative'. Clicking this, will load ChessDB with the database 'illustrative'. Such an icon can be created on the desktop by dragging a shortcut of a scid databae file onto the desktop.2. Creating a ChessDB database
ChessDB stores it files in a database, which is compressed to allow it to work quickly with a lot of games. A database of more than 1 million games is very practical. Handling 1,000,000 games in a large PGN file would be very slow.
You will NOT need to create databases very often. You will only need to do this if you get a collection of games which are logically quite different. A set of master games would be one such example.
Once in ChessDB, go to
File -> New
Select a directory. The location is entirely up to you, but if you go up the menu structure, then select
My Computer -> My Documents
might be as good as any.
For a file name, select something that seems logical. We has used 'Illustrative', but for a collection of grandmaster games you might want to call it gm or similar.
This will create a database that has no games in it. Not very useful at the minute, until some games are read in.
3. Reading PGN files into ChessDB
First you need to have some PGN files of course. You could get these by downloading from the internet or saving from Blitzin using the 'Save as PGN' in your history or liblist.
Make sure you have a database loaded, such as 'Illustrative' - NOT the clipbase. (The clipbase is a temporary database that can be used for testing ideas,
but the contents are not saved after ChessDB is closed.)
Tools ->Import File of PGN games
Select a directory where the PGN games have been previously saved. (Using Blitzin, they are saved as
C:\Program Files\Internet Chess Club\Blitzin 2.5
so you will probably want to load them from there, if they were played on ICC. But if you download a set of master games, you will have to know where on the disk they are stored.
4. Checking for duplicate games in a ChessDB database
In ChessDB, select:File -> Maintenance ->Delete Twin Games.
Hit Defaults, then untick Always keep games with comments?
This is because ICC saves all games with a comment indicating the result. So keeping all games with comments will mean no duplicates would be found.
Hit "Delete Games" ChessDB will report how many duplicates it found (if any).5. Compacting a ChessDB database
As stated above, ChessDB stores it files in a compact and fast method. For optimal speed, it is useful to compact the database. This is probably not necessary on a database containing only a few thousand games, but would be more necessary if the database had lost of games.File -> Maintenance->Compact Database
Click Compact Game File. then do the same again, but this time Compact Name File This will make ChessDB faster.
6. Sorting a ChessDB database
This allows you to find games easily, subject to some criteria you select, such as ECO, player name etc.
File ->Maintenance -> Sort Database
Click 'Clear'
Then click the criteria you want, such as ECO, Black, White, etc. You can use multiple sorts.
Then click 'Sort'
Then click 'Close'
Then view them, as in the next section.
7. Viewing games in ChessDB
Windows ->Game List.
8. Advanced Searching in ChessDB
ChessDB supports very sophisticated searches. For example, assume we want to find some games were:- The black player is a guest
- The white player has a rating of 1600 or more
- The opening is the advanced French (C02)
- The game was won by Black
Search ->Reset Filter
will reset the filters in ChessDB. then select
Tools ->Header
Hit Defaults then make the following changes.
- Change the rating range of white from the default (0 to 4000) and set it as 1600-4000
- Select the Black Player as guest
- Change the ECO code range from the default A00-E99 to C02-C02
- Untick all the result columns, except 0-1.
Game ->Load First Game
which will load the first game in the database that meets the above criteria. The line at the bottom of ChessDB will show something like
Filter: 52/789
indicating the database has 789 games, but only 52 fit the above criteria. To view the next game in the database that meets the criteria, select
Game ->Load next game
You might also want to look at the games in a simple list - if so use
Window ->Game List.
9. Exporting games as PGN files
If you want to upload a file to a library on ICC, it is necessary to save the game as a PGN file. Once the game required is on the board, one can use:Tools -> Export Current Game ->Export to PGN file
It is suggested you use the following directory to export the files to, since this is where Blitzin will read them from by default.
C:\Program Files\Internet Chess Club\Blitzin 2.5
However, it really does not matter - you just need to know in what directory they are stored, so you know where to upload them in Blitzin.
10. Using a chess engine to analyze games
ChessDB has its own chess engine, called ChessDBlet, which can analyse games. This is useful to detect missed tactics and blunders. It is less useful for analysing strategic issues.
For some reason, ChessDB seems incapable of finding its own chess engine on my machine, but it is easy to fix. Setting up the chess engines is described on another page. To use the chess engines, select
Tools -> Analysis Engine
Then click Crafty. You can try
Tools -> Analysis Engine #2
and click on ChessDBlet. Crafty is usually the better of the two though.
The chess engines show a score. Positive means they think White is winning, negative if Black is winning. A score of +1 is about equivalent to one pawn, but don't take too much notice of that. The depth is the number of half-moves the engines are looking ahead. You might want to click Low CPU Priority
11. Using the Tree Window
This is one of the more useful ChessDB functions. It is best when used in conjunction with a large database of grandmaster games. Download the following 3 files (gm.sg3, gm.si3 and gm.sn3) and store them in My DocumentsOnce you have a large database of games played by GMs, it is possible to see if moves you played were played by by GMs. Open the database of GM games (I call my database 'gm'), then open the Tree Window in ChessDB. Select 'Lock' on the Tree Window. Then switch to the database of your own games. As you look at your own games, you can see the number of games in the database of GM games (not your own games) which have reach this position. It shows this for the GM games, rather than your own games, since you have locked the Tree Window to the database of GM games.
At the bottom of ChessDB where it says 'TOTAL', you can see the number of games where a particular position is reached. Listed under the column 'Move' is the different moves played at this point by GMs. The 'Frequency' is the number of games where this move was played. If that is less than about 10 or 15, then its too few to be used reliably. But if this is greater than that, then you can get useful information. Under the column 'Score' is the percentage of games where that move was played and white won. So if the score is 42%, it means white won 42% of such games and black won 100-42=58%. The score is always for white. (Draws are counted as half a win for the point of calculating the frequency).
Moves played in a database of games played on ICC by weak players after 1.e6 e2 2.d4 d5 3.e5 c5 4.c3 Nc6 5.Bb5 Bc7
| Move | Frequency | Score |
|---|---|---|
| Nf3 | 4:40% | 37.5% |
| Bxc6 | 4:40% | 75% |
| Ne2 | 1:10% | 0% |
| Qg4 | 1:10% | 100% |
| TOTAL 10 | ||
This tells us:
- 10 games reached the same position as would occur after 1.e6 e2 2.d4 d5 3.e5 c5 4.c3 Nc6 5.Bb5 Bc7. (The move order might not actually be 1.e6 e2 2.d4 d5 3.e5 c5 4.c3 Nc6 5.Bb5 Bc7, but could be anything that reaches that position.)
- Out of the 10 games where this position was reached, Nf3 and Bxc6 were both played 4 times by white.
- Nf3 however only won 37.5% for white, so black won most of the games after Nf3. This is not surprising, as Nf3, despite sharing first place for popularity, is in fact a blunder (black should follow up with 6...Nxe5).
- White won a larger percentage of games if he played Bxc6, which one would expect as this is a sensible move from that position.
If we now look at a database of 330,000 games played by strong players, we see that position after 1.e6 e2 2.d4 d5 3.e5 c5 4.c3 Nc6 5.Bb5 is never reached at all, since after 1.e6 e2 2.d4 d5 3.e5 c5 4.c3 Nc6, white almost always plays 5.Nf3 and never 5.Bd7. The move 5.Bd7 is not a blunder (just not a good move), but it often leads to a blunder.
Moves played in a database of games played on ICC by weak players after 1.e6 e2 2.d4 d5 3.e5 c5 4.c3 Nc6
| Move | Frequency | Score |
|---|---|---|
| Nf3 | 892: 96.8% | 54.9% |
| Be3 | 17: 1.8% | 82.3% |
| f4 | 5: 0.5% | 20.0% |
| Be2 | 3: 0.3% | 83.3% |
| a3 | 2: 0.2% | 0.2% |
| Ne2 | 2: 0.2% | 0.0% |
| TOTAL 921 | ||
Website administered by Dr. David Kirkby of http://www.essex-computing.co.uk/