Project Idea: Sudoku Solver

Pages: 12
closed account (z05DSL3A)
Sudoku is a Japanese puzzle game that has recently become quite popular in England. The puzzle board is a 9x9 grid (Fig.1).

There is really only one rule to Sudoku: Fill in the game board so that the numbers 1 through 9 occur exactly once in each row, column, and 3x3 box. The numbers can appear in any order and diagonals are not considered.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 ╔═══╤═══╤═══╦═══╤═══╤═══╦═══╤═══╤═══╗
a║   │   │   ║   │   │   ║   │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
b║   │   │   ║   │   │   ║   │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
c║   │   │   ║   │   │   ║   │   │   ║
 ╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
d║   │   │   ║   │   │   ║   │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
e║   │   │   ║   │   │   ║   │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
f║   │   │   ║   │   │   ║   │   │   ║
 ╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
g║   │   │   ║   │   │   ║   │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
h║   │   │   ║   │   │   ║   │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
i║   │   │   ║   │   │   ║   │   │   ║
 ╚═══╧═══╧═══╩═══╧═══╧═══╩═══╧═══╧═══╝
   1   2   3   4   5   6   7   8   9 

Fig.1 empty puzzle board

Your initial game board will consist of several numbers that are already placed (Fig. 2). Those numbers are called givens and cannot be changed. Your goal is to fill in the empty squares following the simple rule above.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 ╔═══╤═══╤═══╦═══╤═══╤═══╦═══╤═══╤═══╗
a║   │   │ 7 ║   │   │ 1 ║ 3 │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
b║ 3 │   │   ║   │ 5 │   ║ 6 │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
c║ 5 │   │ 8 ║   │ 3 │   ║   │   │ 4 ║
 ╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
d║   │ 8 │   ║   │ 6 │   ║ 9 │   │   ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
e║ 7 │   │   ║   │   │   ║   │   │ 6 ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
f║   │   │ 4 ║   │ 1 │   ║   │ 7 │   ║
 ╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
g║ 2 │   │   ║   │ 8 │   ║ 4 │   │ 3 ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
h║   │   │ 6 ║   │ 7 │   ║   │   │ 8 ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
i║   │   │ 5 ║ 9 │   │   ║ 7 │   │   ║
 ╚═══╧═══╧═══╩═══╧═══╧═══╩═══╧═══╧═══╝
   1   2   3   4   5   6   7   8   9

Fig.2 puzzle board with givens

A filled-in row must have one of each digit. That means that each digit appears only once in the row. For example:

1
2
3
 ╔═══╤═══╤═══╦═══╤═══╤═══╦═══╤═══╤═══╗
a║ 3 │ 9 │ 2 ║ 1 │ 5 │ 8 ║ 7 │ 4 │ 6 ║
 ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢

Fig.3 Sudoku sample puzzle's top row

Similarly, each digit must appear in a filled-in column exactly once. The first column could be filled as is shown below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 ╔═══╤
a║ 3 │ 
 ╟───┼
b║ 1 │
 ╟───┼
c║ 8 │ 
 ╠═══╪
d║ 4 │ 
 ╟───┼
e║ 5 │
 ╟───┼
f║ 6 │
 ╠═══╪
g║ 2 │
 ╟───┼
h║ 7 │ 
 ╟───┼
i║ 9 │ 
 ╚═══╧
   1   

Fig. 4 Sudoku sample puzzle's first column.

There are nine 3x3 boxes, or regions surrounded by thick lines that must contain each digit exactly once. The top-left region could be filled as:
1
2
3
4
5
6
7
 ╔═══╤═══╤═══╦═
a║ 3 │ 9 │ 2 ║
 ╟───┼───┼───╫─
b║ 1 │ 5 │ 7 ║ 
 ╟───┼───┼───╫
c║ 8 │ 4 │ 6 ║  
 ╠═══╪═══╪═══╬═

Fig. 5 Sudoku sample puzzle's top-left region

Your ‘Assignment’
First, write a program that can solve the example given in Fig. 2 and display the result on the screen.

Second, modify the first program to allow the user to enter the givens for other puzzles and then solve it for the user, again displaying the result on screen.
Heh heh heh

Placeholder

This idea is cooler than dirt!

