Gsusiso


Sudoku Simple Solver

v0.2

poinot@users.sourceforge.net




The Gsusiso interface is a single window: the board (see fig 1). The board is the Sudoku grid, composed of 9 block of nine cells. Each row and each column has 9 cells. If you were on the moon for the last ten years and you don't know about Sudoku rules, see the rules below.

Python source code and documentation are hosted by sourceforge.

Setting the numbers

Put the mouse in the board window, if you press one of keys 1,2,3,4,5,6,7,8 and 9, the number is set in the cell pointed by the mouse. To clear the cell, just press the space bar. You see the active cell border changes to gray, then press the key number you want to set. The cells with black numbers cannot be changed, these are the so-called hint cells. The cells you can change, even once you have set a number, are tries cells. The cells with blue numbers are hint cells too, but these are added once a new board has been generated, with the Give one command described hereafter.



Fig 1: Susiso main window, the Sudoku board



The menu

It appears when you press the right button on the mouse. Press again the button to make it disappear, take care to have your mouse pointer out of the menu if you do not want to perform one of the menu actions.

The menu actions are:

  • Check to ask Susiso to verify you current board, Susiso tells you the board is with a green border. In the case you have a bad cell count, the corresponding row, or column or blck are bordered with red. Just move the mouse to make the colored border vanish.

  • Give one to have one more hint number on the board. A hint is a good cell value, given by Susiso to help you if you are tired or lost with your current Sudoku game.

  • Clear removes all your cell tries, only the hint cells are kept. While in edit mode (see hereafter), the Clear removes alls the numbers on the board.

  • New computes a new Sudoku game and gives you the hint cells. This may take time, depending on your computer. There is no way to set the Sudoku level now, you have to wait for next release. The number of hint cells is fixed to 25, you can use Give one to have more hints.

  • Load reads a game file and set the board with the hint cells and the current cell tries you had at save time.

  • Save as writes a game file, with the board hint cells and your cells tries. You should give a Python file name, that is a name with a .py extension.

  • Edit allows you to write a number in any cell you want. Then you can write your own Sudoku and continue to solve it using Susiso. You can even ask Susiso to give you a hint or to solve the Sudoku. To leave the edit mode press Escape. You can access to the menu while in edit mode, for example you can Clear to remove all cell values, or Check to be sure you input is ok.

  • Print and Options are not implemented yet.

  • About is a release information box.

Some menu entries have keyboard shortcuts, for example if you want to have a hint, you can either press Control h or select Give one in the menu. The shortcut keys are shown in the menu itself, you guess that C-h stands for Control h.


Fig 2: The menu



Checking the board

At any time you can ask Susiso to check the board. If this board has been edited by yourself, then Susiso has to solve it before giving you any piece of information. Then it may take time, depending on the board level and your computer.

Three examples of a Check. A red border indicates a bad count, showing the line, the column and the block with the bad count. Note that in some cases, there is too much red lines everywhere on the board to really understand what is going on...

A green border indicates a correct board.


Fig 3a: Bad column


Fig 3b: Bad line, column, block


Fig 3c: Your tries raise no error





Miscellaneous

A board is composed of 81 cells, 9 lines by 9 columns.

A block is a 3 by 3 square of cells, a board has 9 blocks shown with bold lines.

When you start, the empty board has a set of already defined cells, these couldn't be changed.

You have to fill the blank cells with one digit in 1 to 9.

A given number can only appear once in a row and in a column and in a block.