def similarity(event, places):
    """
    Return a list of dissimilar events to the given event. This is the
    successor function used in the search tree: a node's successors are the
    list of dissimilar options for the next choice.
    event (dict): A potential place/event.
    places (list): All potential places.

    return: List of dissimilar places.
    """
    dissimilar = []
    for place in places:
        similarity = 0
        if place["price"] == event["price"]:
            similarity += 1.
        for type1 in event["types"]:
            for type2 in place["types"]:
                if type1 == type2:
                    similarity += 1.0 / float(len(place["types"]))
        # 1.67 is the empirically generated threshold for similarity
        # The empirical process behind this is described in the paper
        if similarity <= 1.7:
            dissimilar.append(place)
    return dissimilar