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   

Jigsaw and Killer

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

Joined: 13 Jan 2007
Posts: 64
:

Items
PostPosted: Sun Sep 28, 2008 5:48 pm    Post subject: Jigsaw and Killer Reply with quote

I am thinking of writing some code for a jigsaw and killer program.
The program needs to be able to randomely generate boxes for jigsaw and cages for killer. Can anyone suggest an easy way to do this before I start and do it the long difficult way.

Thanks
Mark
Back to top
View user's profile Send private message
mrmarky2

Joined: 13 Jan 2007
Posts: 64
:

Items
PostPosted: Mon Oct 06, 2008 4:18 pm    Post subject: Reply with quote

I have started the long and difficult way....
Any help is still appreciated.
Back to top
View user's profile Send private message
mrmarky2

Joined: 13 Jan 2007
Posts: 64
:

Items
PostPosted: Fri Oct 10, 2008 11:01 am    Post subject: Reply with quote

No worries. Sorted the jigsaw. Its really inefficient code but I could make an improvement on it. It just doesn't work for any bigger than 16x16 puzzles.

Mark
Back to top
View user's profile Send private message
SudTom

Joined: 14 Oct 2008
Posts: 7
:

Items
PostPosted: Mon Oct 20, 2008 11:57 am    Post subject: Killer javascript client Reply with quote

Hi there,

actually I'd like to implement a killer webclient based on javascript. The puzzles I plan to generate offline (maybe in C#) and save the data and metadata in mysql.
Someone an idea for getting started on:
- killer algorithm?
- a killer for javascript implementation (example)?

Many thanks,

Tom
Back to top
View user's profile Send private message Send e-mail
mrmarky2

Joined: 13 Jan 2007
Posts: 64
:

Items
PostPosted: Mon Oct 20, 2008 3:08 pm    Post subject: Reply with quote

Im just starting that in a bit, gonna see if i can get Jigsaw X working first. But if you want to generate killer sudoku im guessing you need a normal sudoku solver and you need to add killer techniques to it.
I haven't yet decided how to store the data as to where the cages go though.

Mark
Back to top
View user's profile Send private message
SudTom

Joined: 14 Oct 2008
Posts: 7
:

Items
PostPosted: Mon Oct 20, 2008 3:31 pm    Post subject: killer Reply with quote

Hi Mark,

thanks for your reply. You are right. Of course I have -just to add- killer techniques. But that is the question. Thoses techniques for solving are very different I guess. because of the additional constraints. Would be interesting how to start. I guess its not about creating a standard sudoku and put a killer jigsaw on it, plus calculating the hints?!

Tnx, Tom
Back to top
View user's profile Send private message Send e-mail
mrmarky2

Joined: 13 Jan 2007
Posts: 64
:

Items
PostPosted: Mon Oct 20, 2008 3:39 pm    Post subject: Reply with quote

Ok then.. How I would do it is..
Start a new solving technique called function 1. It goes through all the cages, and tests what numbers can go in each cage.
For example, a cage with 2 squares in it with a total of 3 must only be able to have 2 and 1 in it. This might come in handy: http://www.sudocue.net/killertables.php
Then implement extra techniques from here: http://www.sudocue.net/killerguide.php
Your solver will then want to go through function 1 when it starts, and then solve a step, then each cage that had any alterations in will need to be rechecked to see if we can cancel any more numbers out.

Hope this helps, I'll get round to doing mine soon..

Mark
Back to top
View user's profile Send private message
SudTom

Joined: 14 Oct 2008
Posts: 7
:

Items
PostPosted: Mon Oct 20, 2008 6:58 pm    Post subject: Reply with quote

Hey Mark,

thanks for the links. The killertables are obvious more about helping to solve a killer by yourself. The killerguide is pretty good start...easy to read and to follow. Thanks to Ruud!
Hope to get started and be able to add a killer to our site soon.

tnx, Tom
Back to top
View user's profile Send private message Send e-mail
niallpaterson

Joined: 27 Feb 2007
Posts: 1
:
Location: UK

Items
PostPosted: Mon Oct 20, 2008 8:47 pm    Post subject: Reply with quote

This is what I did. If a candidate value is removed at any stage then go back to stage 1 otherwise move on to the next stage.

1: remove hanging values from 1-cell cages
2: naked singles
3: hidden singles
4: locked in values
5: 2-cell cages
6: naked pairs
7: hidden pairs
8: 3-cell cages
9: naked triples
10: hidden triples
11: 4-cell cages
12: naked quads
13: hidden quads
14: 5-cell cages
15: 6-cell cages
16: 7-cell cages
17: 8-cell cages
19: 9-cell cages
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming 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