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   

Generating Boards with Shuffling Technique

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> The mathematics of sudoku
View previous topic :: View next topic  
Author Message
mmdnazar

Joined: 26 Sep 2006
Posts: 2
:
Location: India

Items
PostPosted: Wed Oct 11, 2006 8:37 am    Post subject: Generating Boards with Shuffling Technique Reply with quote

Hi,
I am generating boards from some predifined boards with solution by 3 techniques.

Predifined Boards are having below properties.
1.The Value itself idicates whether it should be displayed on board or not.

Example :
1 2 3 14 15 16 7 8 9
Here if value existion above 10 then it shlould be displayed on board(Givens) rest all hidden.

Techniques used to generat unique boards from a single board.
-------------------------------------------------------------------------
Arrow 1.Swapping Row
Arrow 2.Swapping Col
Arrow 3.Swapping Value.

1.Swapping Column is to shuffle the first 3 columns, then next 3 and so on.
Ex.
Input 123 456 789
Output 231 564 987

2.Swapping Row is to shuffle the first 3 rows, then next 3 and so on.
Ex.
Input 1 Output 2
2 1
3 3

4 5
5 6
6 4

7 8
8 7
9 9

3.Swapping Value: is to shuffle the values in a row according to set of generated index nos.
Ex :
input: 123 456 789

GENERATED INDEX (RANDOM)
a[0] = 4
a[1] = 5
a[2] = 6
a[3] = 8
a[4] = 3
a[5] = 2
a[6] = 9
a[7] = 1
a[8] = 7

output: 456 832 917

Question My queries are,

1.If I implement this technique then will the difficulty mode be changed? e.g an easy puzzle becomes 'hard' after shuffling

2.Is the difficulty level of a puzzle based on no. of givens or based on the arrangement of numbers.

So Any one please tell me if the techniques which I implemented is correct for my expectation or what? Laughing
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Wed Oct 11, 2006 11:13 am    Post subject: Reply with quote

Hi,

Your method does not change the difficulty level of the puzzle. You are creating a Mathematically Equivalent puzzle each time.

In my SudoCue program, the Scramble function does the same thing.

There are 2 permutation operations you missed:

Arrow Swap 2 chutes (group of 3x9 cells)
Arrow Swap rows and columns (reflect on a diagonal)

As for your second question:

The difficulty level is not related to the number of givens. It depends on the following aspects:

Arrow The number of alternative moves available (search time)
Arrow Visibility of the move (complex patterns are harder to spot)
Arrow Solving techniques required
Arrow Flow (presence of moves that logically follow each other)

Ruud
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
mmdnazar

Joined: 26 Sep 2006
Posts: 2
:
Location: India

Items
PostPosted: Wed Oct 11, 2006 11:43 am    Post subject: Reply with quote

Thank you so much Ruud.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> The mathematics of 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