Add ideal algorithm.

For all 'ideal' (including bare-value) string and enum