1234567891011121314151617181920212223242526272829303132 |
- #!/usr/bin/env python3
- from sudoku import Game, printBoard, setValue, getBoard
- MAX_V = 10
- class Solver:
- def __init__(self):
- self.tree = {}
- choices = set()
- board = []
- # Populate the choice vector with values from 0 to MAX_V-1
- for x in range(MAX_V)
- choices.add(str(x))
- # Creates a bidimensional list with choices for every element
- for x in range(MAX_V):
- row = []
- for y in range(MAX_V):
- row.append(choices)
- board.append(row)
- self.board = board
- result = getBoard()
- def actions(state):
- def result(state,action):
- def goalTest(state):
- if __name__ == "__main__":
- while not goalTest(state):
- for action in actions(node):
|