From 6262a7c83659af32569f3992cd08c2d044117af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joseph=20Hopfm=C3=BCller?= Date: Sat, 4 Feb 2023 18:13:09 +0100 Subject: [PATCH] add py files, not working yet --- sudoku.py | 165 ++++++++++++ test.py | 9 + test.txt | 730 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 904 insertions(+) create mode 100644 sudoku.py create mode 100644 test.py create mode 100644 test.txt diff --git a/sudoku.py b/sudoku.py new file mode 100644 index 0000000..f2afa6a --- /dev/null +++ b/sudoku.py @@ -0,0 +1,165 @@ +from copy import deepcopy +import random + +class sudoku_grid(): + def __init__(self, prefilled_cells): + # cell = {'possible': set([i for i in range(1,10)]), 'solution': 0} + self.grid = [[{'possible': set([i for i in range(1,10)]), 'solution': 0} for _ in range(9)] for _ in range(9)] + + # prefilled_cells is a nested list (9x9) of values (1-9), 0 specifies an empty cell + try: + ctr = 0 + if len(prefilled_cells) != 9: + raise ValueError.add_note(f'wrong number of rows') + for i in range(9): + if len(prefilled_cells[i]) != 9: + raise ValueError.add_note(f'wrong number of cells in row {i}') + for j in range(9): + # if prefilled_cell in valid range: fill in matching cell an mark as solved + if 1 <= prefilled_cells[i][j] <= 9: + self.grid[i][j]['possible'] = {prefilled_cells[i][j]} + self.grid[i][j]['solution'] = prefilled_cells[i][j] + ctr += 1 + + if ctr == 0: + raise ValueError.add_note(f'prefilled_cells is empty') + except ValueError as e: + print(f'{e}') + + def __str__(self): + retstr = 'sudoku: \n' + for i in range(9): + for j in range(9): + if self.grid[i][j]['solution']: + current_val = self.grid[i][j]['solution'] + retstr += f'{current_val} ' + else: + retstr += '_ ' + if j == 2 or j == 5: + retstr += '# ' + if i == 2 or i == 5: + retstr += '\n# # # # # # # # # # # ' + retstr += '\n' + return retstr + + def removeValue(self, row, col, value): + if self.grid[row][col]['possible']: + self.grid[row][col]['possible'].discard(value) + pass + + def iterate(self): + # iterate over all cells + for i in range(9): + for j in range(9): + + # get the value + current_value = self.grid[i][j]['solution'] + if current_value: + for k in range(9): + self.removeValue(i, k, current_value) # remove value from current row + self.removeValue(k, j, current_value) # remove value from current column + for k in range(3): + for l in range(3): + self.removeValue((i//3)*3+(i+k)%3, (j//3)*3+(j+l)%3, current_value) # remove value from current 3x3 box + + current_set = set() + add = 0 + for k in range(8): + current_set = current_set and self.grid[i][(j+k)%9]['possible'] + current_set = current_set and self.grid[(i+k)%9][j]['possible'] + if (i//3)*3+k//3 == i and (j//3)*3+k%3 == j: + add = 1 + l = k + add + row = (i//3)*3+l//3 + col = (j//3)*3+l%3 + current_set = current_set and self.grid[row][col]['possible'] + + new_set = self.grid[i][j]['possible']-self.grid[i][j]['possible'].intersection(current_set) + if new_set: + self.grid[i][j]['possible'] = new_set + + for i in range(9): + for j in range(9): + if len(self.grid[i][j]['possible']) == 1: + self.grid[i][j]['solution'] = list(self.grid[i][j]['possible'])[0] + + + + + + def find_lowest_entropy(self): + lowest_i = -1 + lowest_j = -1 + sols = None + lowest_e = 10 + for i in range(9): + for j in range(9): + if self.grid[i][j]['solution']: + continue + e = len(self.grid[i][j]['possible']) + if e < lowest_e: + sols = list(self.grid[i][j]['possible']) + lowest_i = i + lowest_j = j + lowest_e = e + if lowest_e == 0: + lowest_i = -1 + lowest_j = -1 + sols = None + lowest_e = 10 + return (lowest_i, lowest_j, lowest_e, sols) + return (lowest_i, lowest_j, lowest_e, sols) + + def collapse_cell(self, row, col): + if self.grid[row][col]['solution']: + return None + possible = self.grid[row][col]['possible'] + if len(possible) == 1: + self.grid[row][col]['solution'] = list(possible)[0] + + + def single_solutions_exist(self): + for i in range(9): + for j in range(9): + if self.grid[i][j]['possible']: + if len(self.grid[i][j]['possible']) == 1: + return True + return False + + def is_solved(self): + for i in range(9): + for j in range(9): + if not self.grid[i][j]['solution']: + return False + return True + +iteration = 1 +if __name__ == '__main__': + prefilled = [ [0,4,9,7,0,5,0,0,0], + [0,0,0,0,0,4,0,0,3], + [6,0,1,2,0,0,0,7,0], + [0,0,0,0,9,1,0,0,5], + [0,2,4,0,6,8,7,3,1], + [1,5,8,0,2,7,4,9,0], + [0,0,0,0,0,2,6,4,0], + [0,6,0,1,0,0,0,0,0], + [4,0,5,0,0,0,3,0,2]] + sudoku = sudoku_grid(prefilled) + print(sudoku) + while not sudoku.is_solved(): + sudoku.iterate() + # cnt = 0 + # [row, col, entropy, solutions] = sudoku.find_lowest_entropy() + # if row == -1: + # print(f'No solution found! Iteration {iteration}') + # break + # print(f'Lowest Entropy in Iteration {iteration} ({cnt}): {entropy} in ({row},{col}) with solutions {solutions}') + # sudoku.collapse_cell(row, col) + # while sudoku.single_solutions_exist(): + # cnt += 1 + # [row, col, entropy, solutions] = sudoku.find_lowest_entropy() + # print(f'Lowest Entropy in Iteration {iteration} ({cnt}): {entropy} in ({row},{col}) with solutions {solutions}') + # sudoku.collapse_cell(row,col) + # print(sudoku) + iteration += 1 + print(sudoku) diff --git a/test.py b/test.py new file mode 100644 index 0000000..8664e26 --- /dev/null +++ b/test.py @@ -0,0 +1,9 @@ +with open('test.txt', 'w') as file: + file.write('(i.j),k,l,(m.n)\n') + for i in range(9): + for j in range(9): + for k in range(3): + for l in range(3): + m = (i//3)*3+(i+k)%3 + n = (j//3)*3+(j+l)%3 + file.write(f'({i}.{j}),{k},{l},({m}.{n})\n') \ No newline at end of file diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..6e1dce1 --- /dev/null +++ b/test.txt @@ -0,0 +1,730 @@ +(i.j),k,l,(m.n) +(0.0),0,0,(0.0) +(0.0),0,1,(0.1) +(0.0),0,2,(0.2) +(0.0),1,0,(1.0) +(0.0),1,1,(1.1) +(0.0),1,2,(1.2) +(0.0),2,0,(2.0) +(0.0),2,1,(2.1) +(0.0),2,2,(2.2) +(0.1),0,0,(0.1) +(0.1),0,1,(0.2) +(0.1),0,2,(0.0) +(0.1),1,0,(1.1) +(0.1),1,1,(1.2) +(0.1),1,2,(1.0) +(0.1),2,0,(2.1) +(0.1),2,1,(2.2) +(0.1),2,2,(2.0) +(0.2),0,0,(0.2) +(0.2),0,1,(0.0) +(0.2),0,2,(0.1) +(0.2),1,0,(1.2) +(0.2),1,1,(1.0) +(0.2),1,2,(1.1) +(0.2),2,0,(2.2) +(0.2),2,1,(2.0) +(0.2),2,2,(2.1) +(0.3),0,0,(0.3) +(0.3),0,1,(0.4) +(0.3),0,2,(0.5) +(0.3),1,0,(1.3) +(0.3),1,1,(1.4) +(0.3),1,2,(1.5) +(0.3),2,0,(2.3) +(0.3),2,1,(2.4) +(0.3),2,2,(2.5) +(0.4),0,0,(0.4) +(0.4),0,1,(0.5) +(0.4),0,2,(0.3) +(0.4),1,0,(1.4) +(0.4),1,1,(1.5) +(0.4),1,2,(1.3) +(0.4),2,0,(2.4) +(0.4),2,1,(2.5) +(0.4),2,2,(2.3) +(0.5),0,0,(0.5) +(0.5),0,1,(0.3) +(0.5),0,2,(0.4) +(0.5),1,0,(1.5) +(0.5),1,1,(1.3) +(0.5),1,2,(1.4) +(0.5),2,0,(2.5) +(0.5),2,1,(2.3) +(0.5),2,2,(2.4) +(0.6),0,0,(0.6) +(0.6),0,1,(0.7) +(0.6),0,2,(0.8) +(0.6),1,0,(1.6) +(0.6),1,1,(1.7) +(0.6),1,2,(1.8) +(0.6),2,0,(2.6) +(0.6),2,1,(2.7) +(0.6),2,2,(2.8) +(0.7),0,0,(0.7) +(0.7),0,1,(0.8) +(0.7),0,2,(0.6) +(0.7),1,0,(1.7) +(0.7),1,1,(1.8) +(0.7),1,2,(1.6) +(0.7),2,0,(2.7) +(0.7),2,1,(2.8) +(0.7),2,2,(2.6) +(0.8),0,0,(0.8) +(0.8),0,1,(0.6) +(0.8),0,2,(0.7) +(0.8),1,0,(1.8) +(0.8),1,1,(1.6) +(0.8),1,2,(1.7) +(0.8),2,0,(2.8) +(0.8),2,1,(2.6) +(0.8),2,2,(2.7) +(1.0),0,0,(1.0) +(1.0),0,1,(1.1) +(1.0),0,2,(1.2) +(1.0),1,0,(2.0) +(1.0),1,1,(2.1) +(1.0),1,2,(2.2) +(1.0),2,0,(0.0) +(1.0),2,1,(0.1) +(1.0),2,2,(0.2) +(1.1),0,0,(1.1) +(1.1),0,1,(1.2) +(1.1),0,2,(1.0) +(1.1),1,0,(2.1) +(1.1),1,1,(2.2) +(1.1),1,2,(2.0) +(1.1),2,0,(0.1) +(1.1),2,1,(0.2) +(1.1),2,2,(0.0) +(1.2),0,0,(1.2) +(1.2),0,1,(1.0) +(1.2),0,2,(1.1) +(1.2),1,0,(2.2) +(1.2),1,1,(2.0) +(1.2),1,2,(2.1) +(1.2),2,0,(0.2) +(1.2),2,1,(0.0) +(1.2),2,2,(0.1) +(1.3),0,0,(1.3) +(1.3),0,1,(1.4) +(1.3),0,2,(1.5) +(1.3),1,0,(2.3) +(1.3),1,1,(2.4) +(1.3),1,2,(2.5) +(1.3),2,0,(0.3) +(1.3),2,1,(0.4) +(1.3),2,2,(0.5) +(1.4),0,0,(1.4) +(1.4),0,1,(1.5) +(1.4),0,2,(1.3) +(1.4),1,0,(2.4) +(1.4),1,1,(2.5) +(1.4),1,2,(2.3) +(1.4),2,0,(0.4) +(1.4),2,1,(0.5) +(1.4),2,2,(0.3) +(1.5),0,0,(1.5) +(1.5),0,1,(1.3) +(1.5),0,2,(1.4) +(1.5),1,0,(2.5) +(1.5),1,1,(2.3) +(1.5),1,2,(2.4) +(1.5),2,0,(0.5) +(1.5),2,1,(0.3) +(1.5),2,2,(0.4) +(1.6),0,0,(1.6) +(1.6),0,1,(1.7) +(1.6),0,2,(1.8) +(1.6),1,0,(2.6) +(1.6),1,1,(2.7) +(1.6),1,2,(2.8) +(1.6),2,0,(0.6) +(1.6),2,1,(0.7) +(1.6),2,2,(0.8) +(1.7),0,0,(1.7) +(1.7),0,1,(1.8) +(1.7),0,2,(1.6) +(1.7),1,0,(2.7) +(1.7),1,1,(2.8) +(1.7),1,2,(2.6) +(1.7),2,0,(0.7) +(1.7),2,1,(0.8) +(1.7),2,2,(0.6) +(1.8),0,0,(1.8) +(1.8),0,1,(1.6) +(1.8),0,2,(1.7) +(1.8),1,0,(2.8) +(1.8),1,1,(2.6) +(1.8),1,2,(2.7) +(1.8),2,0,(0.8) +(1.8),2,1,(0.6) +(1.8),2,2,(0.7) +(2.0),0,0,(2.0) +(2.0),0,1,(2.1) +(2.0),0,2,(2.2) +(2.0),1,0,(0.0) +(2.0),1,1,(0.1) +(2.0),1,2,(0.2) +(2.0),2,0,(1.0) +(2.0),2,1,(1.1) +(2.0),2,2,(1.2) +(2.1),0,0,(2.1) +(2.1),0,1,(2.2) +(2.1),0,2,(2.0) +(2.1),1,0,(0.1) +(2.1),1,1,(0.2) +(2.1),1,2,(0.0) +(2.1),2,0,(1.1) +(2.1),2,1,(1.2) +(2.1),2,2,(1.0) +(2.2),0,0,(2.2) +(2.2),0,1,(2.0) +(2.2),0,2,(2.1) +(2.2),1,0,(0.2) +(2.2),1,1,(0.0) +(2.2),1,2,(0.1) +(2.2),2,0,(1.2) +(2.2),2,1,(1.0) +(2.2),2,2,(1.1) +(2.3),0,0,(2.3) +(2.3),0,1,(2.4) +(2.3),0,2,(2.5) +(2.3),1,0,(0.3) +(2.3),1,1,(0.4) +(2.3),1,2,(0.5) +(2.3),2,0,(1.3) +(2.3),2,1,(1.4) +(2.3),2,2,(1.5) +(2.4),0,0,(2.4) +(2.4),0,1,(2.5) +(2.4),0,2,(2.3) +(2.4),1,0,(0.4) +(2.4),1,1,(0.5) +(2.4),1,2,(0.3) +(2.4),2,0,(1.4) +(2.4),2,1,(1.5) +(2.4),2,2,(1.3) +(2.5),0,0,(2.5) +(2.5),0,1,(2.3) +(2.5),0,2,(2.4) +(2.5),1,0,(0.5) +(2.5),1,1,(0.3) +(2.5),1,2,(0.4) +(2.5),2,0,(1.5) +(2.5),2,1,(1.3) +(2.5),2,2,(1.4) +(2.6),0,0,(2.6) +(2.6),0,1,(2.7) +(2.6),0,2,(2.8) +(2.6),1,0,(0.6) +(2.6),1,1,(0.7) +(2.6),1,2,(0.8) +(2.6),2,0,(1.6) +(2.6),2,1,(1.7) +(2.6),2,2,(1.8) +(2.7),0,0,(2.7) +(2.7),0,1,(2.8) +(2.7),0,2,(2.6) +(2.7),1,0,(0.7) +(2.7),1,1,(0.8) +(2.7),1,2,(0.6) +(2.7),2,0,(1.7) +(2.7),2,1,(1.8) +(2.7),2,2,(1.6) +(2.8),0,0,(2.8) +(2.8),0,1,(2.6) +(2.8),0,2,(2.7) +(2.8),1,0,(0.8) +(2.8),1,1,(0.6) +(2.8),1,2,(0.7) +(2.8),2,0,(1.8) +(2.8),2,1,(1.6) +(2.8),2,2,(1.7) +(3.0),0,0,(3.0) +(3.0),0,1,(3.1) +(3.0),0,2,(3.2) +(3.0),1,0,(4.0) +(3.0),1,1,(4.1) +(3.0),1,2,(4.2) +(3.0),2,0,(5.0) +(3.0),2,1,(5.1) +(3.0),2,2,(5.2) +(3.1),0,0,(3.1) +(3.1),0,1,(3.2) +(3.1),0,2,(3.0) +(3.1),1,0,(4.1) +(3.1),1,1,(4.2) +(3.1),1,2,(4.0) +(3.1),2,0,(5.1) +(3.1),2,1,(5.2) +(3.1),2,2,(5.0) +(3.2),0,0,(3.2) +(3.2),0,1,(3.0) +(3.2),0,2,(3.1) +(3.2),1,0,(4.2) +(3.2),1,1,(4.0) +(3.2),1,2,(4.1) +(3.2),2,0,(5.2) +(3.2),2,1,(5.0) +(3.2),2,2,(5.1) +(3.3),0,0,(3.3) +(3.3),0,1,(3.4) +(3.3),0,2,(3.5) +(3.3),1,0,(4.3) +(3.3),1,1,(4.4) +(3.3),1,2,(4.5) +(3.3),2,0,(5.3) +(3.3),2,1,(5.4) +(3.3),2,2,(5.5) +(3.4),0,0,(3.4) +(3.4),0,1,(3.5) +(3.4),0,2,(3.3) +(3.4),1,0,(4.4) +(3.4),1,1,(4.5) +(3.4),1,2,(4.3) +(3.4),2,0,(5.4) +(3.4),2,1,(5.5) +(3.4),2,2,(5.3) +(3.5),0,0,(3.5) +(3.5),0,1,(3.3) +(3.5),0,2,(3.4) +(3.5),1,0,(4.5) +(3.5),1,1,(4.3) +(3.5),1,2,(4.4) +(3.5),2,0,(5.5) +(3.5),2,1,(5.3) +(3.5),2,2,(5.4) +(3.6),0,0,(3.6) +(3.6),0,1,(3.7) +(3.6),0,2,(3.8) +(3.6),1,0,(4.6) +(3.6),1,1,(4.7) +(3.6),1,2,(4.8) +(3.6),2,0,(5.6) +(3.6),2,1,(5.7) +(3.6),2,2,(5.8) +(3.7),0,0,(3.7) +(3.7),0,1,(3.8) +(3.7),0,2,(3.6) +(3.7),1,0,(4.7) +(3.7),1,1,(4.8) +(3.7),1,2,(4.6) +(3.7),2,0,(5.7) +(3.7),2,1,(5.8) +(3.7),2,2,(5.6) +(3.8),0,0,(3.8) +(3.8),0,1,(3.6) +(3.8),0,2,(3.7) +(3.8),1,0,(4.8) +(3.8),1,1,(4.6) +(3.8),1,2,(4.7) +(3.8),2,0,(5.8) +(3.8),2,1,(5.6) +(3.8),2,2,(5.7) +(4.0),0,0,(4.0) +(4.0),0,1,(4.1) +(4.0),0,2,(4.2) +(4.0),1,0,(5.0) +(4.0),1,1,(5.1) +(4.0),1,2,(5.2) +(4.0),2,0,(3.0) +(4.0),2,1,(3.1) +(4.0),2,2,(3.2) +(4.1),0,0,(4.1) +(4.1),0,1,(4.2) +(4.1),0,2,(4.0) +(4.1),1,0,(5.1) +(4.1),1,1,(5.2) +(4.1),1,2,(5.0) +(4.1),2,0,(3.1) +(4.1),2,1,(3.2) +(4.1),2,2,(3.0) +(4.2),0,0,(4.2) +(4.2),0,1,(4.0) +(4.2),0,2,(4.1) +(4.2),1,0,(5.2) +(4.2),1,1,(5.0) +(4.2),1,2,(5.1) +(4.2),2,0,(3.2) +(4.2),2,1,(3.0) +(4.2),2,2,(3.1) +(4.3),0,0,(4.3) +(4.3),0,1,(4.4) +(4.3),0,2,(4.5) +(4.3),1,0,(5.3) +(4.3),1,1,(5.4) +(4.3),1,2,(5.5) +(4.3),2,0,(3.3) +(4.3),2,1,(3.4) +(4.3),2,2,(3.5) +(4.4),0,0,(4.4) +(4.4),0,1,(4.5) +(4.4),0,2,(4.3) +(4.4),1,0,(5.4) +(4.4),1,1,(5.5) +(4.4),1,2,(5.3) +(4.4),2,0,(3.4) +(4.4),2,1,(3.5) +(4.4),2,2,(3.3) +(4.5),0,0,(4.5) +(4.5),0,1,(4.3) +(4.5),0,2,(4.4) +(4.5),1,0,(5.5) +(4.5),1,1,(5.3) +(4.5),1,2,(5.4) +(4.5),2,0,(3.5) +(4.5),2,1,(3.3) +(4.5),2,2,(3.4) +(4.6),0,0,(4.6) +(4.6),0,1,(4.7) +(4.6),0,2,(4.8) +(4.6),1,0,(5.6) +(4.6),1,1,(5.7) +(4.6),1,2,(5.8) +(4.6),2,0,(3.6) +(4.6),2,1,(3.7) +(4.6),2,2,(3.8) +(4.7),0,0,(4.7) +(4.7),0,1,(4.8) +(4.7),0,2,(4.6) +(4.7),1,0,(5.7) +(4.7),1,1,(5.8) +(4.7),1,2,(5.6) +(4.7),2,0,(3.7) +(4.7),2,1,(3.8) +(4.7),2,2,(3.6) +(4.8),0,0,(4.8) +(4.8),0,1,(4.6) +(4.8),0,2,(4.7) +(4.8),1,0,(5.8) +(4.8),1,1,(5.6) +(4.8),1,2,(5.7) +(4.8),2,0,(3.8) +(4.8),2,1,(3.6) +(4.8),2,2,(3.7) +(5.0),0,0,(5.0) +(5.0),0,1,(5.1) +(5.0),0,2,(5.2) +(5.0),1,0,(3.0) +(5.0),1,1,(3.1) +(5.0),1,2,(3.2) +(5.0),2,0,(4.0) +(5.0),2,1,(4.1) +(5.0),2,2,(4.2) +(5.1),0,0,(5.1) +(5.1),0,1,(5.2) +(5.1),0,2,(5.0) +(5.1),1,0,(3.1) +(5.1),1,1,(3.2) +(5.1),1,2,(3.0) +(5.1),2,0,(4.1) +(5.1),2,1,(4.2) +(5.1),2,2,(4.0) +(5.2),0,0,(5.2) +(5.2),0,1,(5.0) +(5.2),0,2,(5.1) +(5.2),1,0,(3.2) +(5.2),1,1,(3.0) +(5.2),1,2,(3.1) +(5.2),2,0,(4.2) +(5.2),2,1,(4.0) +(5.2),2,2,(4.1) +(5.3),0,0,(5.3) +(5.3),0,1,(5.4) +(5.3),0,2,(5.5) +(5.3),1,0,(3.3) +(5.3),1,1,(3.4) +(5.3),1,2,(3.5) +(5.3),2,0,(4.3) +(5.3),2,1,(4.4) +(5.3),2,2,(4.5) +(5.4),0,0,(5.4) +(5.4),0,1,(5.5) +(5.4),0,2,(5.3) +(5.4),1,0,(3.4) +(5.4),1,1,(3.5) +(5.4),1,2,(3.3) +(5.4),2,0,(4.4) +(5.4),2,1,(4.5) +(5.4),2,2,(4.3) +(5.5),0,0,(5.5) +(5.5),0,1,(5.3) +(5.5),0,2,(5.4) +(5.5),1,0,(3.5) +(5.5),1,1,(3.3) +(5.5),1,2,(3.4) +(5.5),2,0,(4.5) +(5.5),2,1,(4.3) +(5.5),2,2,(4.4) +(5.6),0,0,(5.6) +(5.6),0,1,(5.7) +(5.6),0,2,(5.8) +(5.6),1,0,(3.6) +(5.6),1,1,(3.7) +(5.6),1,2,(3.8) +(5.6),2,0,(4.6) +(5.6),2,1,(4.7) +(5.6),2,2,(4.8) +(5.7),0,0,(5.7) +(5.7),0,1,(5.8) +(5.7),0,2,(5.6) +(5.7),1,0,(3.7) +(5.7),1,1,(3.8) +(5.7),1,2,(3.6) +(5.7),2,0,(4.7) +(5.7),2,1,(4.8) +(5.7),2,2,(4.6) +(5.8),0,0,(5.8) +(5.8),0,1,(5.6) +(5.8),0,2,(5.7) +(5.8),1,0,(3.8) +(5.8),1,1,(3.6) +(5.8),1,2,(3.7) +(5.8),2,0,(4.8) +(5.8),2,1,(4.6) +(5.8),2,2,(4.7) +(6.0),0,0,(6.0) +(6.0),0,1,(6.1) +(6.0),0,2,(6.2) +(6.0),1,0,(7.0) +(6.0),1,1,(7.1) +(6.0),1,2,(7.2) +(6.0),2,0,(8.0) +(6.0),2,1,(8.1) +(6.0),2,2,(8.2) +(6.1),0,0,(6.1) +(6.1),0,1,(6.2) +(6.1),0,2,(6.0) +(6.1),1,0,(7.1) +(6.1),1,1,(7.2) +(6.1),1,2,(7.0) +(6.1),2,0,(8.1) +(6.1),2,1,(8.2) +(6.1),2,2,(8.0) +(6.2),0,0,(6.2) +(6.2),0,1,(6.0) +(6.2),0,2,(6.1) +(6.2),1,0,(7.2) +(6.2),1,1,(7.0) +(6.2),1,2,(7.1) +(6.2),2,0,(8.2) +(6.2),2,1,(8.0) +(6.2),2,2,(8.1) +(6.3),0,0,(6.3) +(6.3),0,1,(6.4) +(6.3),0,2,(6.5) +(6.3),1,0,(7.3) +(6.3),1,1,(7.4) +(6.3),1,2,(7.5) +(6.3),2,0,(8.3) +(6.3),2,1,(8.4) +(6.3),2,2,(8.5) +(6.4),0,0,(6.4) +(6.4),0,1,(6.5) +(6.4),0,2,(6.3) +(6.4),1,0,(7.4) +(6.4),1,1,(7.5) +(6.4),1,2,(7.3) +(6.4),2,0,(8.4) +(6.4),2,1,(8.5) +(6.4),2,2,(8.3) +(6.5),0,0,(6.5) +(6.5),0,1,(6.3) +(6.5),0,2,(6.4) +(6.5),1,0,(7.5) +(6.5),1,1,(7.3) +(6.5),1,2,(7.4) +(6.5),2,0,(8.5) +(6.5),2,1,(8.3) +(6.5),2,2,(8.4) +(6.6),0,0,(6.6) +(6.6),0,1,(6.7) +(6.6),0,2,(6.8) +(6.6),1,0,(7.6) +(6.6),1,1,(7.7) +(6.6),1,2,(7.8) +(6.6),2,0,(8.6) +(6.6),2,1,(8.7) +(6.6),2,2,(8.8) +(6.7),0,0,(6.7) +(6.7),0,1,(6.8) +(6.7),0,2,(6.6) +(6.7),1,0,(7.7) +(6.7),1,1,(7.8) +(6.7),1,2,(7.6) +(6.7),2,0,(8.7) +(6.7),2,1,(8.8) +(6.7),2,2,(8.6) +(6.8),0,0,(6.8) +(6.8),0,1,(6.6) +(6.8),0,2,(6.7) +(6.8),1,0,(7.8) +(6.8),1,1,(7.6) +(6.8),1,2,(7.7) +(6.8),2,0,(8.8) +(6.8),2,1,(8.6) +(6.8),2,2,(8.7) +(7.0),0,0,(7.0) +(7.0),0,1,(7.1) +(7.0),0,2,(7.2) +(7.0),1,0,(8.0) +(7.0),1,1,(8.1) +(7.0),1,2,(8.2) +(7.0),2,0,(6.0) +(7.0),2,1,(6.1) +(7.0),2,2,(6.2) +(7.1),0,0,(7.1) +(7.1),0,1,(7.2) +(7.1),0,2,(7.0) +(7.1),1,0,(8.1) +(7.1),1,1,(8.2) +(7.1),1,2,(8.0) +(7.1),2,0,(6.1) +(7.1),2,1,(6.2) +(7.1),2,2,(6.0) +(7.2),0,0,(7.2) +(7.2),0,1,(7.0) +(7.2),0,2,(7.1) +(7.2),1,0,(8.2) +(7.2),1,1,(8.0) +(7.2),1,2,(8.1) +(7.2),2,0,(6.2) +(7.2),2,1,(6.0) +(7.2),2,2,(6.1) +(7.3),0,0,(7.3) +(7.3),0,1,(7.4) +(7.3),0,2,(7.5) +(7.3),1,0,(8.3) +(7.3),1,1,(8.4) +(7.3),1,2,(8.5) +(7.3),2,0,(6.3) +(7.3),2,1,(6.4) +(7.3),2,2,(6.5) +(7.4),0,0,(7.4) +(7.4),0,1,(7.5) +(7.4),0,2,(7.3) +(7.4),1,0,(8.4) +(7.4),1,1,(8.5) +(7.4),1,2,(8.3) +(7.4),2,0,(6.4) +(7.4),2,1,(6.5) +(7.4),2,2,(6.3) +(7.5),0,0,(7.5) +(7.5),0,1,(7.3) +(7.5),0,2,(7.4) +(7.5),1,0,(8.5) +(7.5),1,1,(8.3) +(7.5),1,2,(8.4) +(7.5),2,0,(6.5) +(7.5),2,1,(6.3) +(7.5),2,2,(6.4) +(7.6),0,0,(7.6) +(7.6),0,1,(7.7) +(7.6),0,2,(7.8) +(7.6),1,0,(8.6) +(7.6),1,1,(8.7) +(7.6),1,2,(8.8) +(7.6),2,0,(6.6) +(7.6),2,1,(6.7) +(7.6),2,2,(6.8) +(7.7),0,0,(7.7) +(7.7),0,1,(7.8) +(7.7),0,2,(7.6) +(7.7),1,0,(8.7) +(7.7),1,1,(8.8) +(7.7),1,2,(8.6) +(7.7),2,0,(6.7) +(7.7),2,1,(6.8) +(7.7),2,2,(6.6) +(7.8),0,0,(7.8) +(7.8),0,1,(7.6) +(7.8),0,2,(7.7) +(7.8),1,0,(8.8) +(7.8),1,1,(8.6) +(7.8),1,2,(8.7) +(7.8),2,0,(6.8) +(7.8),2,1,(6.6) +(7.8),2,2,(6.7) +(8.0),0,0,(8.0) +(8.0),0,1,(8.1) +(8.0),0,2,(8.2) +(8.0),1,0,(6.0) +(8.0),1,1,(6.1) +(8.0),1,2,(6.2) +(8.0),2,0,(7.0) +(8.0),2,1,(7.1) +(8.0),2,2,(7.2) +(8.1),0,0,(8.1) +(8.1),0,1,(8.2) +(8.1),0,2,(8.0) +(8.1),1,0,(6.1) +(8.1),1,1,(6.2) +(8.1),1,2,(6.0) +(8.1),2,0,(7.1) +(8.1),2,1,(7.2) +(8.1),2,2,(7.0) +(8.2),0,0,(8.2) +(8.2),0,1,(8.0) +(8.2),0,2,(8.1) +(8.2),1,0,(6.2) +(8.2),1,1,(6.0) +(8.2),1,2,(6.1) +(8.2),2,0,(7.2) +(8.2),2,1,(7.0) +(8.2),2,2,(7.1) +(8.3),0,0,(8.3) +(8.3),0,1,(8.4) +(8.3),0,2,(8.5) +(8.3),1,0,(6.3) +(8.3),1,1,(6.4) +(8.3),1,2,(6.5) +(8.3),2,0,(7.3) +(8.3),2,1,(7.4) +(8.3),2,2,(7.5) +(8.4),0,0,(8.4) +(8.4),0,1,(8.5) +(8.4),0,2,(8.3) +(8.4),1,0,(6.4) +(8.4),1,1,(6.5) +(8.4),1,2,(6.3) +(8.4),2,0,(7.4) +(8.4),2,1,(7.5) +(8.4),2,2,(7.3) +(8.5),0,0,(8.5) +(8.5),0,1,(8.3) +(8.5),0,2,(8.4) +(8.5),1,0,(6.5) +(8.5),1,1,(6.3) +(8.5),1,2,(6.4) +(8.5),2,0,(7.5) +(8.5),2,1,(7.3) +(8.5),2,2,(7.4) +(8.6),0,0,(8.6) +(8.6),0,1,(8.7) +(8.6),0,2,(8.8) +(8.6),1,0,(6.6) +(8.6),1,1,(6.7) +(8.6),1,2,(6.8) +(8.6),2,0,(7.6) +(8.6),2,1,(7.7) +(8.6),2,2,(7.8) +(8.7),0,0,(8.7) +(8.7),0,1,(8.8) +(8.7),0,2,(8.6) +(8.7),1,0,(6.7) +(8.7),1,1,(6.8) +(8.7),1,2,(6.6) +(8.7),2,0,(7.7) +(8.7),2,1,(7.8) +(8.7),2,2,(7.6) +(8.8),0,0,(8.8) +(8.8),0,1,(8.6) +(8.8),0,2,(8.7) +(8.8),1,0,(6.8) +(8.8),1,1,(6.6) +(8.8),1,2,(6.7) +(8.8),2,0,(7.8) +(8.8),2,1,(7.6) +(8.8),2,2,(7.7)