Esempio n. 1
0
 def expand_node(self, promising_node):
     possible_states = promising_node.state.get_all_possible_states()
     for state in possible_states:
         new_node = gn.Node(state._obs, True, state.bombing_agents)
         new_node.set_state(state)
         new_node.bombing_agents = new_node.state.bombing_agents
         new_node.parent = promising_node
         new_node.increment_move_count(promising_node.get_move_count())
         new_node.my_move = state.move
         new_node.score = state.score
         promising_node.childArray.append(new_node)
Esempio n. 2
0
    def expand_node(self, promising_node):

        #IN TREE HELP WITH GETTING ALL POSSIBLE STATES
        #get the node
        #get the state from that node
        #say these are all the possible states I can go to?
        possible_states = promising_node.state.get_all_possible_states()
        for state in possible_states:
            new_node = gn.Node(state._obs, True, state.bombing_agents)
            new_node.set_state(state)
            new_node.bombing_agents = new_node.state.bombing_agents
            new_node.parent = promising_node
            new_node.increment_move_count(promising_node.get_move_count())
            new_node.my_move = state.move
            new_node.score = state.score
            promising_node.childArray.append(new_node)
Esempio n. 3
0
    def expand_node(self, promising_node):

        #get the node
        #get the state from that node
        #say these are all the possible states I can go to?
        possible_states = promising_node.state.get_all_possible_states()
        for state in possible_states:
            new_node = gn.Node(state._obs, True, state.bombing_agents)
            new_node.set_state(state)
            new_node.bombing_agents = new_node.state.bombing_agents
            new_node.parent = promising_node
            new_node.increment_move_count(promising_node.get_move_count())
            new_node.my_move = state.move

            #New Changes TO MCM
            #new_node.score = state.score
            self.set_expand_node_state(new_node)

            promising_node.childArray.append(new_node)