I was hoping to finish by today, but I'll have to see if I can spare a little bit this weekend to finish. I've still got to finish my recursive cell elimination and one other little function to choose which block of cells to try to eliminate first on each iteration...

BTW. It's really popular on this side of the pond too.

:-D
Last edited on
closed account (z05DSL3A)
This idea is cooler than dirt!


I remember in recent past that there were a couple of people asking for additional projects to learn from, I thought of this as a good learning pices. This is 'one of the things i do' when learning a new language.

Yeah. Old programmers who do this stuff regularly also learn more about languages they already know. :-)

So then, I thought this was something of a contest. Am I supposed to post my answer? Are there any limits on size (as in, is it supposed to all fit in a single post? My project is currently about 700 lines long --nearly 25% of that is commentary)?

Or should I wait and let other people struggle with this for a couple of weeks or a month first? (I did use a whole lot of functional constructs, though).
Last edited on
closed account (z05DSL3A)
So then, I thought this was something of a contest. Am I supposed to post my answer?

It was not intended as a contest, more like an exercise for the more enthusiastic beginners, maybe prompting some discussions on design and such.

That's not to say you can't post your code if you wish. :0)

I'm also hoping to prompt some of the more experienced developer to post articles and other project ideas...hasn't worked yet...That reminds me I must get around to finishing the recursion article. ;0)
Last edited on
Heh heh heh, well, I guess I'll try to help get the conversation rolling (that is, if anyone else is trying this also --I hope).

I never actually played Sudoku, so the first thing I did was go over and visit the Wikipedia for more information on the game.

WARNING: The Wikipedia article briefly addresses some algorithms to solve Sudoku. I refused to even look at them until I had implemented my own design... but if you are at a complete loss it is a good place to start.


My solution is somewhat of a cross between the human-solving and rapid backtracking methods. It never occurred to me to use a brute-force approach. Granted, the brute-force method can probably be done in a few tens of lines of code, but I don't care to wait upwards around 15 hours to for the computer to choose one of 5.5 billion (thousand-millions) possibilities.

So anyway, my first thought was, "what kind of data structure(s) would be appropriate for storing the gameboard?" I'll be glad to tell you all what I eventually chose, but I'd like to hear some feed back first... Remember to consider that choice of data structure is related to choice of solution algorithm -- and can either help or hinder it.

:-)
Last edited on
Without looking at the Wiki. I would've implemented a Candidate elimination method. Funny enough it's not listed in their Computer Solutions. Would've had a little bit of backtracking too.

It's a good project for someone who wants to advance their C++ skills for sure.

Duoas: Just roughly thinking. To store my gameboard. I would've used
1
2
3
4
5
6
7
8
9
10
Class Cell {
 bitset<9>  invalidValues;
 int value;

 void flagValue(int Value) { /* Flag Value-1 */ }
};

int main() {
 Cell **board;
}


The bitset would indicate which values were invalid when placed into this cell. When only 1 possible value was left that value would be assigned and the other cells in the row/col would have that value flagged as invalid.

I'd continually do this in line with the Candidate elimination. If my next min cell had 2 possible values, then I'd use an implementation of Backtracking.
Last edited on
The Wikipedia refers the the candidate elimination method as the "human" approach.

You and I must share brain cells or something. My original 'cell' class:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
typedef set <int> set_of_int;

//----------------------------------------------------------------------------
// A single cell in the Sudoku gameboard.
// Typecasts to and from 'int' for convenience.
//
struct cell_t
  {
  int        value;  // The number (1..9) associated with the cell; 0 if empty 
  set_of_int valid;  // The set of all possible values that this cell may take

  cell_t():                     value( 0                               )  { }

  cell_t( const cell_t& cell ): value( cell.value                      ),
                                valid( cell.valid                      )  { }

  cell_t( int i ):              value( ((1 <= i) and (i <= 9)) ? i : 0 )  { }

  bool empty() const { return value == 0; }

  cell_t& operator = ( int i ) { value = ((1 <= i) and (i <= 9)) ? i : 0;
                                 return *this;                            }
  operator int() const         { return value;                            }
  };


I've actually been considering gameboard variations, so the 1..9 restrictions are going to have to be updated...

