Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Newbie trying to solve

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku
View previous topic :: View next topic  
Author Message
scourtaud

Joined: 30 Nov 2005
Posts: 6
:
Location: Paris, France

Items
PostPosted: Wed Nov 30, 2005 1:14 pm    Post subject: Newbie trying to solve Reply with quote

Hi all,

I'm new on this board I have been reading for a few days. I discovered sudoku recently and I now want to program a solver (PHP) and maybe follow up by allowing it to create sudoku grids.

I've found a few links with some info but some points still are shadowed for me...

Can all grids be solved using logic only? if not, do all reasonably hard grid be solved using logic?
Is there a best method to program a sudoku solver? Standard list of what not to do?
Is there a magic number of givens under which I guesses are mandatory and can't be avoided?

Any other hints, tips, advice or comments for a newbie?

Thanks in advance for all the help you can provide.

Sebastien
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Wed Nov 30, 2005 2:04 pm    Post subject: Reply with quote

First, welcome!
Quote:
Can all grids be solved using logic only?
Every sudoku can be solved using logic only. The toughest ones require a type of logic called "implication chains", "bifurcation chains" or "tabling".
Quote:
Is there a best method to program a sudoku solver? Standard list of what not to do?
The best way is to understand what you're coding. Do not copy and use a piece of code that you do not understand. Check the SOLVING TECHNIQUES INDEX that I posted on this forum, and read about how others have implemented these techniques.
Quote:
Is there a magic number of givens under which guesses are mandatory and can't be avoided?
No. Currently there is a limit of 17 givens. G.F. Royle has done some excellent work on these. Some of these 17 clue sudokus can be solved quite easily. However, there are also a few nasty ones with 17 clues.

Good luck with your effort.

Ruud.
Back to top
View user's profile Send private message Visit poster's website
scourtaud

Joined: 30 Nov 2005
Posts: 6
:
Location: Paris, France

Items
PostPosted: Wed Nov 30, 2005 3:40 pm    Post subject: Reply with quote

Thank you,

I'm happy to learn I can rely on logic for all... I'm a little worried about those methods you mention but I guess I'll get to learn them later...
Be assured I don't copy code... I do PHP for a living but I'm more used to working with databases and text than numbers and complex maths... This is a kind of training for me so I'll do it all and make sure I understand it all before I show it to the world...
So I guess if I have less than 17 givens, I'll have to implement a guess function to fill a missing with a random candidate and make sure it works...

I went to a library and bought two books :
150 easy sudoku : I'll use it for my first attemps...
150 medium sudoku : I'll use it for my secondary attemps...

For the moment I'm off to read the solving techniques index...

Thanks for the help.

I'll surely be posting again in a short time...

Sebastien
Back to top
View user's profile Send private message
gaby

Joined: 02 Jul 2005
Posts: 120
:

Items
PostPosted: Thu Dec 01, 2005 12:47 pm    Post subject: Reply with quote

I've got a basic dictionary of terms here:

http://vanhegan.net/sudoku/dictionary.php

Which ought to help you with some of the terminology used on this, and the pappocom forums. There is information on some solving techniques here:

http://vanhegan.net/sudoku/solving.php

Which will help you get started with the solving techniques.

Gaby
_________________
Free daily sudoku - Online puzzle database
http://vanhegan.net/sudoku/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron