summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-04-26 22:11:30 +0000
committerStijn Buys <ingar@osirion.org>2013-04-26 22:11:30 +0000
commit6cefb41cd551238110a873bc7144640570b729e4 (patch)
treea1b58ac7fb2520d4acaa552f04028f5d479b1cd0
parent9678575b811adad507ee6c6aa1d79c159a27263c (diff)
Updated README.
-rw-r--r--README56
1 files changed, 45 insertions, 11 deletions
diff --git a/README b/README
index 72eef25..b200529 100644
--- a/README
+++ b/README
@@ -11,44 +11,78 @@ BUILDING INSTRUCTIONS
Basic building instructions
+ autoreconf -i
mkdir build
cd build
../configure
make
-
+
The binary will be called 'sudoku' and be located in the 'src' directory.
+ You can run it from within the build directory:
+
+ src/sudoku
USAGE
Running the program will show the main window, which consists of a basic
sudoku grid (9x9) and a number of buttons.
+ The LOAD button allows you to load a previously loaded game.
+
The SAVE button allows you to save the current sudoku puzzle to a file,
like wise, the LOAD button allwos you to load a previously saved sudoko.
+ The CLEAR button will clear all values.
+
+ The STEP button will solve a single cell, but only applies the sudoko
+ rules, it will not "guess".
+
+ The SOLVE button will try to solve the puzzle without "guessing".
+
+ The SEARCH button will try to solve the puzzle and
+
+SAVE GAME FILE FORMAT
+
The file format is extremely simple: the files can be opened and edited
with a text editor. Note that empty (unsolved) positions are saved as well.
+ Value 0 indicates an empty cell.
+
+ Example:
+
+ 0 0 0 8 0 2 9 0 0
+ 0 0 0 9 0 7 3 6 0
+ 4 0 9 0 0 0 0 0 7
- The CLEAR button will clear any previously entered numbers.
+ 0 8 0 0 0 5 0 4 6
+ 1 3 0 0 7 8 0 0 0
+ 0 0 0 2 0 0 0 7 0
- The STEP button can be used to solve the puzzle. If clicked, the program
- will verify each empty cell. If a unique solution can be found for a cell,
- it will be added to the solution. You will probably need to click STEP
- several times to completely solve a puzzle.
+ 3 4 6 1 2 0 7 0 0
+ 0 1 0 0 0 0 6 0 2
+ 0 5 0 0 8 0 0 0 0
-LIMITATIONS
+ While the file format is optimized for readability, the program will
+ actually ignore extra whitespace while loading a file. This allows you to
+ load games from a simple file with numbers.
+
+ALGORITHM
- The current solving algorithm will only find a complete solution as long
- as there are cells for which a unique solution through elimination can be found.
- It cannot perform an exhautive search if the sudoko contains only cells for
- which at least 2 solutions can be found.
+ The constraint solver will try to find a solution by applying
+ two sets of sudoko constraints: the sudoku elimination rules,
+ where every number from 1 to 9 can only appear once in every row, column and subgrid,
+ and the sudoko inclusion rules, where every number has to appear exactly once
+ in every row, column and subgrid,
+ The search solver will apply constraints until there no more cells left with just one possibility.
+ From there, it will pick a random empty cell and fill it with one of the remaining possibilities.
+ From there it recurses into the next iteration.
COPYRIGHT
This sudoku solver was written by Stijn "Ingar" Buys and is available under
the terms and conditions of the GNU Public License (GPL).
+ Copyright (c) 2012-2013
ingar@telenet.be
htpt://ingar.satgnu.net