aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--python/GameState.py2
-rw-r--r--python/alphaBeta.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/python/GameState.py b/python/GameState.py
index 6047f8d..9e780a9 100644
--- a/python/GameState.py
+++ b/python/GameState.py
@@ -81,7 +81,7 @@ class DotsAndBoxesState(GameState):
def play_move(self, move):
r, c, o = move
- assert move in self.get_moves()
+ #assert move in self.get_moves()
# check if this move makes a box
makes_box = False
diff --git a/python/alphaBeta.py b/python/alphaBeta.py
index a170914..f9d735f 100644
--- a/python/alphaBeta.py
+++ b/python/alphaBeta.py
@@ -26,7 +26,8 @@ class ABNode(object): # A class for Node related operations
self.CurrentScore = self.Current.score[2]-self.Current.score[1]
def Make(self, r,c,o): # Function for generating a child node
- self.children[(r,c,o)] = ABNode(self.Current.get_cur)
+ lit=deepcopy(self.Current)
+ self.children[(r,c,o)] = ABNode(lit)
move=(r,c,o)
self.children[(r,c,o)].Current.play_move(move)
self.children[(r,c,o)].update_score()