The set_of_int typedef is just for succinctness later in the code.

[edit] Oh, but my board is fancier than that... ;-) It is a 2D vector.
Last edited on
Ahhh I use double pointer's because they are quicker :) Writing a spatial population model at work that has to do a Markov Chain Monte Carlo so it has to be as fast as possible. Each run is like 200million calculations so try that 1million times :|

But scary how our structures are so similar. Although I would use a bitset as it'd only be 9 bits long as opposed to a set. It'd make a smaller footprint, and subsequently should be faster to analyze.
I should be more clear. The '2D' vector is really a class of the form:
1
2
3
4
5
6
7
8
template <typename DataType>
class simplematrix: public vector <DataType>
  {
  ...
  public:
    simplematrix( size_type rows, size_type cols ) ...
    ...
  }

So it is just as fast as (if not faster than) a double pointer --as it has only one dereference and one multiplication. The other reason I chose it over the pointers is to avoid pointers... (and save myself grief from some silly mistake I have learned that I would make later). The last reason is related --an object decouples the internal representation and access points-- making updates and optimizations easier without much cost (if any) in speed or size. I already found that to be particularly important because my internal representation needed a slight alteration to better fit the algorithm.

I suspect that you are right about the bitset though. This program shouldn't require very much more than a simple shift to match any bit, which is surely faster than jumping through a list of values. I think I'll have to update my code... :-D
Last edited on
You could also store all possible bit's in a short. and just use an & to do bit-wise comparisons on them. The code would be heaps nastier.

I'd be interested in a speed comparison of your class, a vector of vectors and a double pointer to see what performed the best. Certainly be interesting as far as code optimisation.

I will agree, working with pointers is definitely not for everyone. Too many mistakes can be made. I don't remember the last application I wrote without pointers =\ . Tragic eh lol

Edit: Just wrote this code for some binary data transformations I am working on. It'd be suitable for doing bit checks on a sudoku solver. Can be optimized.

This reads the lower 7 bits from a byte and calculates their values. Starting from 1 and doubling each bit.

1
2
3
4
  for (int i = 1; i < pow(2, 7); i*=2) {
    if ((expBits & i) == i)
      exp += i;
  }


Edit 2: Before someone points it out. Yes I can and have changed the above loop for my application to:
exp += (expBits & 0x7F); which does the same thing.
Last edited on
Man, you sure like it the hard way. ;->

I just changed my "set_of_int" to an STL bitset<>. Heaps easier.

The toughest thing is extracting bit indices, which is just a little loop:
1
2
3
unsigned long bits = valid.to_ulong();
for (int value = 0; bits != 0; value++, bits >>= 1)
  if (bits & 1) do_something( value );


[edit]
For a speed comparison, it would depend on both the size of the array and the distribution of accesses. If the entire thing fits in a single page file, then one might outperform the other (very) slightly, but otherwise they ought to be comparable.
Last edited on
I wouldn't say mine was hard. A short is 2 bytes (16 bits). So you can use bits 1-10 to represent all possible combinations. To check if bit 3 was enabled you could use.

1
2
3
if ( (expBits & pow(2, 3)) == pow(2,3) ) {
 // Enabled
}


You could enumerate it or something *shrug*. The code is fairly simple, 2 to the power of X where X is the bit you want to check.

But yea for simplicity, STL bitset<> is really good. I have used it before when generating HUGE arrays of flags. It's very fast and easy to use.

Need someone else to chime in with their solution. Bnbertha?
closed account (z05DSL3A)
I have not fully defined my cell class yet, but it is along the same lines as has been mentioned (keeping track of the possible values that the cell can hold).

I'm looking at using a std::valarray, std::slice, and std::gslice to implement the game board. I'm reading up on them at the moment as I have not used them before, but it looks promising.

At the moment my free time has all but dried up, so progress is painfully slow. I have more 'free time' at work, how depressing is that?
@Grey Wolf: Not depressing :P Same boat as me actually. Not enough time outside of work due to other commitments. Plus, I often don't feel like programming once I leave work anyway
I did start looking at this project but with very little time on my hands, I had virtually given up, thinking that the thread will have 'died' before I got anywhere. It seems I am not alone.
I have actually been having a lot of fun with this, particularly when playing with I/O streams and various functional constructs.

