Clustering and instance based learning in first order logic door