def decreasingE(agent,state):
    """
    Implements the decreasing-epsilon method
    which starts with a high exploration rate (0.95)
    and then decreases linearly with time (~0)
    """
    episodes = float(agent.episodesSoFar)
    trials = float(state.trial)

    x = 100.0*episodes+trials
    m = -.0005
    b = 1-.0499
    return m*x+b