Closed oyamad closed 9 years ago
def best_response_transition(self, current_action_dist): actions = np.nonzero(current_action_dist)[0] out = dict() for action in actions: current_action_dist[action] -= 1 brs = self.player.best_response(current_action_dist, tie_breaking=False) num_brs = len(brs) out[action] = np.empty((num_brs, self.num_actions), dtype=int) out[action][:] = current_action_dist out[action][np.arange(num_brs), brs] += 1 current_action_dist[action] += 1 return out