Git Product home page Git Product logo

sudoku's Introduction

SUDOKU SOLVER - README
	
	I'm not a fervent sudoku solver but I always wanted to try implementing
	a program to solve the puzzles faster than I can. This is my first attempt.
	
	This program uses Qt 5 for its user interface, you will need
	to have it installed to build or run the program.
	
BUILDING INSTRUCTIONS

	Basic building instructions

		autoreconf -i
		mkdir build
		cd build
		../configure --with-qt-includes=/usr/include/qt
		make
			
	The binary is called 'sudoku' and will 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
	9x9 sudoku grid and a number of menu options.
	
	GAME menu
	
		The NEW option will clear the current game
	
		The LOAD option allows you to load a previously loaded game.
		
		The SAVE allows you to save the current sudoku puzzle to the current file.
		
		The SAVE AS allows you to save the current sudoku puzzle to a new file.
		
		The REVERT option will reload the current file from disk.
		
		The QUIT option will close the program.
	
	MOVE menu
	
		The STEP option will try to solve a single random unsolved cell, 
		using the sudoku rules only.
		
		The GUESS option will try to solve a single random unsolved cell,
		and will guess (search) for a solution as required.
		
		The SOLVE RULES option will try to solve the game,
		using sudoku rules only.
		
		The FIND SOLUTION option will try to solve the game,
		and will guess (search) for a solution as required.
		
		The VALIDATE option will verify if the current puzzel is valid.

	SETTINGS menu

		The MARK SOLVEABLE option will, if enabled, mark cells that can be
		solved without guessing in yellow.
	
SAVE GAME FILE FORMAT

	The file format is extremely simple: the files can be opened and edited
	with a text editor. Unsolved positions are saved as well
	and are indicated by zeroes.
	
	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

		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

		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

	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 a sequence of 81 numbers.
	
ALGORITHM

	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 are no cells left with a unique solution.
	From there, it will pick a random unsolved cell, fill it with one of the remaining possibilities
	and recurse 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, version 3 or higher.
	
	Copyright (c) 2012-2016
	[email protected]

	http://ingar.satgnu.net

sudoku's People

Contributors

ingarkct avatar

Watchers

 avatar

sudoku's Issues

Add generator

Add a generator to create new puzzles. With and without guessing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.