QSudoku 0.5

Îãëàâëåíèå äîêóìåíòà

About QSudoku

The QSudoku is application for generating and solve sudoku puzzles.
Currently QSudoku is not designed for playing sudoku game (i.e. solving puzzle by hand). This feature is planed for the next version.

Author is Yulia Shabunio
Russia, Yekaterinburg

Program licensed undo GPL.

What is sudoku

Sudoku is just a number puzzle made up of a standard 9x9 standard grid, which is made up in turn of nine smaller grids of 3x3. It is also known as Number Place. The rules are simple – you must add a number from 1 to 9 to each empty square until the grid is full. No number can be repeated in any one line, any column or any small 3x3 grid. Given a handful of numbers to start with, it should be possible to complete the grid, and if the puzzle has been compiled correctly, there will be only one solution. For larger puzzles, the range of numbers and dimensions of the grid need to increase. For example, a 16x16 grid might need to use 0–9 and then A-F to give you 16 characters.

Features

With QSudoku you can

  1. Input new puzzle in the program and save it.
  2. Load saved puzzle
  3. Change puzzle
  4. Solve puzzle. You can see, where puzzle can not be solved or has more than one solution.
  5. Get information about puzzle difficulty level.
  6. Saw history of solving
  7. Generate new puzzle with any difficulty level
  8. Generate new puzzle on existing base (for example, with your birthday in the center, if it's not conflict with sudoku rules).

QSudoku 0.5 support puzzles 2*2*2*2, 3*3*3*3, 4*4*4*4 and 5*5*5*5.

Menu

File

Sudoku

About

Desk

Edit mode

On edit mode you can see on desk only empty cells and cells this initial characters. Cell with blue frame is current.
You can move it by mouse or keyboard and enter new initial it's that pozition.
file:img1.png

View solution

After success solving puzzle empty cells on the board filled with blue italic characters.
But some black symbols became gray. That's why whey are not needed to solve puzzle, they can by deduced from others.
You can delete gray elements in edit mode, and resulting solution is not changed.
file:img2.png

View history mode

With buttin “View solve history” you can switch to view history mode. In this mode you can move throw solving process by history buttons.
Each step, the changed item is highlighted marking the row, column and square with different colors.


In this mode you can see next item types:


Exact – blue italic character. This is character, that was excatly deduced.
If were is questionable items in the desk, than exact elements calculated with taking they into account.
Character can be excatly deduced by four way:

  1. This is only one possible element in this cell. All other values exists in the same row, column or square
  2. This character can be placed only here in its column.
  3. This character can be placed only here in its row.
  4. This character can be placed only here in its square.
file:img3.png
Questionable – green italic character.
We don't know what to put here for certain, but can make some assumption.
file:img4.png
Impossible – red “X”.
We can't place any character in this place. This mean we've made an erronoues guess earlier.
file:img5.png
Impossible to find place – red characters.
We were unable to find a place for this character in any row, column or cell.
So we paint it red in the all unoccupied places to show it can't be put anywhere.
file:img6.png
Canceled – greed italic character, crossed with green lines.
This is consequence of impossible steps, we must return, cancel our guess and use new one.
file:img7.png

If history is very-very long (more than 1000 guesses and cancels), it will bw shown not entirely – only first 1000 guesses and cancels.

Supported file format

QSokuku can read and save puzzles in simple text format. It saves and load only task, not solution (more precisely solution can be solved, but can not be loaded). XML support with save/load solution and state is planned for the next version.


Format description:

  1. Symbols 1–9 and A-Z treated as significant items (allowed set depend on puzzle size)
  2. Any other nonspace symbols treated as empty cell
  3. Space symbols (space and tabulation) are ignored.
  4. Puzzle size is determinated by count of nonspace symbols in thirst line
  5. After filling all puzzle cells reading is stopped, so you can put any text at the end of file (For example, it can be puzzle solution).

Examples of *.txt files, that can be loaded by QSudoku:


#	1	6	#	4	3	#	#	#
#	#	#	#	6	1	#	#	7
#	#	#	7	5	#	#	#	8
8	2	#	#	#	#	4	#	#
1	9	7	#	#	#	5	3	6
#	#	3	#	#	#	#	8	9
9	#	#	#	#	5	#	#	#
2	#	#	9	8	#	#	#	#
#	#	#	1	3	#	7	9	#


%16%43```
''''61''7
\\\75///8
82@@@@4$$
197'''536
^^3~~~~89
9((((5)))
2++98----
|||13"79"


_16_43___
____61__7
___75___8
82____4__
197___536
__3____89
9____5___
2__98____
___13_79_


SOLUTION.
716843925
589261347
342759168
825396471
197428536
463517289
934675812
271984653
658132794


Last example is format, that used by QSudoku to save puzzles.

Difficulty levels

QSudoku range puzzles on easy, medium and hard.


Easy sudoku can be solved, using only sudoku definition “no number can be repeated in any one line, any column or any square”. So if you are careful, you can solve easy sudoku from number to number, all are exactly deduced with one easy rule.


Medium sudoku can be solved without guesses too. But you must keep in mind two rules, where second one is not so easy test on real desk. It read as follows “In each row, column and square must by all distinct numbers”. I can't solve sudoku this way, and on “medium” puzzles I do some guesses, but computer do not need it.


Hard puzzles force computer to make guesses. It is interesting to see, how computer solve hard puzzles. With some tasks it go back many times (especially with 5*5*5*5 desk sizes).