-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The solver is designed for generating solution trees of antichess openings. Priority is given to minimising the winning length, rather than minimising the number of nodes in the solution tree, as is done in Mark Watkins's solver. The latter is ideal for weakly solving openings or for use in engines and other programs. However, this approach is not always ideal when preparing opening theory and determining the best ways to play as a winning or losing side.
A node hereafter means a pair of position + move resulting in a forced win in that position. If a solution has 1000 nodes, it means that a player should memorise 1000 moves in 1000 different positions in order to win at any moves of the opponent if they stick to those moves. The node of a Watkins-format solution has a slightly different definition.
The main differences from Mark Watkins's solver:
- This solver only uses the Lichess rules. In addition to stalemate positions, it is also the 50-move rule. In Watkins-format solutions, many positions require more than 50 moves without captures and pawn moves to win. This means that some lines will result in a draw instead of a win if the game is played on Lichess. In the vast majority of cases, this can be avoided by a small adjustment to the last nodes of the solution. Sometimes it requires a more serious reworking of the solution.
- Unlike Watkins-format solutions, where the solution ends when a 4-piece endgame is reached, in this solver all endgames are taken into account. The first approach is convenient for engines that can use a tablebase as soon as a 4-piece endgame is reached. However, this approach often leads to the fact that many branches of the solution end on complex endgames like KNPvK or KBNvK. Solving each such endgame (especially with pawns) to a winning end can consist of hundreds of thousands of nodes. This is one of the main reasons why Watkins-format non-trivial solutions are hard to find the most complex lines for human play. A solution of 1000 nodes, each of which leads to a winning move, will be many times easier than a solution of 1000 nodes, most of which lead to 4-piece endgames that require 50 or more moves to win. It should be taken into account that even the strongest players are often unable to win in such complex endgames. That is why in this solver each position is represented not only by the number of nodes, but also by the maximum winning length. This makes it much easier to assess the complexity of the positions in question.
- The solutions of both solvers are incompatible because they use different data formats.
- It takes much more time to generate solutions in this solver, because in each position it is required not only to find a forced win, but also to make sure that this win is most likely the most optimal one.
- Download the latest release of the solver from here.
- Unzip the downloaded archive to some folder where the program will have rights to create and write files. It is recommended that the path to this folder should not contain any non-standard characters like ö, ß, —, §, etc.
- Download the tablebase, unpack and place all 714 files in the existing EGTB subfolder. Without this, the program will also work, but its performance will deteriorate many times over.
- If you plan to solve an opening that already has a Watkins-format solution, it is recommended to download the corresponding solution file and unpack it into the existing Watkins subfolder. For example, for solving 1.e3 b6 you will need the file e3wins.rev4.bz2, which after unpacking will be called e3wins.rev4. Other solution files by Mark Watkins and Klaas Steenhuis can be downloaded here.
- To launch the application, run the solver.exe file for Windows or solver for Linux. In Windows, you may need to give the system defender/antivirus permissions to run it. On Linux, you may need to set the appropriate permissions to run the solver and engine in the engines subfolder.

- When you run it for the first time, make sure that everything functions without problems. To do this, create a new solution on the Solutions tab, for example 1.e3 d5. Then go to the Evaluation tab and make sure that the engine loads after a while. When it finishes loading, the message "Loading engine…" will disappear and the bottom line will show the engine version and, to the right of it, the number of tablebase files. If everything is OK, there should be 714 files.

If there is a problem with the engine, the "Loading engine…" message will not disappear a few seconds after startup.

If something is wrong, a corresponding message may be shown in the Log window.
- To set optimal settings for the engine, go to the Engines tab in Settings.

There, set optimal values for memory and number of threads allocated to the engine. Usually it does not make sense to allocate more threads than your CPU can provide. A lower number makes sense if your computer gets very hot or makes too much noise. Usually the more memory, the better. However, unlike the memory settings on the other tabs, this value is more critical because, if you reach the physical limit and the system uses the swap file, the engine's performance will drop dramatically. Keep in mind that you should reserve some memory for system needs, as well as for the tablebase and other program needs (this will be more sensitive when solving at the lower level). If the system starts to run out of memory, you will most likely notice it by system sluggishness and non-stop loading of your hard drive.
- Manual mode is selected by default. In this mode, you can start the engine by pushing the Start button. If everything is OK, you will see the engine output. If you set the board position close to an endgame, when the engine is running, you will see a non-zero value in the line "EGTB: ..." at the bottom. To stop the engine, press the Stop button.

