One person’s insanity is another person’s interesting puzzle and optimization problem.