One thing that I always found obnoxious about C and C++ was that you can't say something like

if (2 < x < 99) happiness();

instead of the ugly

if ((2 < x) && (x < 99)) acceptable();

So I took a minute to make some template magic so I can say:

if (2 < ranger( x ) < 99) grins();

and

if (ranger( 2 ) < x <= y < 99) grins();

I'm still not entirely satisfied with the name 'ranger' but I figure that's better than some one-letter name...


IN ANY case, my compiler now complains
comparisons like X<=Y<=Z do not have their mathematical meaning

which I suppose is a useful warning, but seeing as I just spent time fixing it so that my comparisons do have their mathematical meaning, I wonder what to do?

The compiler never complains about

cout << x << y << endl;


even though shifting numbers like that makes less sense than using comparison operators together...


Alas!
Finally, something to do.
I've been building useless crud, like a text program with out load, save, or print, a program that finds tthe multiples of a user inputted # in between 2 other user-inputted #s, etc.

I might try this, given the time, and get my dad to try it out. (He loves Sudoku.)

Thanks for breaking the shell of boredom.

Now to figure out how to do this...
Last edited on
Welcome aboard! Yaaaay! (a-la Kermit the Frog)

You'll need to consider two things at the outset:

- how do you intend to solve the puzzle, and
- how should you design the data structure to store and examine the puzzle.

A simple 2D array of numbers would do, except that you will probably want to keep other information attached to each cell (like, which numbers are valid to put here, which numbers have I already tried putting here, etc.)

You can see an example of my initial cell type above. The Wikipedia also has some interesting thoughts on how to solve it if you get stumped.

Post back with ideas and questions (about algorithm and design)!


[EDIT]
Concerning the next post:
If anyone is interested in using it, PM me and I'll give you the complete specs (and if I've finished writing it, the code to load the file data --though it is really easy already...)

:-)
Last edited on
Alright, never being satisfied with normal stuff, I've gone and begun modifying my program to accept variations in the gameboard. This is what I came up with:

sudoku.dat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
;
; Sudoku game gameboard designs
; Many of these are from <http://www.sachsentext.de/en/>
; And <http://www.brainfreezepuzzles.com/main/published.html>
;
; File Format Documentation
;-----------------------------------------------------------------------------
;
;   (name size rows-per-region columns-per-region)
;   (name size [characters] regions...)
;   (name reference [characters] regions...)
;
; A 'region' is a list of (row column) cell indices.
; Regions may overlap and leave holes in the gameboard.
;
; A 'reference' is a name of an existing Sudoku board defined elsewhere in
; this file, to which additional regions are added.
;
; ... (some commentary excluded to fit the post limit)

("Sudoku" 9 3 3)

;-----------------------------------------------------------------------------
; Small Sudoku Variants
;-----------------------------------------------------------------------------
("Shidoku" 4 2 2)
("Logi-5" 5
  ((1 1)  (2 1)  (3 1)  (4 1)  (5 1))
  ((1 2)  (1 3)  (2 2)  (3 2)  (4 2))
  ((5 2)  (5 3)  (4 3)  (3 3)  (4 4))
  ((2 3)  (1 4)  (1 5)  (2 4)  (3 4))
  ((5 4)  (2 5)  (3 5)  (4 5)  (5 5)))
("Pento-Sudoku" 5
  ((1 1)  (1 2)  (1 3)  (2 1)  (2 2))
  ((1 4)  (1 5)  (2 4)  (2 5)  (3 5))
  ((2 3)  (3 2)  (3 3)  (3 4)  (4 3))
  ((3 1)  (4 1)  (4 2)  (5 1)  (5 2))
  ((4 4)  (4 5)  (5 3)  (5 4)  (5 5)))
("Magic Pentominoes" 6
  ((1 1)  (1 2)  (1 3)  (2 1)  (2 2))
  ((1 4)  (1 5)  (2 5)  (2 6)  (3 6))
  ((2 3)  (3 3)  (3 4)  (3 5)  (4 4))
  ((3 1)  (4 1)  (4 2)  (4 3)  (5 1))
  ((4 6)  (5 5)  (5 6)  (6 5)  (6 6))
  ((5 2)  (5 4)  (6 2)  (6 3)  (6 4)))
