learning constraints