(self)
Builds from the current state of the environment
Builds from the current state of the environment
Builds from the current state of the environment
def build_tree(self):
        """
        Builds from the current state of the environment
        """
        self.root = ChanceNode(env_state=self._env.state_dict(),
                               tree=self,
                               parent=None,
                               is_terminal=False,
                               p_id_acted_last=None,
                               depth=0)
        self.root.allowed_actions = self._env.get_legal_actions()
        self.root.reach_probs = np.full(shape=(self._env_bldr.N_SEATS, self._env_bldr.rules.RANGE_SIZE),
                                        fill_value=1.0 / float(self._env_bldr.rules.RANGE_SIZE),
                                        dtype=np.float32)

        self._build_tree(current_node=self.root)
def build_tree ( self ) : self . root = ChanceNode ( env_state = self . _env . state_dict ( ) , tree = self , parent = None , is_terminal = False , p_id_acted_last = None , depth = 0 ) self . root . allowed_actions = self . _env . get_legal_actions ( ) self . root . reach_probs = np . full ( shape = ( self . _env_bldr . N_SEATS , self . _env_bldr . rules . RANGE_SIZE ) , fill_value = 1.0 / float ( self . _env_bldr . rules . RANGE_SIZE ) , dtype = np . float32 ) self . _build_tree ( current_node = self . root )