The Freezer
The Freezer program

The Concept of Freezer

Using the Program

Using reference positions

PGN-Export

Viewing Statistics

The Rules

Material Rule

Piece/Square Rule

Pawn Promotion Rule

Tutorials

Tutorial 1: King and Queen vs. King

Tutorial 2: King and Pawn vs. King

Tutorial 3: King and d-Pawn vs. King

Tutorial 4: King and Queen vs. King and Rook

Tutorial 5: Restricting piece / squares

Examples

Example 1: A Fortress

Example 2: Penetration with the King

Example 3: Rook and Pawn vs. Bishop and Pawn (Chéron)

Frequently Asked Questions (FAQ)

About the Author


The Concept of Freezer

Freezer is a new kind of tool designed to help analyzing chess endgames. Freezer takes the use of endgame tablebases (published by E. Nalimov) one step further, permitting the exploitation of position dependent knowledge.

This tool gives you the power to prove some theories or to gather new ideas for analysis work.

With Freezer you can generate databases for positions with more than 6 men. This is possible by applying certain rules that will reduce the needed amount of storage space and time consumption drastically.

This help file contains an introduction to the usage, a more detailed description of the supported rules and some tutorials and examples that shall introduce you to how all this works.

Back to index


Using the program

The main window of the program contains the chess board (top left), move lists (top right), and a section for rules (bottom left). In the bottom right corner there are some buttons for special functions.

The standard way to use Freezer is the following:

   - Enter the position you wish to analyze.

   - Define the appropriate rules.

   - Generate the database.

   - Query the database.

Entering the position

On the chess board you can setup the pieces. Clicking the mouse puts a piece of selected type on the board.

Defining the rules

In the section below the chess board you can define the rules. There are three kinds of rules that can be added, modified sorted and removed with the corresponding buttons. The list on the left shows all defined rules in the specified order.

See the chapter on rules for more information.

Generating the database

The database generation can be started with Commands -> Generate. If the existing rules do not suffice, a warning message is shown and you can edit the rules.

Querying the database

After the generation process has finished, the move lists on the upper right show all legal moves with their database values. Double clicking a moving makes this move on the board. As an alternative, moves can be entered on the board directly (with no regards to the chess rules for easy position setup).

It is not possible to make capturing moves or pawn promotions on the board!

You can change the parameters of the database (i. e. other rules or different material) with Commands -> Setup. Warning: This will discard  the generated database in memory. Consider saving it before changing to setup mode.

Back to index


Using the program: Setting reference positions

When querying the database, a position can be set as reference position via the button Set reference position. The button Go to reference position will then take you to the stored position. This feature is particularly useful when analysing many variants starting at a common position.

This feature is only available while querying the database.

Back to index


Using the program: PGN Export

For exporting a variant to a chess program, a position together with moves can be copied to the clipboard. This feature is available in the query mode only.

To start recording a move sequence for the export, please setup the starting position first, then press the button Start PGN Recording.

Please keep in mind that you have to make legal moves, alternating for black and for white. You can move the pieces directly on the board or by double clicking on the moves in the move lists.

The first move you enter determines whether the starting position is White to move or Black to move.

Again, you cannot enter capturing moves or pawn promotion moves here.

Please click the button Stop PGN Recording > Clipboard to copy the recorded PGN game to the clipboard. In many chess programs you can simply paste this into a new game.

Back to index


Using the program: Viewing Statistics

In the menu Commands there is the command Statistics.

This command produces statistics for the generated database. It counts wins, losses and draws for White and Black. There are also diagrams available.

In the statistics dialogue the button Copy List to Clipboard the statistics list can be copied to the clipboard, so that using them in other applications like text editors is fairly easy.

This option requires the database to be generated.

When generating statistics for very large databases the processing can take some seconds.

Back to index


The Rules

All positions that can result from the given material in the position on the board are in the database or have to be covered by rules.

The more positions are covered by rules, the smaller the database can be. All positions that can result within a move must be in the database or be covered by rules, too. This is especially true for capturing moves and pawn promotions, for which only rules are appropriate.

There are three types of rules available:

   - Material balance

   - Restrictions of squares

   - Pawn promotions

As  the conditions for material balance and pawn promotions approximates the arising sub endgames, in particular the rule for restrictions of squares makes the resulting database shrink in size.

