Computational Military Reasoning (Tactical Artificial Intelligence) Part 1

I coined the phrase ‘computational military reasoning’ in grad school to explain what my doctoral thesis in computer science was about. ‘Computational reasoning’ is a formal method for solving problems (technically, you don’t even need a computer). But, for our purposes it means a computer solving ‘human-level’ problems. A classic example of this would be calculating the fastest route on a map between two points. In computer science we call this a ‘least weighted path’ algorithm and I did my Q (Qualifying) Exam on this subject. I have also written extensively on the subject including these blog posts.

So, ‘computational military reasoning’ is a, “computer solving human-level military problems.” Furthermore, we can divide computational military reasoning into two subcategories: strategic and tactical (Russian military dogma also adds a third category, ‘grand strategy’); however, for now, let’s concentrate on tactical artificial intelligence; or battlefield decisions.

Tactical AI is divided into two parts: analyzing – or reading – the battlefield and acting on that information by creating a set coherent orders (commonly known as a COA or Course of Action) that exploit the weaknesses in our enemy’s position that we have found during our battlefield analysis.

 

It is said that as Napoleon traveled across Europe with his staff he would question them about the terrain that they were passing; “Where is the best defensive position? What are the best attack routes?” Where would you position artillery? What ground is favorable for cavalry attack?”

We take it for granted that such analysis of terrain and opposing forces positioned upon it is a skill that can be taught to humans. My doctoral research 1)TIGER: An Unsupervised Machine Learning Tactical Inference Generator; This thesis can be downloaded free of charge here. successfully demonstrated the hypothesis that an unsupervised machine learning program could also learn this skill and perform battlefield analysis that was statistically indistinguishable2)Using a one sided Wald test resulted in  p = 0.0001.In other words, it was extremely unlikely that TIGER was ‘guessing correctly’. from analyses performed by Subject Matter Experts (SMEs) such as instructors at West Point and active duty combat command officers.

Supervised & Unsupervised Machine Learning

Netflix recommendations are a supervised learning program. Every time you ‘like’ a movie the program ‘learns’ that you like ‘documentaries’; for example. Any program that has you ‘like’ or ‘dislike’ offerings is a supervised learning program. You are the supervisor and by clicking on ‘like’ or ‘dislike’ you are teaching the program.

TIGER is an unsupervised machine learning program. That means it has to figure everything out for itself. Rather than being taught, TIGER is ‘fed’ a series of ‘objects’ that have ‘attributes’ and it sorts them into like categories. For TIGER the objects are snapshots of battlefields.

Screen capture from TIGER. An ‘object’ has been loaded into TIGER for analysis; in this case a ‘snapshot’ of the battle of Antietam at 1630 hours on September 17, 1863. Click to enlarge.

How TIGER perceives the battlefield

When you and I look at a battlefield our brains, somehow, make sense of all the NATO 2525B icons scattered around the topographical map. I don’t know how our brains do it, but this is how TIGER does it:

Screen capture from TIGER: How TIGER converts unit positions into lines and frontages using a Minimum Spanning Tree (MST). Click to enlarge.

By combining 3D Line of Sight with Range of Influence (how far weapons can fire and how accurate they are at greater distances displayed, above, with lighter colors) with a Minimum Spanning Tree algorithm3)Kruskal’s algorithm, https://en.wikipedia.org/wiki/Kruskal%27s_algorithm the above image is how TIGER ‘sees’ the battlefield of Antietam. This is an important first step for evaluating object attributes.

How to determine the attribute of anchored or unanchored flanks

Battlefields are ‘objects’ that are made up of ‘attributes’. One of these attributes is the concept of anchored and unanchored flanks. While anyone who plays wargames probably has a good idea what is meant by a ‘flank’, following formal scientific methods I had to first prove that there was agreement among Subject Matter Experts (SMEs) on the subject. This is from one of the double-blind surveys given to SMEs:

Screen shot from online double-blind survey of Subject Matter Experts on identifying the presence of Anchored and Unanchored Flanks. Click to enlarge.

And their responses to the situation at Antietam:

Subject Matter Experts response to the question of the presence of Anchored or Unanchored flanks at Antietam. Click to enlarge.

And another double-blind survey question asked of the SMEs about anchored or unanchored flanks at Chancellorsville:

Response to double-blind survey question asked of SMEs about anchored and unanchored flanks at Chancellorsville. Click to enlarge.

