Metaheuristics of War

I have been thinking about the problem of the “principles of war,” and various military authors’ differing takes on the viability of the concept. This is perhaps the best way to respond to the thought-provoking post Lynn Rees fashioned out of fragments of our gchat conversations.

Principles of war remain part of military manuals the world over, despite the fact that historical work has exposed substantial variance in their content. Principles of war evolve in time. John Alger’s work in particular is very interesting on this question. The basic pattern was, as one reviewer of Alger’s book argued, a canonization of Napoleonic principles followed by a grafting of midcentury combined arms warfare onto those already canonized Napoleonic principles. However, this element of relative consensus proved to be short-lived.

There has been widespread debate over whether “principles of war” are still valid for the so-called information age or irregular warfare. Military theorist William F. Owen‘s praise for Robert Leonhard’s late 1990s information-age update of the principles caused me to read it in college, and I found it very enlightening if overly optimistic about Transformation-era technologies. The principles of war are also being perpetually re-defined in countless books, articles, military college student monographs, and PowerPoint slides.

The way principles of war became proxies for principles of Napoleonic warfare leads us to question if there can be principles of war that generalize. If we take Clausewitz’s injunction about politics seriously, then we realize while war may have a underlying logic everything else will vary. Hence the problem with Basil Liddell-Hart’s book On Strategy – it tortures every historical example so thoroughly until it yields to supporting the indirect approach. A recent criticism of John Boyd recently elucidated this point as well. Boyd indulges in the conceptual equivalent of German attrition strategy at Verdun to force military history to conform to his PowerPoint magnum opus. Not surprisingly, Boyd inflicts grave losses on his opponent but is unable to extract too much strategic advantage relative to his own costs.

To seek time-invariant principles of war risks indulging in a John Yoo approach to military history . Indeed, books like Liddell-Hart’s own Great Captains Unveiled waterboard great military personages like Subotai and De Saxe until they cry “I’ll talk! I’ll talk! I won because I used the indirect approach! Just make the pain stop!” Torture is immoral and ineffectual in public policy, so why apply it to military history?

So what to do? One solution is try to boil principles of war down to pithy nubs stripped of unnecessary detail that express timeless truths about the “best practices” of warfighting — and build a doctrinal scaffolding around them. It would prune even highly abstract principles of war seen in doctrine down to more defensible levels of abstraction. But this idea suffers from several problems.

First, we dramatically overstate our current ability to tell what is “timeless.” That is the core of Rees’ recent entry – we are far more confused than we believe. And if the current, aphoristic principles of war were enough, would we see such a frenzy to re-define the terminology? It strikes me that what defense professionals often seek is a way to take principles down from the 747 jet flight level to the granular world of practice. As a result, they often turn to vulgar novelty over tradition when they are really searching for a process that might help them navigate the mismatch between supposed timeless principles and the actual problems they face.

Traditionalists (often correctly) believe this desire for novelty stems from fads, pressure to conform to political or bureaucratic directives, and personal empire-building. But in the last 12 years there has been a sincere outpouring of angst from soldiers, intelligence analysts, and civilian policy analysts in the government sector who find that principle of war aphorisms are not enough. One might not agree with Emile Simpson’s contentious take on war and politics, but he wrote the book because so-called timeless truths obviously did not help Simpson do his military job in Afghanistan. And I have often seen Mark Safranski argue here over the years that the concept of Fourth Generation Warfare was necessary as a forcing mechanism to get the US military to adapt to challenges it faced in Iraq and Afghanistan.

It is tempting to respond to this by saying “they need to read ___ old strategy master I like and study military history in the subjective way I like until they can understand strategy.” But this is a recipe for indoctrination since “understanding” = agreeing with old strategy master + the aforementioned fuzzy and didactic approach to extracting timeless or eternal ideas from military history. Instead, we might introduce metaheuristics of war as a complementary concept to the principles of war:

