def get_decayed_param(initial_value, final_value, decay_rate, i_episode):
    """get decayed parameter at episode i_episode

    Args:
        initial_value (float): initial value of the parameter
        final_value (float): final value
        decay_rate (float): rate at which parameter value is decayed.
        i_episode (int): number of episode

    Returns:
        float: parameter value at episode i_episode
    """
    param = initial_value * (decay_rate ** i_episode) + final_value
    return param