Lawns in public places all suffer from the same problem: People don’t like detours. Throughout the world we search for the fastest route, the closest parking spot, the shortest way to the restroom—we optimize. Incremental modification, followed by evaluation and readjustment, guides us to solutions that maximize a desired criterion. These little series of trial and error are so ingrained we rarely think about them. But optimization, once expressed in scientific terms, is one of the most versatile scientific concepts we know.

Optimization under variation isn’t only a human strategy but a ubiquitous selection principle that you can observe everywhere in nature. A soap bubble minimizes surface area. Lightning uses the way of least resistance. Light travels the path which takes the least amount of time. And with only two slight twists, optimization can be applied even more widely.

The first twist is that many natural systems don’t actually perform the modifications—they work by what physicists call “virtual variations.” This means that from all the possible ways a system could behave, the one we observe is quantifiably optimal: It minimizes a function called the “action.” Using the mathematical procedure known as “principle of least action,” we can then obtain equations that allow us to calculate how the system will behave.

Accommodating quantum mechanics requires a second twist. A quantum system doesn’t only do one thing at a time; it does everything that’s possible, all at the same time. But properly weighted and summed up in the “path integral,” this collection of all possible behaviors again describes observations. And usually the optimal behavior is still the most likely one, which is why we don’t notice quantum effects in everyday life.

Optimization is not a new concept. It’s the scientific variant of Leibnitz’s precocious hypothesis that we live in the “best of all possible worlds.” But while the idea dates back to the 18^{th} century, it is still the most universal law of nature we know. Modern cosmology and particle physics both work by just specifying exactly in which way our world is “the best.” (Though I have to warn you that “just specifying exactly” requires a whole lot of mathematics.)

And if physics isn’t your thing, optimization also underlies natural selection and free market economies. Our social, political, and economic systems are examples of complex adaptive systems; they are collections of agents who make incremental modifications and react to feedback. By this, the agents optimize adaptation to certain criteria. Unlike in physics, we can’t calculate what these systems will do, and that’s not what we want—we just use them as tools to work to our ends. Exactly what each system optimizes is encoded in the feedback cycle. And there’s the rub.

It’s easy to take the optimization done by adaptive systems for granted. We’re so used to this happening, it seems almost unavoidable. But how well such systems work depends crucially on the setup of the feedback cycle. Modifications should neither be too random nor too directed, and the feedback must—implicitly or explicitly—evaluate the optimization criteria.

When we use adaptive systems to facilitate our living together, we therefore have to make sure they actually optimize what they’re supposed to. An economic system pervaded by monopolies, for example, doesn’t optimize supply to customers' demands. And a political system which gives agents insufficient information about their current situation and which does not allow them to extrapolate likely consequences of their actions doesn’t optimize the realization of its agents’ values.

Science, too, is an adaptive system. It should optimize knowledge discovery. But science, too, doesn’t miraculously self-optimize what we hope it does—the implementation of the feedback cycle requires careful design and monitoring. It’s a lesson that even scientists haven’t taken sufficiently to heart: If you get something from nothing, it’s most likely not what you wanted.

When we use optimization to organize our societies, we have to decide what we mean by “optimal.” There’s no invisible hand to take this responsibility off us. And that ought to be more widely known.