("Mini Sudoku (Rokudoku)" 6 3 2)
("Rokudoku X" 6
  ((1 1)  (2 2)  (3 3)  (4 4)  (5 5)  (6 6))
  ((1 2)  (1 3)  (1 4)  (1 5)  (2 3)  (2 4))
  ((1 6)  (2 5)  (3 4)  (4 3)  (5 2)  (6 1))
  ((2 1)  (3 1)  (3 2)  (4 1)  (4 2)  (5 1))
  ((2 6)  (3 5)  (3 6)  (4 5)  (4 6)  (5 6))
  ((5 3)  (5 4)  (6 2)  (6 3)  (6 4)  (6 5)))
("Rokudoku Jigsaw" 6
  ((1 1)  (1 2)  (2 1)  (2 2)  (3 1)  (4 1))
  ((1 3)  (1 4)  (1 5)  (1 6)  (2 5)  (2 6))
  ((2 3)  (2 4)  (3 2)  (3 3)  (3 4)  (3 2))
  ((3 5)  (4 3)  (4 4)  (4 5)  (5 3)  (5 4))
  ((3 6)  (4 6)  (5 5)  (5 6)  (6 5)  (6 6))
  ((5 1)  (5 2)  (6 1)  (6 2)  (6 3)  (6 4)))
("Dominoku" 7
  ((1 1)  (1 2)  (1 3)  (1 4)  (2 2)  (2 3)  (4 3))
  ((1 5)  (1 6)  (1 7)  (2 5)  (2 7)  (3 7)  (4 7))
  ((2 1)  (3 1)  (3 2)  (4 1)  (4 2)  (5 1)  (6 1))
  ((2 4)  (2 6)  (3 4)  (3 5)  (3 6)  (4 4)  (4 6))
  ((4 3)  (5 2)  (5 3)  (6 2)  (7 1)  (7 2)  (7 3))
  ((4 5)  (5 4)  (5 5)  (6 3)  (6 4)  (6 5)  (6 6))
  ((5 6)  (5 7)  (6 7)  (7 4)  (7 5)  (7 6)  (7 7)))
("Mini Jigsaw Sudoku" 7
  ((1 1)  (1 2)  (1 3)  (2 1)  (2 2)  (2 3)  (3 1))
  ((1 3)  (2 4)  (3 2)  (3 3)  (3 4)  (4 1)  (4 2))
  ((1 5)  (1 6)  (1 7)  (2 6)  (2 7)  (3 6)  (3 7))
  ((2 5)  (3 5)  (4 3)  (4 4)  (4 5)  (5 3)  (6 3))
  ((4 6)  (4 7)  (5 4)  (5 5)  (5 6)  (6 4)  (7 4))
  ((5 1)  (5 2)  (6 1)  (6 2)  (7 1)  (7 2)  (7 3))
  ((5 7)  (6 5)  (6 6)  (6 7)  (7 5)  (7 6)  (7 7)))
("Mini Sudoku (Yattsudoku)" 8 4 2)
("Yattsu-Manji-Doku" 8
  ((1 1)  (1 2)  (1 3)  (1 4)  (2 1)  (2 2)  (2 3)  (2 4))
  ((3 1)  (3 2)  (3 3)  (3 4)  (4 1)  (4 2)  (4 3)  (4 4))
  ((1 5)  (1 6)  (2 5)  (2 6)  (3 5)  (3 6)  (4 5)  (4 6))
  ((1 7)  (1 8)  (2 7)  (2 8)  (3 7)  (3 8)  (4 7)  (4 8))
  ((5 1)  (5 2)  (6 1)  (6 2)  (7 1)  (7 2)  (8 1)  (8 2))
  ((5 3)  (5 4)  (6 3)  (6 4)  (7 3)  (7 4)  (8 3)  (8 4))
  ((5 5)  (5 6)  (5 7)  (5 8)  (6 5)  (6 6)  (6 7)  (6 8))
  ((7 5)  (7 6)  (7 7)  (7 8)  (8 5)  (8 6)  (8 7)  (8 8)))

