alphazero_separate_net.py
def return_results(self, temp):
        """ Process the output at the root node """
        n = len(self.root.child_actions)
        counts = np.zeros(n)
        Q = np.zeros(n)
        for i in range(n):
            ca = self.root.child_actions[i]
            counts[i] = ca.n
            Q[i] = ca.Q

        pi_target = self.stable_normalizer(counts, temp)
        v_target = np.sum((counts/np.sum(counts))*Q)[None, ]
        return self.root.index, pi_target, v_target
 Process the output at the root node 
Process the output at the root node
Process the output at the root node
def return_results(self, temp):
        n = len(self.root.child_actions)
        counts = np.zeros(n)
        Q = np.zeros(n)
        for i in range(n):
            ca = self.root.child_actions[i]
            counts[i] = ca.n
            Q[i] = ca.Q
        pi_target = self.stable_normalizer(counts, temp)
        v_target = np.sum((counts/np.sum(counts))*Q)[None, ]
        return self.root.index, pi_target, v_target
def return_results ( self , temp ) : n = len ( self . root . child_actions ) counts = np . zeros ( n ) Q = np . zeros ( n ) for i in range ( n ) : ca = self . root . child_actions [ i ] counts [ i ] = ca . n Q [ i ] = ca . Q pi_target = self . stable_normalizer ( counts , temp ) v_target = np . sum ( ( counts / np . sum ( counts ) ) * Q ) [ None , ] return self . root . index , pi_target , v_target
Process the output at the root node
Process the output at the root node
""" Process the output at the root node """
self
temp