def compatibility(i, j, i_n, j_n):

    """
    Defines the compatibility function
    """

    distance = ((i - i_n)**2.0 + (j - j_n)**2.0)**0.5

    return 1 if distance > 0 else 0
    # return distance > 0