import math


def _prediction(player_elo, opponent_elo):
    """Standard elo prediction probability.

    Based on the USCF rating algorithm. Predicts the probability of the player
    winning over the opponent.

    :param player_elo: float
    :param opponent_elo: float
    :return: float -- Probability of win.
    """
    exponent = -1 * (player_elo - opponent_elo) / 400.0
    return 1.0 / (1.0 + math.pow(10, exponent))