The rules can be managed in the lower left part of the Freezer application window. New rules can be added, the existing rules can be edited or viewed (depending on the state of database generation, setup vs. query), or deleted. The sorting of the rules can be changed as well.

Attention: The rules will be applied in top down order!

Thus, the material rules should normally be at the top!

Back to index


The Rules: Material balance

The Material rule is applicable when a piece gets captured.

If you want to use the Nalimov Tablebases just check the corresponding checkbox. Please enter the paths for the tablebases in the dialogue Edit->Path for Nalimov-TBs.

The example above will evaluate positions that result from capturing a white pawn as a win for black. Several pieces can be chosen at once.

You can specify special behaviour in case the captured piece was covered by another piece with the section in the middle. You can even specify another different behaviour for cases in which another recapture is possible. Only captures on the same square will be considered.

If you want to restrict this rule to certain squares, you can do so by using the board on the right. Clicking on letters or numbers will mark entire files or rows, clicking on the corner squares will mark all squares of that colour.

Back to rule overview

Back to index


The Rules: Piece/Square restrictions

The piece/square restriction provides an evaluation for the position, if a certain piece moves to a certain set of squares.

In this example the white king is selected. The black dots mean: If the white king moves to this square, the position is won for black! There are white dots for white wins and grey dots for draw.

To mark squares on the board, please choose the needed evaluation on the right and click on the board. You can click on letters and numbers to mark whole files and rows. Clicking on the light / dark corners marks all 32 squares of that colour. Right clicking removes any evaluation on the given square. To quickly select a rectangular subboard, keep the mouse button pressed and drag the mouse.

For pawns the markings on 1st and 8th rank is without any significance.

The example above can be used to check if the white king can be driven out of the given Square.

You should give evaluations for as many piece/square combinations as possible, as this makes the database to generate smaller.

Please refer to the examples for useful tips on defining these rules! This type of rule is one of the key aspects of Freezer!

Back to rule overview

Back to index


The Rules: Pawn Promotions

For pawns that can promote (i. e. pawns that can reach the 2nd or 7th rank without a piece/square rule for that square), a rule for the promotion has to be defined.

You can define distinct rules for white and for black pawns. The definition of the rule is similar to the material rule for capture possiblilities.

Back to rule overview

Back to index


Tutorials

These tutorials will show you step by step how to use Freezer and what to look out for when analysing positions. We strongly suggest that you take the time and work through these tutorials.

Afterwards, the chapter on examples will offer more complicated situations.

Tutorial 1: King and Queen vs. King

Tutorial 2: King and Pawn vs. King

Tutorial 3: King and d-Pawn vs. King

Tutorial 4: King and Queen vs. King and Rook

Tutorial 5: Restricting piece / squares

Back to index


Tutorial 1: King and Queen vs. King

Our first tutorial will build a database for king and queen vs. king, one of the simplest databases one can imagine.

Please start Freezer if you have not already done so, and choose New from the File menu to start with a new project.

The first real step now is to setup an arbitrary position with the three pieces. Below the chess board, you can select the piece you want to add to the chessboard. With the white and black buttons you can toggle between white and black pieces. Please select the white king, and add it to the chess board by clicking on one of its squares.

Select the white queen and add it to another square, and lastly add a black king as well. Your window should now look something like this:

As this database is so basic, there is nothing more we have to do. We can just start the database build process by choosing Generate from the Commands menu.

Now, Freezer will generate a database containing all possible positions with king and queen vs. king. This will take some seconds; a progress bar will indicate that Freezer is working.

When database generation has finished, the progress bar goes away, and your window should look this:

Congratulations! You just built your first database using Freezer.

On the right there are all legal moves, with moves for white on the left, and moves for black on the right. You can drag the pieces freely on the chess board or double click on a move to change the position.

Now what does “WTM: Win DTC: 6” mean? This means, that in case white is to move, white can win in 6 moves. DTC means “Distance to Conversion”. You will not necessarily get a mating depth, but a move count to a capture move, to promotion move, or to the case when a rule is applied (see later).

If you save your database now, it will include the whole database generated. If you want to keep your file as small as possible, you can choose Setup from the Commands menu, which will take you back to the setup phase and discard the database. This makes your file much smaller in size, but to work with it later, you have to build up the database again.

Back to tutorial overview

Back to index


Tutorial 2: King and Pawn vs. King