- On the very first run, the solver can adjust the width of the sidebars to fit the content. You can grab the border between the board and the sidebars and move that border to the desired position. If you want, you can also rearrange the sidebars by grabbing the header (with the close button on the right) and moving it to the desired position.
Note: Never run more than one instance of the solver!
There are two types of solutions in solver: upper-level solution and lower-level solution.
- The upper level implies generation of only partial solutions. Each branch will be calculated only until a position with a relatively easy win is reached. In this context, easy wins are defined as wins of 29 moves or less that do not require a very branched solution tree with a large number of nodes. Usually the engine is able to solve such positions with a few seconds to a few minutes. Sometimes it may take longer if the engine had relevant positions in its cache during the computation. If the engine is started fresh, it may take longer to rebuild this cache.
- Solving at the lower level involves generating a complete solution down to the last move in each branch. At the moment, this is not very optimised, and the complete solution of complex openings can take quite a significant amount of time. The lower-level solution is automatically started after the upper-level solution is finished, if the corresponding checkbox on the Solutions tab in Settings is ticked.
The solution of the elementary opening 1.d4 at the upper level is likely to have only 1 node. The lower-level solution of this opening will have just over 100 nodes. A "++" is added to the number of nodes of the upper-level solutions on the website to distinguish them from complete solutions.
To solve the opening of interest, first select or create the corresponding solution on the Solutions tab. As long as the engine is not running, you can edit the parameters of the selected solution. The Import button is for importing old-format solutions.
The implication is that if you specify one move as the opening (e.g. 1.f3), a solution is generated with Black winning. If you specify two moves (e.g. 1.e3 b6), then White should win. It is not recommended to create openings of more than two moves. If you want to explore a deeper branch, then add subsequent moves to the Branch field.
If you do not want to solve some branches, you can add them to the table below, indicating their expected winning length or 0 if it is likely to be a draw. The list of branches can be edited at any time if necessary.

To start solving the opening of interest, press the Auto button on the Evaluation tab. The progress of the solution can be monitored in the Log window. The solving can be stopped by pressing the Manual button. If you stop the engine with the Stop button or change its settings in Settings, the solving will be terminated.

In addition to pressing the Auto button, the following five options are available in the drop-down list:
- Auto (default). Same as clicking the Auto button. The solver automatically solves all branches except those specified in the table of branches that should not be solved. If a Watkins-solution file is linked to the opening, then in each position the solver will compare the move recommended by the engine with the move from the available solution. If the moves are different, then if the engine score is low, the move from the available solution will be chosen. If the engine score is high, then both moves will be evaluated for greater depth and the best of the moves will be chosen based on the results.
- Auto from here. Starts solving the position that is currently set on the board. An alternative to this is to change the branch in the solution parameters and run in Auto (default) mode.
- Replicate Watkins solution one to one. In this mode, the engine is not used, but moves from the Watkins solution are employed. On the last move of each branch ending with a 4- piece endgame, the value from the tablebase is used. This mode can be used to add information to a Watkins-format solution about the winning length in each branch. Currently reading data from Watkins-format files is not optimised, so generating solutions in this mode takes much longer than it would if the code was properly optimised. If a solver gets a draw because of the 50-move rule, the warning "No ENDGAME moves" is displayed in the log.
- Replicate Watkins solution and revise it. Same as the previous mode, but moves that are overridden are solved in standard Auto mode using the engine. This mode can be useful, for example, to correct original moves of a Watkins-format solution that lead to a draw because of the 50-move rule.
- Repeat with endgames. Same as the previous mode, but all endgames are solved until a win, generating a complete solution tree.
If the solution is complete, the solver generates an opening book and places it in the books subfolder. You can view the moves of the generated book on the Results tab if you select Book as the source and set the opening's initial position on the board, for which you can simply press the >| button under the board.

