def reward_min_delay(state, *args):
    """Minimizing the delay

    Reward definition 1: Minimizing the delay

    Params:
    ------
    * state: ilurl.state.State
        captures the delay experienced by phases.

    Returns:
    --------
    * ret: dict<str, float>
        keys: tls_ids, values: rewards

    Reference:
    ----------
    * El-Tantawy, et al. 2014
        "Design for Reinforcement Learning Parameters for Seamless"

    * Lu, Liu, & Dai. 2008
        "Incremental multistep Q-learning for adaptive traffic signal control"

    * Shoufeng et al., 2008
        "Q-Learning for adaptive traffic signal control based on delay"

    * Abdullhai et al. 2003
        "Reinforcement learning for true adaptive traffic signal control."

    * Wiering, 2000
        "Multi-agent reinforcement learning for traffic light control."

    """
    try:
        delays = state.feature_map(
            filter_by=('delay',)
        )
    except AttributeError:
        delays = state

    ret = {}
    for tls_id, phase_obs in delays.items():
        ret[tls_id] = -sum([dly for obs in phase_obs for dly in obs])
    return ret