So, we have now proven that there is agreement among Subject Matter Experts about the concept of ‘anchored’ and ‘unanchored’ flanks and, furthermore, some battlefields exhibit this attribute and others don’t.

Following is a series of slides from a debriefing presentation that I gave to DARPA (Defense Advanced Research Projects Agency) as part of my DARPA funded research grant (W911NF-11-200024) describing the algorithm that MATE (the successor to TIGER) uses to calculate if a flank is anchored or unanchored and how to tactically exploit this situation with a flanking maneuver. This briefing is not classified. Click to enlarge slides.

How to generate a Course of Action for a flank attack

Once TIGER / MATE has detected an ‘open’ or unanchored flank it will then plot a Course of Action (COA) to maneuver its forces to perform either a Turning Maneuver or an Envelopment Maneuver. Returning to the previous DARPA debriefing presentation (Click to enlarge):

MATE analysis of the battle of Marjah (Operation Moshtarak February 13, 2010)

The following two screen captures are part of MATE’s analysis of the battle of Marjah suggesting an alternative COA  (envelopment maneuver) to the direct frontal assault that the U. S. Marine force actually performed at Marjah. Click to enlarge:

Conclusions & Comments about Computational Military Reasoning (Tactical Artificial Intelligence) & Battlefield Analysis (Part 1)

Usually, at this point when I give this lecture, I look out to my audience and ask for questions. I really don’t want to lose anybody and we’ve got a lot more Tactical AI to talk about. So far, I’ve only covered how my programs (TIGER / MATE) analyze a battlefield in one particular way (does my enemy – OPFOR in military terms – have an exposed flank that I can pounce on?) and there is a lot more battlefield analysis to be performed.

It’s easy, as a computer scientist, to use computer science terminology and shorthand for explaining algorithms. But, I worry that the non computer scientists in the audience will not quite get what I’m saying.

Do you have any questions about this? If so, I would really like to hear from you. I’ve been working on this research for my entire professional career (see A Wargame 55 Years in the Making) and, frankly, I really like talking about it. As a TA said to me many years ago when I was an undergrad, “There are no stupid questions in computer science.” So, please feel free to write to me either using our built in form or by emailing me at Ezra [at] RiverviewAI.com

References   [ + ]

1. TIGER: An Unsupervised Machine Learning Tactical Inference Generator; This thesis can be downloaded free of charge here.
2. Using a one sided Wald test resulted in  p = 0.0001.In other words, it was extremely unlikely that TIGER was ‘guessing correctly’.
3. Kruskal’s algorithm, https://en.wikipedia.org/wiki/Kruskal%27s_algorithm

Free Scenarios Twenty-One Through Twenty-Five

We asked you for your Top 30 battles that you would like to see included free with General Staff for supporters of our Kickstarter campaign. We have previously announced the first twenty vote-getters. Today we are announcing the next five. One of the interesting features of General Staff is the ability to combine any two armies with a map to create a scenario. We use this feature for two day battles (such as Wagram and 2nd Bull Run) effectively creating two completely different battles (with two different armies) but using the same battlefield map.

This map of the battle of Alma was created only two years after the battle. Click to enlarge.

The battle of Alma is our first foray into the Crimean War. The Russians, though outnumbered, have the heights with their guns entrenched in heavy fortifications. The British and the French suffer numerous communication breakdowns. The battle seesawed back and forth until a final assault by the Highland Brigade carried the day and the Russians broke and fled from the battlefield. Playing the Allies will test your ability to coordinate attacks via messengers. Playing the Russians will require skillful coordination of counterattacks.

Wagram was a two day battle with the first day involving crossing the Danube. Click to enlarge.

On May 21st and 22nd Napoleon had attempted to cross the Danube at Lobau Island only to be turned back by Archduke Charles. Now, after over a month of preparations and reinforcements, Napoleon was ready to try again.

We present two distinct scenarios for the battle of Wagram: the first representing the situation on July 5th and Napoleon’s second attempt at crossing the Danube and establishing a beachhead and the second the battle of July 6th in which Archduke Charles attempted a double envelopment of Napoleon’s army. Only Napoleon’s hastily created ‘grand battery’ of artillery, a desperate cavalry charge and a counterattack by MacDonald’s corps saved the day. The Austrians eventually broke and fled the battlefield and sued for an armistice which ended the 1809 war.