The progress of the solving is displayed in the log. Usually it looks like this.

First, the number of positions already solved is shown. Then the maximum winning length at the moment, counted from the first move in the game, is indicated. Then the line of the current branch is shown.
If you double-click on a line where a sequence of moves is given, that position will be set on the board. If automatic sync is activated in the Sync button drop-down list, then as soon as the solver moves to the next position, it is set on the board. Synchronisation takes place at the frequency set in Settings. If you press the Sync button, regardless of whether or not automatic sync is set, the current position of the solver is set on the board.

The Moves tab shows the current line.

The Results tab shows information about the moves of the current position on the board.

Various sources of this information can be selected:
- Solver. Information about solved positions in the current session is shown. If a position has not yet been solved in the current session, nothing is shown. The moves are shown in the order in which they are analysed by the solver. The order can be changed in Settings.
- Book. Information from the generated book is shown, if any.
- Eval. Shows the engine's evaluation of positions that have already been analysed.
- Watkins. Information from the Watkins-format solution, if available, is shown. The moves are sorted in descending order of the number of nodes. This information can also be shown in the previous cases as "W=...".
The engine output is displayed on the Evaluation tab. If the position currently being analysed by the engine differs from the position set on the board, the engine output gets a more grey background.

On this tab, you can save the current move of the engine. This button is supposed to be used in Manual mode. In Auto mode, it is done automatically. Nevertheless, even in Auto mode you can force saving without waiting for 100% on the progress bar. Normally you should not do this because when solving at the upper level, if a move is saved with less than 100% progress, the solver will most likely not stop on that move, but will continue solving that line, even if the move leads to a quick win. The solver does not stop when a forced win is found, but tries to find a shorter win by analysing each move in some depth. Saving sub-optimal wins would lead to significant solution tree overgrowth when solving at the lower level. Saving may not be available if the board position is different from the current position analysed by the engine.
If in some position, you want to set a move different from the engine's move, you should use the Override button. After pressing this button, the background of the board changes and you can manually set the desired move or press one of the corresponding move buttons on the Results tab.

An overridden move has a higher priority than a saved move or a Watkins-solution move. Moves can be re-saved or re-overridden. Since the line being solved cannot be finished on an overridden move, you should not use this option unnecessarily.
The saved information about the current position is displayed just below the buttons on this tab.

In Manual mode, you can select the number of best moves analysed by the engine, from 1 to 18.

In the case where the engine is analysing a position when the engine's move has a high score and does not match a move from the available Watkins-format solution, the label A3, A2, or A1 is shown to the left of the progress bar. You should not save or override moves in this mode because this is only a pre-analysis.

If you are sure which move to select, you can switch to Manual mode, go back a few moves to the position with the continuation under investigation, override the move (even if it matches the engine's move), and run Auto mode again.
If the font size is small, you can change it in Settings.
In complex positions for which a Watkins-format solution is not available, it is recommended to first run the engine for a longer time in Manual mode. You can also go deeper and analyse specific branches, and then go back again when a forced win is found in each branch. You can also periodically change the number of best moves (from 1 to 18). This setting affects the pruning parameters and other algorithmic parameters of the engine. Sometimes simply switching between these values allows the engine to see forced wins more quickly.
When a position has been analysed in more depth in Manual mode, you can switch back to Auto (or Auto From Here). Manual analysis is often useful when two or more moves have high scores and the best way to continue is to be chosen.
Sometimes there are situations when the engine sees a forced win on one of the previous moves, but in subsequent positions this information is lost and the engine no longer sees a forced win or can only find a longer win. In this case, a corresponding message is displayed in the log. This can happen due to a restart of the solver, when the entire engine cache is lost, or in cases when a deeper analysis of subsequent positions resulted in a partial loss of the cache due to memory limitations. These messages are quite frequent. In most cases, the solver is able to find the optimal path again when analysing subsequent moves.

Similar messages can also occur at the stage of book generation. It does not always make sense to spend time on finding optimal paths in all branches, especially if those branches are not the main ones.
Warnings in the log are highlighted in yellow. Errors are highlighted in red.