NAME
Games::Sudoku::Trainer::Training - train a certain Sudoku strategy
PURPOSE
This part of the documentation for SudokuTrainer aims at people that want to use SudokuTrainer to train a certain Sudoku strategy. If this isn't what you expected, please inspect section "GUIDE TO DOCUMENTATION" in Games::Sudoku::Trainer::General_info.
USAGE
perldoc Games::Sudoku::Trainer::Training
THE MENU BAR
File
Here you may save the current or the initial Sudoku puzzle, save or load the priority list, or terminate SudokuTrainer.
Pause Mode
Here you select the condition that shall cause SudokuTrainer to enter a pause. For pause mode Value found the pause may be restricted to a unit or a cell.
During a pause you may inspect the current state of the puzzle, use the menus (e. g. to change the pause mode), or try to detect the current successful strategy. A click on the Run button terminates the pause.
Priorities
Here you may adapt the priority list to your preferences by moving a selected strategy (or a range of strategies) up or down. You may also reload the default priority list.
History
Here you may review the history of the current SudokuTrainer session. The last find is not yet reflected in the history.
Summary
Shows counts of all used strategies, ordered by priority.
Overview
Shows the sequence of all used strategies.
Details
Shows all used strategies and the clues that helped to detect them.
View
Here you may toggle the display of the active and/or excluded candidates of the cells (positive resp. negative candidate list).
TRAINING A SUDOKU STRATEGY
Prerequites
SudokuTrainer is not a Sudoku teacher, so you have to know the strategy which you want to train. You also need an initial puzzle where SudokuTrainer will make use of that strategy when solving it. If in doubt, you may select pause mode non- stop, press Run and then inspect the list of History | Summary.
At the start of SudokuTrainer you are offered the choice Read example file
(see section "OPTIONS" in the dokumentation for SudokuTrainer (use "perldoc sudokutrainer.pl"). Here you may select a puzzle from a collection of examples that are included in the distribution. These puzzles are named by the lowest (probably most difficult) strategy that SudokuTrainer uses for solving it.
The priority loop
SudokuTrainer starts each search for a successful strategy at the strategy with the highest priority. If this isn't successful, it tries the strategy with the next lower priority, and repeats this until a priority is successful. Then SudokuTrainer applies the changes to the puzzle that result from the find, then restarts the priority loop at the strategy with the highest priority.
SudokuTrainer enters a pause when it finds a condition that matches the current pause mode. It displays the current successful strategy, but does't update the display further. A found value isn't inserted on the board, the history isn't up to date, nothing.
SudokuTrainer leaves the pause when you click on the Run button.
Pause at the training strategy
Call menu Pause mode | Strategy and select the training strategy from the list, then the Run button. SudokuTrainer pauses when it first finds the selected strategy. It's time to train.
Train the strategy
You know that the displayed puzzle board is now in a state where it's possible to detect the strategy. So it's recommended that you try to find it without further help. If you succeed - congratulations! If you don't, you may click the Show details button, which opens the Details window. It's recommended here that you ask for only one more clue at a time, then try again to find the training strategy. At latest after all clues are uncovered you should be able to detect the strategy. SudokuTrainer cannot help you further.
After you found the strategy, rerun the initial puzzle and try to find the training strategy with less additional clues. If this works, try a later occurence of this strategy in the same puzzle or use a different initial puzzle.
REMARKS ABOUT STRATEGIES
Full house
Full house is the easiest of all strategies. On the other hand, it isn't needed. Without Full house, these patterns would be caught by Hidden Single or Naked Single (whichever comes first).
For efficiency reasons, SudokuTrainer treats Full house specially. As a consequence, it cannot be moved off the top position in the priority list.
Hidden Single
When a digit is found which occurs only once as a candidate in a unit, it is taken as a Hidden Single, without checking whether there are other candidates in that cell. This is probably what most Sudoku players do also. When you don't like this behaviour (since the candidate isn't actually hidden when it is the only one in this cell), give Naked Single a higher priority than Hidden Single.
Hidden Single and Naked Single
These two strategies are (apart from Full house) the workhorses of SudokuTrainer. So you should keep them near the top of the priority list.
Block-Line Interaction and Line-Block Interaction
At the end of the priority list you see an entry named BLI and LBI. There exists no strategy with this name. The background of this is as follows:
Strategies Block-Line Interaction and Line-Block Interaction are processed by a common algorithm, scanning all blocks in turn. If a matching pattern is found, a small final check is done to decide which strategy has been found, and the opposite one is ignored.
If you you proceed in a similar way when solving a Sudoku puzzle, you may interchange Block-Line Interaction and Line-Block Interaction on one side and BLI and LBI on the other in the priority list. The net result is that both strategies get caught with the same priority. The algorithm still reports the hits by their real names. The solution path of a puzzle may become amazingly different.
There is also a pause mode named BLI and LBI. It selects a pause for strategies Block-Line Interaction and Line-Block Interaction. These are the only strategies that can be selected for a pause at the same time. The pseudo-strategy BLI and LBI and the pause mode BLI and LBI may be used completely independent of each other.
Skyscraper, Turbot Fish, and Two-String Kite
These strategies seem to use very similar patterns in the puzzle. I observed very often that the first of them was successful in a certain situation, whichever strategy it was.
Changing priorities
In general, easy strategies should be near the top of the priority list, while very difficult ones should be near the bottom. This will adapt the behaviour of SudokuTrainer to the proceeding of the user to some degree. Don't expect much from these changes however.
On the other hand, don't try to adapt your proceeding to the behaviour of SudokuTrainer. You have intuition, so use it.
The default priority list is based on the assumption that candidate lists are rarely used while working with SudokuTrainer. With the help of candidate lists several strategies are much easier to detect and hence might be moved up in the priority list. This includes all strategies named Naked xxx and all strategies that deal with cells that have exactly two candidates. When you often use the candidate lists while working with SudokuTrainer, you may save your special priority list for this purpose.
UNDERSTAND THE EXCLUSION OF CANDIDATES
While working with the trainer, it may happen that the trainer makes use of the fact that a certain candidate is excluded already, but you cannot find out how it got excluded.
You restart the puzzle, select Pause mode | trace a cell, and enter the name of the affected cell. The Trace window pops up. It shows the state of the candidates of the trace cell. Inspect the candidates that already got excluded by the preset values of the initial puzzle, then click the Run button. The trainer will pause whenever a candidate of the trace cell gets excluded. In contrast to normal pauses, the Trace window shows immediately the excluded candidates. Your current aim is not the training of a strategy, but the understanding of certain candidate exclusions. So if you are interested in details of the current strategy, don't hesitate to uncover all clues at once.
SUPPORTED STRATEGIES
This version of SudokuTrainer supports 15 strategies. See the README file that is delivered with this distribution for a complete list.