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   

im new here. Im developing a c program. pls help

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

Joined: 30 Oct 2008
Posts: 2
:
Location: NONE

Items
PostPosted: Thu Oct 30, 2008 1:17 pm    Post subject: im new here. Im developing a c program. pls help Reply with quote

hi, im currently developing a c program sudoku solver that simulates how i think. my program (and me) cannot solve this sudoku:

268 268 9 158 28 125 4 7 3
5 278 3 489 24789 279 89 6 1
1 78 4 3 6 79 2 89 5
49 159 6 7 35 8 19 239 24
7 3 2 149 49 19 6 5 8
489 1589 15 2 35 6 179 39 47
3 256 7 68 1 4 58 28 9
29 1259 15 89 2789 3 578 4 6
269 4 8 569 279 2579 3 1 27
*when there are multiple numbers, it means the numbers are the possible values for that cell

the thing is I don't know all the solving techniques. would someone could kindly pls show me the next step or tell me what technique/s i didnt implement.

thanks

PS. Rybka 3 is so cool.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
hobiwan

Joined: 11 Feb 2008
Posts: 83
:

Items
PostPosted: Thu Oct 30, 2008 7:55 pm    Post subject: Reply with quote

Hello detective_mark7,

the first available step is a naked triple:

Naked Triple: 2,6,8 in r1c125 => r1c4<>8, r1c6<>2

but you will need some advanced techniques to solve this puzzle (XY-Chains (or other sorts of chains like AIC or Nice Loops) and Wings (XY-Wing, XYZ-Wing, W-Wing)).

I don't really know how much techniques you have already implemented, but since your solver doesn't get the naked triple, I would start with an easier puzzle Very Happy .

A very good source for the various solving techniques is Sudopedia. Techniques for newspaper like puzzles would be hidden/naked subsets and locked candidates.

Hope that helps
Back to top
View user's profile Send private message
detective_mark7

Joined: 30 Oct 2008
Posts: 2
:
Location: NONE

Items
PostPosted: Sun Nov 02, 2008 3:37 am    Post subject: Reply with quote

thanks

i have included naked triple and some other algorithms in my program.
and this is the result:

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

268 268 num 15 28 15 num num num
num 278 num 489 24789 279 89 num num
num 78 num num num 79 num 89 num

49 159 num num 35 num 19 239 24
num num num 149 49 19 num num num
489 1589 15 num 35 num 179 39 47

num 256 num 68 num num 58 28 num
29 1259 15 89 2789 num 578 num num
269 num num 569 279 2579 num num 27

then i read about cages and wings in sudopedia and decided it was hard program.

thanks anyway.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
solvedoku

Joined: 02 Nov 2008
Posts: 1
:

Items
PostPosted: Sun Nov 02, 2008 3:47 am    Post subject: Reply with quote

thats the spirit!!!
Back to top
View user's profile Send private message
pb

Joined: 24 Jul 2008
Posts: 8
:

Items
PostPosted: Sun Jan 11, 2009 12:24 pm    Post subject: Reply with quote

