import math


def puct_exploration_bonus(child_count, parent_count):
    """PUCT exploration bonus.

    A variant with weight changing over time is used in AlphaZero.

    Args:
        child_count (int): Number of visits in the child node so far.
        parent_count (int): Number of visits in the parent node so far.

    Returns:
        float: Exploration bonus to apply to the child.
    """
    return math.sqrt(parent_count) / (child_count + 1)