Add ideal algorithm.

Since we're touching this, can we fix the "non-required" terminology here which I believe is a hangover from the 'require' syntax? I would ditch it and say "smallest distance from the 'ideal' (including bare-value) constraints,"