Actually you will always have to use brute-force as the last resort in some cases. In my javascript solver I just use a few basic techniques (those I haven't been lazy to implement yet) and when I see I can't do anymore, I just use brute-force. Even the hardest puzzles get solved in a few secs.
--
p.
Back to top
View user's profile Send private message
kayanat

Joined: 07 Mar 2009
Posts: 1
:

Items
PostPosted: Thu Mar 12, 2009 2:59 am    Post subject: What is a good way to improve my sudoku-solving skills? Reply with quote

What is a good way to improve my sudoku-solving skills? All my friends are fantastic at sudoku and they LOVE it, but i don't, mainly because well, I can't solve those things. I just want to know for those sudoku solvers out there how do you solve them, is it natural ability, patience, or secret formula that I don't know about...? Thanks.
Back to top
View user's profile Send private message
Adak

Joined: 27 Feb 2008
Posts: 87
:

Items
PostPosted: Fri Apr 10, 2009 4:45 am    Post subject: Reply with quote

I suggest going to the Sudoku Player's Forum, and reading (studying) up. Sure, there are a lot of techniques to help solve the puzzle, and of course, natural aptitude is a factor.

But a lot of it is just simple practice, and learning various techniques, and then practicing even more.

I read an interview with the new Sudoku solver World Champion, and I had to chuckle, because he was practicing so much, it was insane. Shocked

Persistence in your study and practice, go a LONG way.
Back to top
View user's profile Send private message
ivoc

Joined: 05 Mar 2010
Posts: 18
:

Items
PostPosted: Wed Mar 24, 2010 1:24 pm    Post subject: Re: im new here. Im developing a c program. pls help Reply with quote

Code:
Grid:  ..9...4735.3....611.436.2.5..67.8...732...658...2.6...3.7.14..9.....3.46.48...31.
SUDOKU powered by IC (cRoute.txt created)

POS| $ | WRITTEN in RowCol(s)          | OPTIONS  | METHOD                  | ELIMINATED
----------------------------------------------------------------------------------------
001|  |                               |          | PointingPairCOL         |  5r1c5 5r8c5 5r9c5
* 5 in Box 5 being only in Column 5
removed from other Boxes in THIS Column (if there)

002|  |                               |          | BoxReductionROW         |  4r4c5 4r6c5
* 4 in Row 5 being only in Box 5
removed from other Rows in THIS Box (if there)

003|  |                               |          | BoxReductionROW         |  9r4c5 9r6c5
* 9 in Row 5 being only in Box 5
removed from other Rows in THIS Box (if there)

004|  |                               |          | BoxReductionROW         |  5r7c4 5r8c4
* 5 in Row 9 being only in Box 8
removed from other Rows in THIS Box (if there)

005|  |                               |          | NakedTripleROW          |  8r1c4 2r1c6
* ROW=1, NT=268
(Sub)Sets in r1c1, r1c2, r1c5
Candidates of NT removed from other Cells in THIS ROW

006| 6| 12                            | 6        | WeddingRing_F           |
* IF NOT 6r1c2 then
Chain 1: 6r7c2,8r7c4,9r8c4,4r2c4,1r5c4
Chain 2: 6r7c2,2r7c8,8r3c8,9r3c6,1r5c6
Twice Candidate 1, Row 5

007| 6| 91                            | 6        | SingleInBOX             |
008| 6| 74                            | 6        | SingleInBOX             |
009|  |                               |          | PointingPairROW         |  9r8c4 9r8c5
* 9 in Box 7 being only in Row 8
removed from other Boxes in THIS Row (if there)

010| 8| 84                            | 8        | NakedSingle             |
011| 2| 11                            | 2        | WeddingRing_F           |
* IF NOT 2r1c1 then
Chain 1: 2r8c1,5r7c2,1r4c2
Chain 2: 2r1c5,8r2c5,9r2c7,1r4c7
Twice Candidate 1, Row 4

012| 8| 15                            | 8        | NakedSingle             |
013| 8| 61                            | 8        | SingleInCOL             |
014| 4| 41                            | 4        | SingleInBOX             |
015| 4| 69                            | 4        | SingleInBOX             |
016| 7| 67                            | 7        | SingleInBOX             |
017| 7| 99                            | 7        | SingleInBOX             |
018| 1| 47                            | 1        | SingleInBOX             |
019| 7| 85                            | 7        | SingleInBOX             |
020| 2| 78                            | 2        | SingleInBOX             |
021| 8| 77                            | 8        | SingleInBOX             |
022| 8| 38                            | 8        | SingleInBOX             |
023| 9| 27                            | 9        | NakedSingle             |
024| 2| 49                            | 2        | NakedSingle             |
025| 2| 82                            | 2        | SingleInBOX             |
026| 9| 81                            | 9        | NakedSingle             |
027| 5| 87                            | 5        | NakedSingle             |
028| 8| 22                            | 8        | SingleInBOX             |
029| 9| 36                            | 9        | SingleInBOX             |
030| 1| 83                            | 1        | NakedSingle             |
031| 5| 72                            | 5        | NakedSingle             |
032| 7| 32                            | 7        | NakedSingle             |
033| 7| 26                            | 7        | SingleInBOX             |
034| 1| 62                            | 1        | SingleInBOX             |
035| 5| 63                            | 5        | NakedSingle             |
036| 9| 42                            | 9        | NakedSingle             |
037| 5| 45                            | 5        | SingleInBOX             |
038| 9| 68                            | 9        | SingleInBOX             |
039| 2| 25                            | 2        | SingleInBOX             |
040| 4| 24                            | 4        | NakedSingle             |
041| 3| 65                            | 3        | NakedSingle             |
042| 4| 55                            | 4        | SingleInBOX             |
043| 9| 54                            | 9        | SingleInBOX             |
044| 3| 48                            | 3        | NakedSingle             |
045| 2| 96                            | 2        | SingleInBOX             |
046| 5| 94                            | 5        | NakedSingle             |
047| 9| 95                            | 9        | NakedSingle             |
048| 5| 16                            | 5        | SingleInBOX             |
049| 1| 56                            | 1        | NakedSingle             |
050| 1| 14                            | 1        | NakedSingle             |


Regards IvoC
Back to top
View user's profile Send private message
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