-
Notifications
You must be signed in to change notification settings - Fork 0
/
sudoku_examples.py
27 lines (26 loc) · 1.07 KB
/
sudoku_examples.py
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
import numpy as np
# Some examples of sudokus to test
sudoku_0 = np.zeros((9, 9)).astype(int)
sudoku_1 = np.array([[3, 0, 6, 5, 0, 8, 4, 0, 0],
[5, 2, 0, 0, 0, 0, 0, 0, 0],
[0, 8, 7, 0, 0, 0, 0, 3, 1],
[0, 0, 3, 0, 1, 0, 0, 8, 0],
[9, 0, 0, 8, 6, 3, 0, 0, 5],
[0, 5, 0, 0, 9, 0, 6, 0, 0],
[1, 3, 0, 0, 0, 0, 2, 5, 0],
[0, 0, 0, 0, 0, 0, 0, 7, 4],
[0, 0, 5, 2, 0, 6, 3, 0, 0]])
sudoku_2 = np.array([[1, 4, 5, 3, 2, 7, 6, 9, 8],
[8, 3, 9, 6, 5, 4, 1, 2, 7],
[6, 7, 2, 9, 1, 8, 5, 4, 3],
[4, 9, 6, 1, 8, 5, 3, 7, 2],
[2, 1, 0, 4, 7, 3, 9, 5, 6],
[7, 5, 3, 2, 9, 6, 4, 8, 1],
[3, 6, 7, 5, 4, 2, 8, 1, 9],
[9, 8, 4, 7, 6, 1, 2, 3, 5],
[5, 2, 1, 8, 3, 9, 7, 6, 4]])
sudoku_3 = sudoku_0
sudoku_3[1, 8] = 5
sudoku_3[3, 2] = 5
sudoku_3[6, 5] = 4
sudoku_3[7, 6] = 9