Sudoku Tutorial - Bram-Hub/LEGUP GitHub Wiki

Sudoku is a grid-based puzzle game. The grid is partitioned into nine regions. Each of these regions are further broken down into nine cells. So, all in all, the grid consists of 9 rows of nine cells.

Initially, most of the cells are empty, and some of them have numbers inside of them. The object of the Sudoku is to fill the rest of the cells with numbers in a way that conforms to certain rules. Only the numbers 1 through 9 inclusive will ever appear on the grid.

RULES

There are three principal rules of Sudoku.

  1. The COLUMN rule: Each of the digits 1 through 9 must appear exactly once in each column of the grid.
  2. The ROW rule: Each of the digits 1 through 9 must appear exactly once in each row of the grid.
  3. The REGION rule: Within each 3x3 region, each of the digits 1 through 9 must appear exactly once.

Case Rules

Possible Cells for Number - Column

An empty cell has a limited set of possible numbers that can fill it.

In some column, there are a limited number of cells which are available to hold a certain number. To use this one, after selecting it, you will see the grid filled with the first row all 1s the second row all 2s and so on, so that in each column there is one of each of the digits 1 through 9. For the desired column, choose the desired number. Then, on the tree, you will see a new set of branches, the number of them equal to the number of currently empty cells in that column, and each of those nodes shows the chosen number in one of the currently empty cells in that column.

Possible Cells for Number - Region

An empty cell has a limited set of possible numbers that can fill it.

In some region, there are a limited number of cells which are available to hold a certain number. To use this one, after selecting it, you will see the grid filled with each of the digits 1 through 9 placed arbitrarily in each region. For the desired region, choose the desired number. Then, on the tree, you will see a new set of branches, the number of them equal to the number of currently empty cells in that region, and each of those nodes shows the chosen number in one of the currently empty cells in that region.

Possible Cells for Number - Row

An empty cell has a limited set of possible numbers that can fill it.

In some row, there are a limited number of cells which are available to hold a certain number. To use this one, after selecting it, you will see the grid filled with the first column all 1s the second column all 2s and so on, so that in each row there is one of each of the digits 1 through 9. For the desired ow, choose the desired number. Then, on the tree, you will see a new set of branches, the number of them equal to the number of currently empty cells in that row, and each of those nodes shows the chosen number in one of the currently empty cells in that row.

Possible Numbers for Cell

An empty cell has a limited set of possible numbers that can fill it

This rule creates nine nodes on the tree, each of those nodes shows one of the different digits 1 through 9 in the chosen cell.

Contradiction Rules

In LEGUP's sudoku, the Contradiction rule-group is based on the idea of reductio ad absurdum; the point is that the solver can narrow down the number of possibilities for a cell by proving that some of them will lead to a rule-breaking scenario.

No Cell for Number - Column

Process of elimination yields no valid numbers for an empty cell in a column.

In some column, for a certain number, none of the 'given cells' contain that number and there are no 'playing cells' which can legally hold that number.

No Cell for Number - Region

Process of elimination yields no valid numbers for an empty cell in a region.

In some region, for a certain number, none of the 'given cells' contain that number and there are no 'playing cells' which can legally hold that number.

No Cell for Number - Row

Process of elimination yields no valid numbers for an empty cell in a row.

In some row, for a certain number, none of the 'given cells' contain that number and there are no 'playing cells' which can legally hold that number.

No Number for Cell

Process of elimination yields no valid numbers for an empty cell.

For some cell, there is no number which can be legally placed there.

Repeated Numbers

Two identical numbers are placed in the same group.

The solver has reached a rule-breaking scenario. In some column or region or row, some digit appears more than once.

Direct Rules

LEGUP's Direct rule-group is for when the solver has the opportunity to use the principal rules of Sudoku to say with certainty where a certain number belongs.

Last Cell for Number

This is the only cell open in its group for some number.

In some column or region or row, there is only once cell which can legally hold some number.

Last Number for Cell

This is the only number left that can fit in the cell of a group.

In some column or region or row, there is only one number missing and there is only one empty cell for it.