Choose the lowest cost solution for the K that has the best overall stability metrics. Fixes #4.