Correcting mistakes

The program includes several ways in which the user can recover from possible errors. These include the ability to turn on and off individual candidates and two undo methods.

The History mechanism and backtracking

The program has a simple history mechanism which records every state of the grid. Each time the user unsets a candidate or sets the solution for a cell the history clicks forward by 1. Each time the user employs an algorithm which removes candidates the history clicks on by 1 (irrespective of how many candidates it removes).

The history mechanism allows steps to be undone. This is a one-way process: once a step backwards is taken the deleted operation can only be recovered by being repeated - it is lost to the history mechanism.

When undo is used all candidate and cell colouring, and all hint colouring is switched off.

Toggling and resetting all candidates (the "R" button)

The candidates for a cell are switched off by clicking on their buttons with the left mouse button. To reactivate a button, left click on the "R" button in the cell - this will switch on all candidates in the cell. When the cell solution is set the "R" will disappear, but the button beneath it remains active and so can be used to reinstate all the cell's candidates.

Undo

A single step can be undone by use of the "Undo" option in the Edit menu or the "<" button in the Toolbar. Repeated use will step back through all the states the grid has taken. However, this is one-way only.

Undo until consistent

As described the program can perform two levels of check on the state of the grid: Is the grid consistent? Have incorrect answers been set? The grid status can be constantly monitored and errors flagged. Confident solvers who work without these automatic checks being applied may reach a state where the grid is in a real mess. In this situation the "Undo until consistent" command available from the Edit menu or "<<" in the Toolbar is quite useful: it will step back through the grid history to the last state in which the grid was consistent and contains no incorrect answers.