Plan of the second Battle of Bull Run Va. Showing position of both armies at 7 p.m. 30th Aug. 1862. From the Library of Congress. Click to Enlarge

After General George McClellan’s disastrous Peninsula campaign, President Lincoln appointed Major General John Pope to lead the newly formed Army of Virginia and was tasked with the missions of protecting Washington D.C. and clearing the Shenandoah Valley of Confederates. McClellan, who never responded promptly to orders even in the best of circumstances, simply ignored commands to begin transferring his army from the peninsula southeast of Richmond up to Pope in front of Washington. Lee, knowing that McClellan had a bad case of the ‘slows’ took advantage of his interior lines to rapidly move his forces north to destroy Pope before McClellan’s troops could reinforce him.

The battle on the old Mananas battlefield began on August 28, 1862 with Jackson (commanding the left wing) shelling the passing Union column of King’s division (which included the soon to be famous Iron Brigade). The Iron Brigade, though outnumbered, attacked and fought Jackson’s famous division to a standstill. However, Jackson’s attack was primarily a feint employed as a ‘fixing force’ for an envelopment maneuver; Longstreet’s corps was expected to appear on the Union’s unprotected left flank.

On the second day, August 29th, Pope attempted to initiate a double envelopment against Jackson. However, Longstreet had now appeared on the battlefield at exactly the wrong place for Pope’s envelopment maneuver. The day was marked with incredibly poor communications between Pope and his subordinates and ended mostly as it began with neither side gaining or losing much ground.

The third day, August 30th, began with Longstreet’s counterattack on the Union’s exposed left flank. Again, incredibly poor communications between Pope and his subordinates turned a bad situation into a disaster. Unlike the first battle of Bull Run, the Union army fell back on Washington in an orderly column through an extremely limited avenue of retreat over Bull Run.

A Friend In Need Is a Friend Indeed

There’s a joke in the movie, What’s Up Doc? that goes something like this; “So you’re a doctor of music are you? Can you fix a broken record player?” “No.” “Well, sit down then!” Yes, I really do have a doctorate in computer science but that hardly means I know everything about computers (just watch me trying to fix my wife’s old machine running Windows XP). The higher up you go on the academic ladder in computer science the more you deal with algorithms, optimization and ‘big ideas’ and the less you do with learning the latest Microsoft programming environment.

When I began programming General Staff two years ago I decided to write it in Microsoft WPF (Windows Programming Foundation). This ensures that the program will run as a ‘standard’ Windows program and there shouldn’t be any compatibility issues. Unfortunately, I had absolutely no experience with WPF but, as I’ve done all my life, I gamely plunged in and started learning as I went.

For the most part things went pretty well and when I ran into trouble there was the Microsoft Developer’s Forum to ask for help. However, about a month ago, I had really coded myself into a corner and when I asked for advice about how to straighten out the visual representation of an Order of Battle Table a very nice gentleman by the name of Andy O’Neill kindly stepped in, took a look at my code and explained that I was doing it all wrong.

Andy is a superstar of the Microsoft Developer’s Forum. He is ranked in the top 0.1%, has 10 gold awards, 14 silver awards and 19 bronze awards. He was awarded the gold medal for the Microsoft Technical Guru in April 2015.

But, most importantly, Andy is a wargamer and knows what an Order of Battle Table is! 

Andy lives in Liverpool, England just up the hill from Strawberry Fields and John Lennon’s house. While, professionally Andy is known for his work with business application development, data visualization (and, really, isn’t this what a wargame is?), point of sale chip and pin credit card integration and end consumer applications (especially GUI, or Graphical User Interface), it’s his interest in table top wargaming that makes him invaluable to the General Staff project.

Andy has been involved in table top wargaming since the ’70s and his main area of interest is 1/72 WW2 skirmishes but he’s also interested in Fantasy, Ancients, the Seven Years War, Ultra Modern, Monster Rampage, Darkest Africa and the Boer War. He also works on modifying rule sets.

Below are some of Andy’s incredibly detailed miniatures:

With Andy’s expertise we have made a number of important changes to the underlying data files used in General Staff. This will result in a much more robust Windows program. Furthermore, Andy has made some substantial contributions to the user interface making the entire process of creating armies and scenarios much more intuitive and user friendly.

