def jacd(pola, polb):
    """Computes the jaccard distance

    Params:
    -------
    * pola: dictionary from states to actions
        deterministic policy computed by experiment a
    * polb: dictionary from states to actions
        deterministic policy computed by experiment b

    Returns:
    --------
    * jaccard distance
        1 - jaccard similarity
    """
    states = set(pola.keys()).union(set(polb.keys()))
    d = 0
    for s in states:
        set_a = set(pola[s])
        set_b = set(polb[s])
        d += 1 - (len(set_a & set_b) / len(set_a | set_b))

    return d