def astar(self, heuristic_val): #print "In dfs() of Play Class" #root node of type GameTree root = GameTree(self.startBoard) #Expand Boards Based On The The Heuristics possible_boards = root.getGameBoard().possibleBoards() #print "Possible Board Values in Play Class::",possible_boards; for nextBoard in possible_boards: nextNode = GameTree(nextBoard) #print "NextBoard Value in dfs() of Play Class::",nextBoard; if (self.play(nextBoard, nextNode)): root.addChild(nextNode)
def astar(self,heuristic_val): #print "In dfs() of Play Class" #root node of type GameTree root=GameTree(self.startBoard) #Expand Boards Based On The The Heuristics possible_boards=root.getGameBoard().possibleBoards(); #print "Possible Board Values in Play Class::",possible_boards; for nextBoard in possible_boards: nextNode=GameTree(nextBoard); #print "NextBoard Value in dfs() of Play Class::",nextBoard; if(self.play(nextBoard,nextNode)): root.addChild(nextNode);
def dfs(self): #print "In dfs() of Play Class" #root node of type GameTree root = GameTree(self.startBoard) # possible_boards = root.getGameBoard().possibleBoards() #print "Possible Board Values in Play Class::",possible_boards; for nextBoard in possible_boards: nextNode = GameTree(nextBoard) #print "NextBoard Value in dfs() of Play Class::",nextBoard; if (self.play(nextBoard, nextNode)): root.addChild(nextNode)
def dfs(self): #print "In dfs() of Play Class" #root node of type GameTree root=GameTree(self.startBoard) # possible_boards=root.getGameBoard().possibleBoards(); #print "Possible Board Values in Play Class::",possible_boards; for nextBoard in possible_boards: nextNode=GameTree(nextBoard); #print "NextBoard Value in dfs() of Play Class::",nextBoard; if(self.play(nextBoard,nextNode)): root.addChild(nextNode);