Metaheuristics is a rather unfortunate term often used to describe a major subfield, indeed the primary subfield, of stochastic optimization. Stochastic optimization is the general class of algorithms and techniques which employ some degree of randomness to find optimal (or as optimal as possible) solutions to hard problems. Metaheuristics are the most general of these kinds of algorithms, and are applied to a very wide range of problems.

I shall not today attempt further to define the kinds of material I understand to be embraced within that shorthand description; and perhaps I could never succeed in intelligibly doing so. But I know it when I see it, and the motion picture involved in this case is not that.

Metaheuristics are applied to I know it when I see it problems. They’re algorithms used to find answers to problems when you have very little to help you: you don’t know what the optimal solution looks like, you don’t know how to go about finding it in a principled way, you have very little heuristic information to go on, and brute-force search is out of the question because the space is too large. But if you’re given a candidate solution to your problem, you can test it and assess how good it is. That is, you know a good one when you see it.

Metaheuristics are not heuristics of heuristics, as Luke notes in a parenthetical comment. Rather, they are algorithms that select useful solutions for problems under the difficult conditions Luke specifies in the above quote. Let’s see an example:

For example: imagine if you’re trying to find an optimal set of robot behaviors for a soccer goalie robot. You have a simulator for the robot and can test any given robot behavior set and assign it a quality (you know a good one when you see it). And you’ve come up with a definition for what robot behavior sets look like in general. But you have no idea what the optimal behavior set is, nor even how to go about finding it.

The simplest thing you could do in this situation is Random Search: just try random behavior sets as long as you have time, and return the best one you discovered. But before you give up and start doing random search, consider the following alternative, known as Hill-Climbing. Start with a random behavior set. Then make a small, random modification to it and try the new version. If the new version is better, throw the old one away. Else throw the new version away. Now make another small, random modification to your current version (which ever one you didn’t throw away). If this newest version is better, throw away your current version, else throw away the newest version. Repeat as long as you can.

Hill-climbing is a simple metaheuristic algorithm. It exploits a heuristic belief about your space of candidate solutions which is usually true for many problems: that similar solutions tend to behave similarly (and tend to have similar quality), so small modifications will generally result in small, well-behaved changes in quality, allowing us to “climb the hill” of quality up to good solutions. This heuristic belief is one of the central defining features of metaheuristics: indeed, nearly all metaheuristics are essentially elaborate combinations of hill-climbing and random search.

One must use caution. When Clausewitz uses a metaphor, he does so because it helps us understand some dimension of the problem being discussed — not because a Center of Gravity in war maps exactly onto the meaning of the Center of Gravity in physics. Boyd does not make this distinction, and thus is vulnerable to criticisms from those that accurately point out that his interpretation of scientific concepts do not match their original usage. The level of abstraction I am discussing with in this post must be qualified in this respect, as I hope to avoid repeating Boyd’s mistake.

However, the following aspects of metaheuristics are still appealing in abstract. In many real-world problems, we do not know what an optimal solution looks like. We don’t know how to find it. We have a nub of information we can use, but not much more. Most importantly, the space of possible solutions is too large for us to just use brute force search for an answer:

A brute-force approach for the eight queens puzzle would examine all possible arrangements of 8 pieces on the 64-square chessboard, and, for each arrangement, check whether each (queen) piece can attack any other.

While hill-climbing and random-search are inherent in most metaheuristics, there are different types of metaheuristic algorithms for different problems with varying performance in climbing the “hill of quality.” Hence it is customizable and recognizes variation in performance of methods. Some methods will perform well on some problems, but will get stuck at a local optima instead of a peak when faced with others.

One gigantic caveat: the idea of peaks and valleys in the solution space is derived from the assumption of a static, not dynamically evolving, landscape of candidate solutions. A perfect example is the application of the Ant Colony Optimization method to the notoriously hard Traveling Salesman Problem or the use of genetic algorithms to optimize the Starcraft tech tree’s build orders. When the solution space you are searching and climbing evolves in time, algorithms that assume a static landscape run into problems.