;-----------------------------------------------------------------------------
; Vanilla Sudoku Variants
;-----------------------------------------------------------------------------
("Sudoku X"
  "Sudoku"
  ((1 1)  (2 2)  (3 3)  (4 4)  (5 5)  (6 6)  (7 7)  (8 8)  (9 9))
  ((1 9)  (2 8)  (3 7)  (4 6)  (5 5)  (6 4)  (7 3)  (8 2)  (9 1)))
("HyperSudoku"
  "Sudoku"
  ((2 2)  (2 3)  (2 4)  (3 2)  (3 3)  (3 4)  (4 2)  (4 3)  (4 4))
  ((2 6)  (2 7)  (2 8)  (3 6)  (3 7)  (3 8)  (4 6)  (4 7)  (4 8))
  ((6 2)  (6 3)  (6 4)  (7 2)  (7 3)  (7 4)  (7 2)  (7 3)  (7 4))
  ((6 6)  (6 7)  (6 8)  (7 6)  (7 7)  (7 8)  (8 6)  (8 7)  (8 8)))
("Costas Array Sudoku"
  "Sudoku"
  ((1 1)  (2 2)  (3 7)  (4 5)  (5 9 8)(6 6)  (7 8)  (8 4 5)(9 3)   dark red)
  ((1 2)  (2 7)  (3 5)  (4 9 9)(5 6)  (6 8 5)(7 4 3)(8 3)  (9 1)   dark purple)
  ((1 3)  (2 1)  (3 2)  (4 7)  (5 5)  (6 9)  (7 6 6)(8 8)  (9 4)   orange)
  ((1 4)  (2 3)  (3 1)  (4 2 6)(5 7)  (6 5)  (7 9)  (8 6 8)(9 8)   yellow)
  ((1 5 3)(2 9)  (3 6 7)(4 8)  (5 4)  (6 3)  (7 1)  (8 2)  (9 7)   light blue)
  ((1 6)  (2 8)  (3 4 1)(4 3 7)(5 1 2)(6 2)  (7 7 8)(8 5 9)(9 9)   dark green)
  ((1 7)  (2 5 6)(3 9)  (4 6)  (5 8 1)(6 4)  (7 3)  (8 1)  (9 2)   light purple)
  ((1 8)  (2 4 9)(3 3 4)(4 1)  (5 2 3)(6 7 6)(7 5)  (8 9)  (9 6)   light green)
  ((1 9)  (2 6 2)(3 8)  (4 4)  (5 3)  (6 1 1)(7 2)  (8 7)  (9 5 4) light cyan))

;-----------------------------------------------------------------------------
; Big Sudoku Variants
;-----------------------------------------------------------------------------
("Juudoku" 10 5 2)
("Juudoku X"
  "Juudoku"
  ((1 1)  (2 2)  (3 3)  (4 4)  (5 5)  (6 6)  (7 7)  (8 8)  (9 9)  (A A))
  ((1 A)  (2 9)  (3 8)  (4 7)  (5 6)  (6 5)  (7 4)  (8 3)  (9 2)  (A 1)))
("Harry Potter Sudoku" 11 "HARRY POTTER"
  ((1 1 H)(1 2)  (1 3)  (2 1)  (2 2 A)(2 3)  (3 1)  (3 2)  (3 3 R)(4 1)  (4 2)   yellow)
  ((1 3)  (1 5)  (2 4)  (2 5)  (2 6)  (3 5)  (3 6)  (3 7)  (4 5)  (4 6)  (4 7)   red)
  ((1 6)  (1 7)  (1 8)  (1 9)  (1 A)  (1 B)  (2 7)  (2 8)  (2 9)  (2 A)  (3 8)   yellow)
  ((2 B)  (3 9)  (3 A)  (3 B)  (4 8)  (4 9)  (4 A)  (4 B)  (5 9)  (5 A)  (5 B)   yellow)
  ((3 4)  (4 3)  (4 4 R)(5 1)  (5 2)  (5 3)  (5 4)  (5 5 Y)(6 1)  (6 2)  (6 3)   yellow)
  ((5 6)  (5 7)  (5 8)  (6 4)  (6 5)  (6 6 P)(6 7)  (6 8)  (7 4)  (7 5)  (7 6)   red)
  ((6 9)  (6 A)  (6 B)  (7 7 O)(7 8)  (7 9)  (7 A)  (7 B)  (8 8 T)(8 9)  (9 8)   yellow)
  ((7 1)  (7 2)  (7 3)  (8 1)  (8 2)  (8 3)  (8 4)  (9 1)  (9 2)  (9 3)  (A 1)   yellow)
  ((8 5)  (8 6)  (8 7)  (9 5)  (9 6)  (9 7)  (A 6)  (A 7)  (A 8)  (B 7)  (B 8)   red)
  ((8 A)  (8 B)  (9 9 T)(9 A)  (9 B)  (A 9)  (A A E)(A B)  (B 9)  (B A)  (B B R) yellow)
  ((9 4)  (A 2)  (A 3)  (A 4)  (A 5)  (B 1)  (B 2)  (B 3)  (B 4)  (B 5)  (B 6)   yellow))