Now that you are familiar with the very basics of Freezer, we will examine the positions with king and pawn vs. king.

Please setup a position with white king and pawn and black king, just like you did before in tutorial 1. This is what the Freezer window should look like

Please deselect the “Restrict pawns to their files” at the bottom to get a database for all possible placements of the pawn.

If you now try to generate the database (please try this), a window appears that tells you that the database cannot be generated because one position is not covered by any rule. The position in question will be shown and should look similar to this:

So where is the difference to the first tutorial? Why doesn’t this work with a pawn instead of a queen? The answer is easy: To build a correct database of all possible placements of the three pieces, Freezer has to know how the sub endgames (i. e. king and queen vs. king) should be handled. Positions that arise after pawn promotions or captures are not found in the database, so you explicitly have to tell Freezer what to do in these cases.

Ok, we will do this now. Please close the “Rule missing” window and return to the main window.

In the rules section on the bottom of the Freezer window, there is button “New: Promotion”. This button will do what we are looking for. Provide an evaluation for positions that arise after pawn promotions.

The rule definition window will pop up, and you can configure the rule like this:

This will advise Freezer to do the following: Whenever it reaches a position with a promoted white pawn, it will regard this position as a win for white (obviously we know that king and queen vs. king is always won). The exception is that the promoted piece can be captured by black, and to cover this case, we tell Freezer to treat this as a draw.

Press “OK” and you will see the rule added in the rule list.

Please start the database generation. It will only take some moments to complete, and should look like after finishing:

Back to tutorial overview

Back to index


Tutorial 3: King and d-Pawn vs. King

We will now change the database from tutorial 2 to only include positions with the pawn on the d-file.

Please setup the position and rule like in tutorial 2. Please be sure to put the pawn on the d-file this time. If you have the position from the last tutorial still on the board, you can discard the database generated and modify your position and rule with Commands -> Setup.

Please check the “Restrict pawns to their files” on the bottom of the rules section. Your window should now look like this:

Please generate the database now. It will build up even faster than the one from tutorial 2 because the resulting database is only 1/8 in size.

You just learned a basic principle of Freezer: Keep it small! If you are not interested in positions with the pawn on other files than d, don’t include them.

Back to tutorial overview

Back to index


Tutorial 4: King and Queen vs. King and Rook

This tutorial will introduce a new rule that you will often use: The rule for material balance.

Please start with a new file (File -> New) and setup a position with white king and queen and black king and rook.

When trying to generate this database now, we will recognize that a rule is missing: What will happen, if a piece gets captured? We will have to provide the answer with a rule for the material balance.

Please add a new rule by clicking “New: material”. This will open a window to edit the parameters of this rule. As for now, we will not use Nalimov Tablebases (we will do that later), but provide the right evaluation on our own.

So in case the white queen gets captured, the position is won for black, except that the capturing piece can be recaptured by white (in which case it is obviously draw – king vs. king). Your window should look like this:

Select ok to add your rule to the rule list. We need another rule for when the black rook gets captured, so add another rule by clicking the “New: material” button and configure the rule accordingly:

When Freezer now reaches a position where a piece is captured, it looks up the result in these rules.

You can now generate and examine the database. The generation of this 4-piece-database will take some minutes.

Using Nalimov Tablebases

We will now use the Nalimov Tablebases for the captures instead of dealing with them manually. Using the tablebases is of course much safer as we can not introduce errors easily.

Please be aware that in order to use these tablebases, you have to install them on your computer. If you have already done so (i. e. you used them with another chess software) you can skip the next paragraph.

If you have not installed them yet, we strongly suggest to doing so. You can get them for free at http://www.freezerchess.com/index.php?topic=download (3 and 4 pieces). They take up ca. 30 MB on your hard disk drive. You can get the tables for 5 pieces and many of the 6 pieces at ftp://ftp.cis.uab.edu/pub/hyatt/TB/ also for free, but keep in mind that the tablebases for 5 pieces will take up approx. 7 GB, and the tablebases for 6 pieces aren’t all available yet, the available ones counting in at approx. 800 GB.

If you have installed the tablebases to your hard disk, use the menu Edit -> Paths to Nalimov TBs to tell Freezer where to find them. You can use several directories at once. Please make sure to check the “active” boxes near the paths you want to use. If you installed the tablebases into C:\TB your dialog should look like this now:

Confirm your selection with “OK”. Now, we remove the two material rules to use these tablebases instead. Please select one of them in the rule list, and click the “Remove” button. Make sure you are in setup mode (Commands -> Setup) if the “Remove” button doesn’t show.

Please add a new material rule (“New: Material” button), and check the “Use Nalimov Tablebases if possible” checkbox on top. This will make Freezer use the tablebases instead of using other man-given values. This is what it should look like:

Confirm with “OK”. This rule will be valid for both black and white pieces. If you have installed the tablebases properly and set the paths correctly you can now generate the database.

Back to tutorial overview

Back to index


Tutorial 5: Restricting piece / squares

This tutorial will show you one of the main concepts of Freezer: Restricting pieces to a certain set of squares.

The idea behind this is simple: If a piece is not allowed to visit all squares, the database gets much smaller. The examples will give you more details on this; we will concentrate here on how to get this concept working.

Please start a new Project (File -> New) and setup white king and two white bishops (one on black and one on white squares), and a black king on h8. Please check the “Restrict bishops to their colors” checkbox on the bottom. This will prevent Freezer from including positions with the bishops on the same color in the database.

The main window should now look like this:

Please add a rule for material balance (“New: Material”) that gives a draw when a white bishop gets captured (you can use Nalimov Tablebases instead if they are available on your machine):

Now, add a new rule for piece / square restrictions (“New: Squares”). Please try a bit around with it. On the bottom, you have to select to what piece this rule applies to, and we want it to be the black king. You can “paint” on the board with white, grey and black dots. The color can be chosen on the right. The dots mean the following: If the selected piece moves to a square with a black / grey / white dot, this position shall be regarded as a win for white / draw / win for black.

This rule allows Freezer to exclude these positions from the database, thus saving big amounts of space. If you want to specify that a certain piece shall not enter a certain region, you just set this region as a win for the other side; this prevents the piece from moving there on its own. Keep in mind, that this will make the other side “try” to force that piece into that region!

You can make powerful analysis with this construction, testing if a certain piece can be forced to move out of or into a specific region.

In this case we want to check if the black king can be forced out of the f6-h6-h8-f8 region, so we configure the rule as follows:

This will ensure the black king “tries” to keep within that corner. White will win by checkmate or forcing the black king to leave that region. Generate the database and examine the database.

Back to tutorial overview

Back to index


Examples

To make learning as easy as possible, a few examples shall introduce you to the program and the proper work with the rules.

Example 1: A Fortress

Example 2: Penetration with the King

Example 3: Rook and Pawn vs. Bishop and Pawn (Chéron)

Back to index


Example 1: A Fortress

The first example (File Example_1.frz) proves that White has a safe fortress.

The position has six pieces. The tablebases by E. Nalimov don’t cover this type yet (as of Spring 2005). But in case the 5-men tables are installed, all of the needed sub endgame tablebases (except pawn promotions for that we don’t care at the moment) are available

We want to prove a draw for White. This means if we make all rule-based evaluations in favour of Black, we can be sure that we don’t introduce any drawing or winning chances for White. We may introduce inaccurate results in the manner of wins for Black, but they are not of interest as even a single drawing alternative proven for White will suffice.

Wir wollen ein Remis für Weiß beweisen. Das heißt, wenn alle Abschätzungen zugunsten von Schwarz bestimmt sind, können wir sicher sein, dass wir Weiß keine Remis- oder gar Gewinn-Möglichkeiten erschummeln. Es können höchstens Gewinne für Schwarz hinzukommen, die wir bei der gegebenen Fragestellung aber ignorieren können.

Thus we define the following rules:

1. Material rule for all cases of captures,

2. Piece/square rule for the white pawn,

3. Piece/square rule for the black pawn,

4. Piece/square rule for the white rook,

5. Piece/square rule for the white king, and

6. Piece/square rule for the black king.

The material rule just declares all capture cases to be looked up in the Nalimov Tablebases. This rule should be on top of the list, ensuring it will be evaluated before all other rules.

The white pawn is „frozen“ at f2. This effectively makes the database not grow with this pawn. Its size remains the same with or without this pawn.

We grant the black pawn the squares g3 to g6. If the pawn manages to reach the 2nd rank, we evaluate as a win for black, meaning White has to prevent this to safe the draw.