However, this is also why (in more mathematically dense language) nailing down principles of war is so perilous. A solution that you might have used a principle of war to get to is fine at time T. But it loses validity as we shift to T+1 and tick upwards towards T+k. And should you use a principle that better fits war’s grammar in 1830 than 2013, then you are even more screwed.

The advantage of metaheuristics of war compared to principles of war is that, while both consider solutions to problems with discrete (not continuously shifting) solution landscapes, metaheuristics are about how you find solutions. Hill-climbing is (oversimplified) method of moving through solutions that exploits heuristic information, and random search is (also oversimplified) “try and see what happens.” The process of a metaheuristic involves a combination of both.

In contrast, principles of war are not really a process as much as a set of general guidelines designed to dramatically and a priori shrink the possible space of solutions to be considered in ways far more sweeping than hill-climbing. They imply a very, very restricted set of solutions while still being too vague to help a practitioner think about how the solutions fit the problem. Principles of war generally say to the practitioner, “generally, you do ___ but how you apply this is up to your specific situation and needs.” It has a broad set of do’s and don’ts that — by definition — foreclose consideration of possible solutions when they conflict with a given principle.

Yes, they are suggestions not guidelines, but the burden of proof is on the principle-violating solution, not the principle of war. It may be that many problems will require flagrantly violating a given principle. The Royal Navy’s idea about distributing its forces to deal with the strategic problem posed by early 20th century imperial geopolitics potentially runs afoul of several principles of war, but it still worked. Finally, many principles of war as incorporated in military instruction are shaped more by cultural bias than timeless warfighting ideas.

As noted previously, metaheuristic algorithms are flexible. Different metaheuristics can be specified for differing problems. Additionally, when we consider past military problems (which the didactic teaching of principles of war concerns), metaheuristics can serve as alternative method for thinking about canonical historical military problems. Algorithms are measured against benchmark problems. One can consider abstract “benchmark” military problems and more specific classes of problems. By doing so, we may shed light on conditions impacting the usefulness of various principles of war on various problems of interest.

I will stress again that the loose notion of metaheuristics of war and the the principles of war should be complementary, not an either-or. And they can be combined with methods that are more interpretive and frame-based, since you will not be able to use a metaheuristic without having the “I know it when I see it” understanding Luke referenced in the beginning of his quoted text. On a similar note, I’ll also stress that an algorithm makes up only one part of a software program’s design pattern. A strategy or strategic concept is a larger architecture (e.g. a “strategy bridge“) that cannot simply be reduced to some narrow subcomponent — which is how the principles of war have always been understood within the context of strategic thought.

That being said…….what about war in real time, the dynamic and nonlinear contest of wills that Clausewitz describes? Note the distinction between the idea of principles of war that reasonably explain a past collection of military problems/offer guidance to understanding reasonably well-known military problems and the conceptual ability to understand the underlying dynamics of a specific present or future military contest.

The principle of objective, unity of command, or mass will not tell you much about the context of the strategic dilemma Robert E. Lee faced as a Confederate commander because geography, technology, ideology, state policy, the choices of neutral states, etc all structured his decision. They are much better when applied to the general class of problem that Lee’s dilemma could be abstracted into.

This is the difference between Clausewitz’s “ideal” and “real” war. Ideal war lacks the constraints and context of real war, and real war is something more than the sum of its parts. For example, maneuverists often argued that the US should implement an German-style elastic defense to defeat the Soviets in Central Europe. But such an solution, while perhaps valid in the abstract, would not be tolerated by European coalition partners that sought to avoid another spate of WWII-like demolition of their homelands.

Principles of war tell us very little about the Trinity’s notion of passion, reason, and chance, or the very political, economic, geographic, and technological conditions that might allow us to understand how Clausewitz’s two interacting “duel” partners move from the start of the match to conclusion. We need to think about how the duel plays out in time. And for reasons already explained metaheuristics also have some big limitations of their own with respect to dynamically evolving solution spaces.

An entirely different set of conceptual tools is needed, but that’s a problem for another post. For now, I leave you with a NetLogo implementation of Particle Swarm Optimization. Look at those NetLogo turtles go!!