'Use the rollout policy to play until the end of the game, returning +1 if the current
player wins, -1 if the opponent wins, and 0 if it is a tie.'

def _evaluate_rollout(self, state, limit):

    player = state.get_current_player()
    for i in range(limit):
        action_probs = self._rollout(state)
        if (len(action_probs) == 0):
            break
        max_action = max(action_probs, key=itemgetter(1))[0]
        state.do_move(max_action)
    else:
        print 'WARNING:    rollout    reached    move    limit'
    winner = state.get_winner()
    if (winner == 0):
        return 0
    else:
        return (1 if (winner == player) else (-1))