I can’t thank Andy O’Neill enough for all his help.

 

 

The Wargame in the Viking Grave

The recent article, “A female Viking warrior confirmed by genomics,” which appeared in the American Journal of Physical Anthropology has started a firestorm of controversy in both academia and the international press. The New York Times wrote, “…the controversy has reignited a longstanding debate about the role of women among the Vikings, Norse seafarers whose exploits, from the 8th to the 11th centuries, are central to Scandinavian identity.” Some argue that the DNA testing, itself, was in error or that the bones of the Viking warrior were mixed up with bones from another grave since the original discovery of grave Bj 581 from the Birka settlement on the island of Bjorko by Hjalmar Stolpe and first reported in 1889. Nonetheless, what caught my eye – and probably yours as well – were these words from the original article:

“The grave goods include a sword, an axe, a spear, armour-piercing arrows, a battle knife, two shields, and two horses, one mare and one stallion; thus, the complete equipment of a professional warrior. Furthermore, a full set of gaming pieces indicates knowledge of tactics and strategy (van Hamel, 1934; Whittaker, 2006), stressing the buried individual’s role as a high-ranking officer.” – A female Viking warrior confirmed by genomics, American Journal of Physical Anthropolgy, Hendenstierna-Jonson, et. al.

I had to find out: what was the Viking wargame buried in grave Bj 581?

Illustration by Evald Hansen based on the original plan of grave Bj 581 by excavator Hjalmar Stolpe; published in 1889 (Stolpe, 1889). The red circle highlights the gaming pieces. Click to enlarge.

Reconstruction of grave Bj 581 drawn by one of the authors, Neil Price. Click to enlarge.

First, I contacted Dr. Rosemary Moore who teaches Roman Military History and Warfare in the Ancient Mediterranean (as well as Classics) at the University of Iowa. I studied under Dr. Moore in graduate school and she was also on my Doctoral Defense Committee. Dr. Moore is also a former Marine officer and enjoys World of Warcraft and wargames. She did some preliminary research and forwarded Game-Boards and Gaming-Pieces in the Northern European Iron Age by Helène Whittaker to me. In describing a female burial in the same Viking cemetery (Bj 523) Whittaker writes, “Grave 523 was an exceptionally rich burial which contained gaming-pieces of glass…” And, “The female burial in Grave 523 at Birka shows that gaming equipment could at times also be associated with high status female burials. It can accordingly be suggested that the occurrence of gaming pieces and game-boards in funerary contexts could refer specifically to male prestige and the values associated with military prowess and leadership, but at times could also express social status in general, both male and female.”

While unable to find an actual photograph of the game pieces from Bj 581, I did discover a reference to 27 antler game pieces from that grave located at the Statens Historiska Museum in Sweden. A bit more digging found this photograph of 27 bone / antler game pieces from the same museum and tagged as having been found at  Bjorko.

Twenty-seven bone/antler game pieces found in grave 624 at Björkö, Uppland Sweden Adelsö parish. From the Statens Historiska Museum, Stockholm. Click to enlarge.

While the above game pieces came from a different grave in the same cemetery, they are of the right number and material. Consequently, the game pieces in Bj 581 must have been very similar.

What did the board look like? This photograph of a game board from a 7th century Viking boat burial in Valsgärde, Sweden had similar pieces:

Game board discovered in a 7th century Viking boat burial in Valsgärde, Sweden. Click to enlarge.

So, now it looks like we’ve found the pieces and the game board. All that’s left is to identify the game, itself. The best guess is that this is the game Hnefatafl. There are a number of modern versions of the game (some using different pieces) though the original rules were never recorded.

The name of the game comes from the Old Icelandic words hnef (fist) and tafl (table). Fist-table sounds like a proper Viking game for warriors.

Free Scenarios Sixteen Through Twenty!

We continue our list of the thirty most desired 18th and 19th century battles (as voted on by you) with numbers sixteen through twenty. All thirty scenarios will ship with General Staff, as well as the Army Editor, the Map Editor and the Scenario Editor to early supporters of General Staff on Kickstarter.  After Kickstarter these scenarios, and the software editing suite, will be available as digital downloads (DDL).

The battle of Shiloh created for the Topographical Engineers in 1866. From the Library of Congress. This is a great image. Please click to greatly enlarge.

