-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
95 lines (79 loc) · 3.39 KB
/
README.txt
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
Created by https://github.com/FoxyDingo
su-solver is a program designed to solve sudoku puzzles of any size.
To use the su-solver:
run clisp (or any other lisp implementation)
(load "su-solver.fas")
(su-solver state)
Where state is a sudoku puzzle. You can use any of the boards below for example:
run clisp (or any other lisp implementation)
(load "su-solver.fas")
(setf state '( (( )( )( )( )(6)( )(5)( )(3))
(( )( )( )( )(1)( )( )(2)(4))
((5)( )(7)( )( )(4)( )( )( ))
(( )( )( )(1)( )( )(6)( )(8))
(( )( )(3)( )( )( )(4)( )( ))
((6)( )(2)( )( )(7)( )( )( ))
(( )( )( )(4)( )( )(1)( )(6))
((7)(9)( )( )(2)( )( )( )( ))
((8)( )(1)( )(5)( )( )( )( )) ))
(su-solver state)
The board is represented as a list of lists. Each number is a list. Each line is a list of numbers (therefore a list of lists).
The board is a list of lines (a list of lists of lists). Example of some sudoku boards in list form:
EXAMPLE OF SUDOKU BOARDS:
EASY
'( (( )( )( )(2)(8)( )(5)(7)( ))
(( )( )(6)(1)( )( )(8)( )(3))
((7)( )( )(6)( )( )( )( )(9))
((1)( )(7)( )( )( )(2)(9)( ))
((8)(3)( )( )( )( )( )(4)(1))
(( )(2)(9)( )( )( )(3)( )(7))
((2)( )( )( )( )(8)( )( )(4))
((9)( )(3)( )( )(7)(1)( )( ))
(( )(6)(8)( )(1)(5)( )( )( )))
MEDIUM
'( (( )( )(7)(1)(2)( )( )( )( ))
((3)(2)( )( )( )(5)( )(7)( ))
(( )( )(5)( )( )(3)( )(4)(9))
(( )( )(2)( )( )( )(6)( )( ))
((9)(6)( )(7)( )(4)( )(2)(5))
(( )( )(4)( )( )( )(9)( )( ))
((2)(5)( )(3)( )( )(4)( )( ))
(( )(8)( )(4)( )( )( )(3)(1))
(( )( )( )( )(8)(1)(7)( )( )) )
HARD
'( (( )( )( )(2)(3)(6)( )(9)(5))
(( )( )( )( )( )( )(2)( )( ))
((7)( )( )( )( )( )( )(1)(8))
(( )( )( )(3)( )( )(9)( )(1))
(( )( )( )(6)(5)(8)( )( )( ))
((5)( )(3)( )( )(7)( )( )( ))
((3)(6)( )( )( )( )( )( )(7))
(( )( )(1)( )( )( )( )( )( ))
((2)(9)( )(4)(1)(3)( )( )( )) )
EVIL
'( (( )( )( )( )(6)( )(5)( )(3))
(( )( )( )( )(1)( )( )(2)(4))
((5)( )(7)( )( )(4)( )( )( ))
(( )( )( )(1)( )( )(6)( )(8))
(( )( )(3)( )( )( )(4)( )( ))
((6)( )(2)( )( )(7)( )( )( ))
(( )( )( )(4)( )( )(1)( )(6))
((7)(9)( )( )(2)( )( )( )( ))
((8)( )(1)( )(5)( )( )( )( )) )
16x16 sudoku puzzle:
'( (( )(8 )( )( ) (9 )( )( )(3 ) (10)( )( )(14) ( )( )(6 )( ))
((5 )( )(15)( ) ( )( )(14)( ) ( )( 1)( )( ) ( )(12)( )(4 ))
(( )( )( )( ) ( )( )( )( ) ( )( )( )( ) ( )( )(5 )( ))
(( )( )( )( 6) ( )(13)(15)( 5) (16)( 2)( 4)( ) (7 )( )( )( ))
((6 )( )( )( ) ( )(12)( )(15) (14)( )(3 )( ) ( )( )( )(5 ))
(( )( )( )(11) (1 )(7 )(6 )( 9) (4 )(12)( 8)( 5) ( 3)( )( )( ))
(( )(1 )( )(7 ) ( )(5 )( )( ) ( )( )(10)( ) (16)( )(14)( ))
((10)( )( )(13) (16)(2 )( )( ) ( )( )(11)(6 ) (15)( )( )(12))
((13)( )( )(4 ) (3 )(16)( )( ) ( )( )(1 )(8 ) (9 )( )( )(10))
(( )(16)( )( 2) ( )( 4)( )( ) ( )( )(14)( ) (12)( )(1 )( ))
(( )( )( )(1 ) (15)( 9)( 5)( 7) (2 )(13)(12)(16) (6 )( )( )( ))
((11)( )( )( ) ( )(8 )( )(12) ( 7)( )(15)( ) ( )( )( )(16))
(( )( )( )(5 ) ( )(11)( 2)( 4) (13)(10)(6 )( ) (8 )( )( )( ))
(( )(11)( )( ) ( )( )( )( ) ( )( )( )( ) ( )( )(16)( ))
(( 9)( )(3 )( ) ( )( )( 8)( ) ( )(15)( )( ) ( )( 7)( )(2 ))
(( )(2 )( )( ) (10)( )( )(1 ) ( 5)( )( )( 9) ( )( )(12)( )) )