The white rook shall only be allowed to use the squares e3 and g3. Note: the more squares you allow, the bigger the database gets! If two squares do not suffice, we can always allow more squares in later tries.

The white king shall not leave is fortress. We allow the bottom right corner only. We could remove even more squares (i.e. the 4th row and the square f2 which is occupied by the pawn anyway). This would make the database shrink in size even further.

Now here’s a little trick: We cut the available squares for the attacking king! If he manages to move to the 1st, 2nd or 3rd rank he may have won. Again, we want to make the database as small as possible. This rule saves about 40 % without harming the prove of draw.

Please note: If you can cut down the available squares of an already restricted piece even further, the saving is significant greater than limiting an otherwise unrestricted piece!

Back to example overview

Back to index


Example 2: Penetration with the King

The file Example_2.frz deals with a composition by Em. Lasker u. G. Reichhelm, published in Chicago Tribune, 1901.

The theory of corresponding squares tells us that only 1. Kb1! wins for White. With help of Freezer this is easy to prove!

We need four rules:

1. Material rule for the white pawns,

2. Material rule for the black pawns,

3. Piece/square rule for the white pawns, and

4. Piece/square rule for the black pawns.

The first two rules evaluate the position as won fort he party who wins a pawn. As an example the rule for the white pawns is given below.

The last two rules "freeze“ the pawns to their respective squares, forbidding all other squares (win for the opposite party). As all pawns are blocked anyway, this restriction does not harm the correctness in any way. The rule for the restriction of the white pawns is given below.

Back to example overview

Back to index


Example 3: Rook and Pawn vs. Bishop and Pawn (Chéron)

This position is taken from A. Chéron, Lehr- und Handbuch der Endspiele 1, 2. Auflage 1960. It’s no 491 in that book. Many of the moves given are faulty and give away the win or draw.

We want to get a precise evaluation of the position and will build the corresponding database using the following four rules.

Material rule: As all of the deriving sub endgames contain 5 pieces, the correct result shall be looked up in the Nalimov Tablebases (see example 1).

Piece/square for the pawns: We freeze the pawns to their respective squares. By now you probably know how to archive this:

As we are not interested in positions with the white bishop on white squares, we stick the bishop to the black squares by forbidding the blacks.

Please note, that this is not necessary, if you check the "Restrict bishops to their colours” option on the main screen. However, if you want results for the bishop on both black and white squares, please uncheck that option and remove the forth rule, and you will get a database for all placements of the bishop.

zurück zur Beispiel-Übersicht

zurück zur Übersicht


Frequently Asked Questions (FAQ)
Frequently Aked Questions (FAQ)

Up to what size can the databases generated get

Freezer supports databases up to a size of approx. 1 GB. As the databases are generated in RAM, you should only build databases that fix into your main memory. Your database might be too big if your computer system is accessing permanently the hard disk drive, swapping data between disk and RAM. Please cancel the current command being performed (i.e. generation of the database).

Why does my hard disk drive work all the time?

There may be two reasons fort his: During generation of the database the Nalimov Tablebases have to be accessed if you chose to use them. In this case there is no way around this. The other reason might be a too big database in combination with too little system memory (RAM). See the question above for more details on this.

Can I shrink the size of the databases generated in order to archive them or give them away?

Despite the normal ways of compressing the files generated using tools like Winzip, you can strip down the file to the position and the rules by choosing Commands->Setup. This removes the database generated and the resulting file will be only a few kB in size. Keep in mind, though, that the database has to be generated again if you (or someone else) want to work with it.

Where do I set the paths to the Nalimov Tablebases?

The paths used can be set in the menu Edit->Paths for Nalimov-TBs.

Why can’t I play capture or promotion moves on the board?

This restriction is necessary in order to give a correct database value or rule evaluation for the given position and all its successor positions. In case of captures or pawn promotions the resulting positions could not be evaluated properly, so these moves were prevented from execution.

Does Freezer support en-passant capture moves?

Yes and no. En-passant captures are considered during database generation (for the successor positions), but all moves in the database generated are explicit without en-passant rights.

Can I specify castling rights?

No, castling is never allowed in any position.

Back to index


About the Author

The program Freezer is developed by

Eiko Bleicher

Schramberger Str. 41

D-13467 Berlin

Internet address: http://www.freezerchess.com

Please send any questions, comments and bug reports to support@freezerchess.com

Back to index