If you have ever visited the site of the battle of Shiloh (Pittsburg Landing, Tennessee) your first thoughts were probably, “how could two large armies fight in this forest?” There are, of course, clearings where significant events took place and where the Union encampments were attacked, but Shiloh is mostly deep forest cut with ravines and a few paths and roads.

Shiloh was also a two-day battle with the first day ending as a major Confederate victory and the second a Union triumph. Grant’s Army of the Tennessee was bivouacked alongside the Tennessee River after its victories at Forts Donelson and Henry. Union commanders, including Sherman, ignored reports of Confederate activity in the vicinity. When the Confederates attacked on April 6 the Union forces were overwhelmed.

Plaque on the Shiloh battlefield indicating the location of Grant’s HQ. Click to enlarge.

On the evening of April 6-7, 1862 a terrific thunderstorm fell across the battlefield. Grant’s headquarters had been taken over as a field hospital and so he retreated to a tree where he stood in the rain holding a lantern in one hand and smoking a cigar. Grant’s subordinate commanders had decided that the battle was lost and that the army’s only hope was to abandon the artillery and baggage and ferry the troops across the river. Nobody wanted to approach Grant and, eventually, Sherman was induced to talk to him. He found Grant under this famous tree.

Not knowing exactly how to start the conversation he began by saying to Grant, “Well, Grant, we certainly had the Devil’s own day.”

“Yes,” said Grant, the end of his cigar glowing in the dark, “Going to whip ’em tomorrow, though.”

The Confederates ordered an attack against Grant’s troops at dawn. Grant ordered an attack on the Confederates an hour before dawn. The rest is history.

Positions in the morning of Day 2 of the battle of Eylau. Click to enlarge.

Though Eylau is listed as one of Napoleon’s great victories on the Arc de Triomphe, in reality it was a massacre in a blizzard that ended in a slight French tactical victory and a minor Russian strategic success.

Two large armies (the French and the Russian / Prussian armies were approximately the same size at 75,000 troops) occupied parallel ridge lines separated by a valley. It was February in Poland and the weather was freezing and snowy. Obviously, the weather conditions greatly effected troop speeds. It is very easy in General Staff to adjust unit speeds to reflect various weather conditions (see here).

At a critical juncture Napoleon ordered Murat to charge the Russian center with his 11,000 strong force. Though this was one of the largest cavalry charges of all times, this dubious honor actually belongs to the Polish and German cavalry at the battle of Vienna September 12, 1683 with an estimated force of 20,000.

Murat’s famous cavalry charge at Eylau painted by Jean-Antoine-Siméon Fort. Click to enlarge.

Murat’s charge stabilized Napoleon’s center and the Russian and Prussian troops withdrew from the battlefield that night. The French were too exhausted to pursue. After the battle, the late arriving Marshal Ney famously observed: “Quel massacre! Et sans résultat” (“What a massacre! And without result”).

The battle of Leuthen. Positions after Frederick the Great’s right flank envelopment maneuver. Click to enlarge.

At the battle of Leuthen, Frederick the Great performed a classic envelopment maneuver that crushed a much larger Austrian force. There are many ways to describe an envelopment maneuver but this clip from the movie Animal House has always been a favorite:

While distracting your opponent (“Greg, look at my thumb!”) you clock your enemy with a roundhouse punch.

In military terms, the distraction is called the ‘fixing force’ and the roundhouse punch is, “the enveloping force.” Frederick the Great assigned a small ‘fixing force’ to distract his enemy while the main force traveled behind a hill, hidden from sight.

The artificial intelligence (AI) for General Staff ‘knows’ the envelopment maneuver and prefers it over all forms of attack. Below are figures describing the implementation of the envelopment maneuver from one of the author’s papers:

Figures from the author’s, “”Implementing the Five Canonical Offensive Maneuvers in a CGF Environment,” illustrating the TIGER AI’s implementation of the envelopment maneuver. Click to enlarge.

The AI is keenly aware of 3D Line of Sight (see here) and will take advantage of intervening terrain (as did Frederick the Great) to hide its maneuvers. You have been warned.

The French are surrounded at the battle of Sedan. Click to enlarge

The battle of Sedan  ended the Franco Prussia war when the French army (commanded by Emperor Napoleon III) was surrounded and captured by  the German and Bavarian army (commanded by Helmuth von Moltke). As a scenario this will obviously turn on, “Can the French break out of the trap?”