Add ideal algorithm.