alphazero_separate_net.py
def select(self, c=1.5):
        """ Select one of the child actions based on UCT rule """
        n = len(self.child_actions)
        uct = np.zeros(n)
        for i in range(n):
            ca, prior = self.child_actions[i], self.priors[i]
            uct[i] = ca.Q + prior * c * (np.sqrt(self.n)/(ca.n + 1))
        winner = np.nanargmax(uct)   # is is possible to have nan here?
        return self.child_actions[winner]
 Select one of the child actions based on UCT rule 
Select one of the child actions based on UCT rule
Select one of the child actions based on UCT rule
def select(self, c=1.5):
        n = len(self.child_actions)
        uct = np.zeros(n)
        for i in range(n):
            ca, prior = self.child_actions[i], self.priors[i]
            uct[i] = ca.Q + prior * c * (np.sqrt(self.n)/(ca.n + 1))
        winner = np.nanargmax(uct)   
        return self.child_actions[winner]
def select ( self , c = 1.5 ) : n = len ( self . child_actions ) uct = np . zeros ( n ) for i in range ( n ) : ca , prior = self . child_actions [ i ] , self . priors [ i ] uct [ i ] = ca . Q + prior * c * ( np . sqrt ( self . n ) / ( ca . n + 1 ) ) winner = np . nanargmax ( uct ) return self . child_actions [ winner ]
Select one of the child actions based on UCT rule
Select one of the child actions based on UCT rule
""" Select one of the child actions based on UCT rule """ # is is possible to have nan here?
self
c