("Dodeka-doku" 12 4 3)
("Dodeka-doku X"
  "Dodeka-doku"
  ((1 1)  (2 2)  (3 3)  (4 4)  (5 5)  (6 6)  (7 7)  (8 8)  (9 9)  (A A)  (B B)  (C C))
  ((1 C)  (2 B)  (3 A)  (4 9)  (5 8)  (6 7)  (7 6)  (8 5)  (9 4)  (A 3)  (B 2)  (C 1)))
("Carriage House Sudoku" 13 "CARRIAGE HOUSE"
  ((1 1 C)(1 2)  (1 3)  (1 4)  (2 1)  (2 2 A)(2 3)  (2 4)  (3 1)  (3 2)  (3 3 R)(4 1)  (4 2))
  ((1 5)  (1 6)  (1 7)  (1 8)  (1 9)  (2 5)  (2 6)  (2 7)  (2 8)  (2 9)  (3 6)  (3 7)  (3 8))
  ((1 A)  (1 B)  (1 C)  (1 D)  (2 A)  (2 B)  (2 C)  (2 D)  (3 B)  (3 C)  (3 D)  (4 C)  (4 D))
  ((3 4)  (3 5)  (4 3)  (4 4 R)(4 5)  (4 6)  (4 7)  (5 3)  (5 4)  (5 5 I)(5 6)  (6 4)  (6 5))
  ((3 9)  (3 A)  (4 8)  (4 9)  (4 A)  (4 B)  (5 8)  (5 9)  (5 A)  (5 B)  (6 9)  (6 A)  (7 A))
  ((5 1)  (5 2)  (6 1)  (6 2)  (6 3)  (7 1)  (7 2)  (7 3)  (8 1)  (8 2)  (8 3)  (9 1)  (9 A))
  ((5 7)  (6 6 A)(6 7)  (6 8)  (7 5)  (7 6)  (7 7 G)(7 8)  (7 9)  (8 6)  (8 7)  (8 8 E)(9 7))
  ((5 C)  (5 D)  (6 B)  (6 C)  (6 D)  (7 B)  (7 C)  (7 D)  (8 B)  (8 C)  (8 D)  (9 C)  (9 D))
  ((7 4)  (8 4)  (8 5)  (9 3)  (9 4)  (9 5)  (9 6)  (A 3)  (A 4)  (A 5)  (A 6)  (B 4)  (B 5))
  ((8 9)  (8 A)  (9 8)  (9 9 H)(9 A)  (9 B)  (A 7)  (A 8)  (A 9)  (A A O)(A B)  (B 9)  (B A))
  ((A 1)  (A 2)  (B 1)  (B 2)  (B 3)  (C 1)  (C 2)  (C 3)  (C 4)  (D 1)  (D 2)  (D 3)  (D 4))
  ((9 C)  (9 D)  (A B)  (A C)  (A D)  (B A)  (B B U)(B C)  (B D)  (D A)  (D B)  (D C)  (D D E))
  ((B 6)  (B 7)  (B 8)  (C 5)  (C 6)  (C 7)  (C 8)  (C 9)  (D 5)  (D 6)  (D 7)  (D 8)  (D 9)))
("Juu-Go-Doku" 15 5 3)
("Sudoku the Giant" 25 5 5)

What think ye?
Last edited on
Pages: 12