import math


def calculate_epsilon(steps_done,
                      EGREEDY_EPSILON = 0.9,
                      EGREEDY_EPSILON_FINAL = 0.02,
                      EGREEDY_DECAY = 1000):
    """
    Decays eplison with increasing steps

    Input:
        steps_done (int) : number of steps completed

    Returns:
        int - decayed epsilon
    """
    epsilon = EGREEDY_EPSILON * math.exp(-1. * steps_done / EGREEDY_DECAY )
    return max(epsilon,EGREEDY_EPSILON_FINAL)