Added debug branch, to make optimized run faster

This commit is contained in:
Lukas Wölfer
2019-04-20 03:03:49 +02:00
parent 2a908fa7ad
commit 87cfcbf7c0
2 changed files with 9 additions and 4 deletions

View File

@@ -56,6 +56,11 @@ class SolitaireSolver:
def solve(self) -> Iterator[List[board_actions.Action]]:
while self.stack:
if len(self.stack) == -1:
self.stack.pop()
self.stack.action_stack[-1].undo(self.search_board)
assert (self.search_board.state_identifier
in self.state_set)
assert (self.search_board.state_identifier ==
self.stack.state_stack[-1])