Category Archives: Artificial Intelligence

Testing the MATE 2.0 Artificial Intelligence on the new Antietam Scenario

We’ve just added a video showing the MATE 2.0 tactical artificial intelligence playing Blue (Union Army of the Potomac) against Red (Confederate Army of Northern Virginia) at Antietam. This video also includes an announcement that we’ll be working on getting the Army Editor, Map Editor and Scenario Editor installation packages and keys ready on Steam.

Why the Pundits are Completely Wrong About AI

I have a lot of respect for Steve Wozniak – quite a bit less for Elon Musk 1)Though I have to admit losing $20 billion in a few months is impressive. – who both recently signed a letter calling for, “all AI labs to immediately pause for at least 6 months the training of AI systems more powerful than GPT-4.” Woz is a true computer hardware pioneer; but he’s certainly not an AI expert and Elon, well, I’m not sure where his expertise lies, but it’s not AI.

When it comes to creating AI capable of commanding troops on a battlefield, I am probably one of the world’s top experts on the subject (it’s not a crowded field). I’ve been writing and studying ‘computational military reasoning’ for my entire professional career, it was the subject of my doctoral thesis, I’ve written AI for numerous computer wargames and I’ve been a Principal Investigator for DARPA (Defense Advanced Research Project Agency) on this very subject.

I am confident in stating that no humans have been injured or died as a result of my work in computational military reasoning. However, the most recent NHTSA data reports that there have been at least, “419 crashes [and]… 18 definite fatalities of autonomous self-driving vehicles (like Mr. Musk’s Teslas). So, clearly, in some circumstances AI can be dangerous. In all fairness, I should state that the reason the self-driving autonomous vehicles keep having fatal crashes isn’t technically the AI; it’s that the AI has imperfect information about the world in which it operates. The AI for self-driving vehicles gets that information from cameras and radar (LIDAR would be good, too). However, Telsa just removed the radar from it’s vehicles (“Elon Musk Overruled Tesla Engineers Who Said Removing Radar Would Be Problematic: Report,”) leaving the AI even more in the dark about the world in which it operates. So, is the AI at fault or corporate management? Maybe the problem isn’t AI.

Furthermore, most of what’s being sold to the public as AI are just some string manipulation parlor tricks tacked on to an internet search. ChatGPT-4, which is making all the headlines these days, was recently accurately described:

“Put simply, ChatGPT takes an initial prompt and determines – on an individual, word by word basis – what most often comes next based on the existing texts that it has scanned throughout the internet. In Wolfram’s words, “it’s just adding one word at a time” – but doing it so quickly that it seems as though a robot is writing an original, whole block of text.

Essentially, ChatGPT is a gigantic version of Google autocomplete.” – ​AI or BS? How to tell if a marketing tool really uses artificial intelligence

I recently asked ChatGPT for a quote from U. S. Grant about war and it responded:

Actually, it was W. T. Sherman who said, “War is hell.” But, ChatGPT has no real intelligence. How it erroneously linked Grant to the quote I have no idea. The greatest fear we should have of ChatGPT is incorrect citations in reference papers. The creators of ChatGPT have clearly traded accuracy for glitz and hype; it’s not even a good internet search engine, but it sure seems impressive!

There’s one more thing you should know. There are two kinds of machine learning: supervised and unsupervised. Probably >95% of machine learning programs are ‘supervised’; which means they are ‘trained’ on a data set. Whenever you see the words ‘training’ in reference to machine learning you know it’s supervised. Here’s an example of supervised machine learning: Netflix movie recommendations. Every time you select a movie on Netflix you are training their system on your likes and dislikes. It does a great job, doesn’t it? No, it does a terrible job. It once recommended Sound of Music to me because I watched Das Boot. Makes perfect sense. They both take place during WWII.

What I’m saying is that there is no ‘there’ there. There is no intelligence there. Somebody at Netflix (at one time I read they employed out of work screenwriters) tagged both Das Boot and Sound of Music with the same descriptor; presumably ‘WWII’ or ‘war movie’ and that was all that was necessary for Netflix to make a terrible suggestion.

I work in unsupervised machine learning. It doesn’t search the internet, or look for similar words in a big data base. It tries to make sense of the world in which it operates (a historic battlefield) and attempts to make optimal decisions for moving units based on math, geometry, trigonometry and boolean logic.

That’s AI. And it’s not dangerous. Autonomous self-driving cars? They’re dangerous.

References

References
1 Though I have to admit losing $20 billion in a few months is impressive.

Schwerpunkt: Calculating the Optimal Point of Attack

MATE’s analysis of Blue (Union) position at Antietam. NB: Unable to outflank Red’s position, MATE has calculated the Schwerpunkt, or optimal point of attack on Red’s lines. Click to enlarge.

The holy grail of military science is an algorithm that calculates the optimal point of attack upon an enemy’s lines. In German, the word is Schwerpunkt and is commonly translated as “the point of maximum effort.” I have written extensively about Schwerpunkt previously in this blog, in academic papers and in my doctoral thesis.

MATE (Machine Analysis of Tactical Environments 2.0, the AI behind General Staff: Black Powder) is now able to calculate Schwerpunkt to a new, substantially greater, degree of accuracy. There are a number of reasons why this is now possible, but the primary cause must be the ability to analyze the battlefield in 3D and to accurately map where every unit on the map can project its force. Indeed, for many years now I have looked at the problem of computational military reasoning (AI for tactical situations) as a force projection problem.

Below, is a visual representation of the total force projection of all units at Gettysburg, Day 3 (July 3, 1863 0600 hours):

Visual representation of the total force projection (Range of Influence, or ROI) for all units at Gettysburg Day 3. Note: normalization and alpha values affect color output. Also, note how the terrain (woods, depressions, hills) shape the projection of force. Also, all projections are independent of unit facing. Click to enlarge.

If we ask MATE to determine the Schwerpunkt for the Confederates in the above situation, it responds with:

MATE’s selection (labeled OBJECTIVE) for Red Schwerpunkt. Click to enlarge.

And adds the following commentary (edited for brevity, the numbers are the Premise Statement ID#s. This is basically a logic trace of MATE’s thinking):

8|∴ The enemy does not need to capture more Victory Points.
9|∴ The enemy will be on the defensive.
...
22|The enemy's flanks are anchored.
23|[9] + [22] ∴ Frontal assault is the only remaining option.
...
25|COA: Battle Group #1 (Mixed) assigned objective Weak Point Calculated by ROI coords: 551,232
...
33|Red Battle Group #1 is opposed by Blue Battle Group #6
34|Red Battlegroup # 1's strength = 21,663
35|Blue Battlegroup # 6's strength = 13,635
36|Red Battlegroup # 1 has a numerical advantage of 8,028. Red has a 1.59 / 1 advantage over Blue Battle Group #6.
37|Distance to objective is 1,029.86 meters.
38|The maximum slope along the line of attack will be on an upward slope of 3.64%.
39|The attacking avenue of approach will be in enemy ROI for 541.18 meters.
40|The greatest enemy ROI along the avenue of approach is: 1,276.00 .
41|There is an unrestricted avenue of attack.

In other words, MATE has found a path to its objective that encounters the least amount of enemy projection of force. MATE would much prefer to flank the enemy position but it has calculated that this is impossible (#22, above).

ROI (Range of Influence) is calculated using values set up for each unit in the General Staff Army Editor and running a 3D Bresenham line algorithm to ensure that there is direct Line of Sight (LOS) to that point.

Screen shot of the General Staff Army Editor showing the interface for entering values for a typical artillery unit. Note that the accuracy curve is user editable (there are also default curves for various common weapons). Click to enlarge.

It is because every unit has an accuracy curve attached to it we can exactly map out the overlapping fields of fire (see above) and we can precisely calculate how long each attacking unit will be under fire and its intensity. That is how MATE chooses the optimal attack point: the path where its troops will be under the least amount of fire.

When MATE is presented with a tactical problem it first determines what it needs to do to win; is it on the offense or defense? On the offense, MATE will next check to find the enemy’s open flank and, if there is one, are there any crucial choke points on the flanking route? If MATE is unable to ‘fix and flank’ the enemy, and it has determined that it must be on the offensive, MATE then calculates Schwerpunkt (above). With this new Schwerpunkt algorithm the last big piece of the offensive AI puzzle is in place. Ironically, much of MATE’s defensive calculations involve first figuring out how to attack itself and then countering what it determines are its own optimal moves against itself (see this blog).

As always, please feel free to contact me directly with comments or questions.

A Human-Level Intelligence at Gettysburg, Day 3

Screenshot of MATE analysis of Gettysburg, Day 3 from the Red (Confederate) position. Click to enlarge.,

General Lee, at Gettysburg, said: “the enemy have the advantage of us in a shorter and inside line and we are too much extended.” – quoted by Major General Isaac Trimble.1)Isaac Trimble, Southern Historical Society Papers, Vol. 26, Richmond, Virginia: Reverend J. William Jones, D.D., MATE, the AI behind General Staff, came to the exact same conclusion:

A portion of MATE’s analysis of Red’s position at Gettysburg, Day 3. Here MATE recognizes that Red has exterior lines and the enemy has a decided advantage.

I have been porting TIGER 2)Tactical Inference GenERator, the AI behind my doctoral thesis and my DARPA sponsored research from C++ to C# and integrating it into the General Staff: Black Powder wargaming system. I have been doing this via the method of first creating a scenario typifying a specific attribute (exterior lines, exposed flanks, choke points, etc.) and then porting the actual code over and feeding it the scenario for analysis. Gettysburg, Day 3, is the canonical example of exterior and interior lines.

92.9% of Subject Matter Experts agree! The Union (Blue) lines at Gettysburg, Day 3, exhibit the attribute of being Interior Lines. Interior lines are good. Exterior lines are bad. From author’s doctoral thesis.

So, first a significant number of Subject Matter Experts (combat commanders, tactics instructors at military academies, etc.,) agree that there is an attribute called ‘Interior Lines’ and that it is exhibited by the Union (Blue) forces at Gettysburg, Day 3. We then create an algorithm that can detect such an attribute and convert it from C++ code to C# code (and substantially rewrite and improve said algorithm in the process) . We then create a Gettysburg, Day 3 scenario using the General Staff Army Editor, the General Staff Map Editor and the General Staff Scenario Editor and feed the scenario3)In Computer Science lingo programs are machines that consume data / tokens to MATE, the General Staff: Black Powder AI. These are the results:

MATE analysis text output (with author’s commentary) of Gettysburg, Day 3, from the Red (Confederate) position. Click to enlarge.

The first time that I presented the Gettysburg, Day 3 scenario as Red to MATE it refused to attack. The enemy has interior lines (1.4, or 40% greater is pretty significant value), you’re attacking uphill (slope > 7%), your attacking units are under enemy ROI (mostly batteries of 12 lb. Napoleon canon shooting explosive shot and then canister and then double-shotted canister) for over a kilometer. Attacking is not a good idea. To get MATE to attack I had to go back to the Map Editor and create a number of new Victory Points; specifically the places where significant roads (Emmitsburg Road, Cashtown Road, Baltimore Pike, etc.) enter the map. Then I went in to the Scenario Editor and assigned appropriate values and current ‘ownership’. Saved it all and fed it back to MATE and the, above, is what I got.

The only way for MATE to win (as Red) is to attack large Victory Point areas (Cemetery Hill and Cemetery Ridge) and hope to destroy significant numbers of Blue (Union) forces along the way to meet the victory conditions set in the Scenario Editor:

Gettysburg, Day 3 Victory Conditions. Screenshot General Staff Scenario Editor.

Anybody who has built a wargame scenario (and I suspect there are more than a few among the readers of this blog) know the drill of going back to edit the OOBs, starting positions, victory conditions, etc. I would just like to say it’s pretty painless using the General Staff Wargaming System. The various editors all integrate seamlessly like Microsoft Office products (they were written in Microsoft WPF by Andy O’Neill who is a Microsoft Gold Developer).

But, the real question that this raises is: why did Lee attack on Gettysburg, Day 3? Blue (the Union) not only had interior lines, an elevated position, but they also had anchored flanks (see #22 above). MATE is running out of options at this point. If you look at the top screenshot you will see yellow numbers in yellow circles. These represent MATE’s three ‘weakest points’ in Blue’s line and it’s not much.

So why did Lee attack?

James Longstreet’s From Manassas to Appomattox states absolutely that

All that I could ask was that the policy of the campaign [Lee’s invasion of the north] should be one of defensive tactics, that we should work so as to force the enemy to attack us, in such good position as we might find in his own country, so well adapted to that purpose, – which might assure us of a grand triumph. To this he readily assented as an important and material adjunct to his general plan. [p. 331]

So, Longstreet, in his autobiography, is saying that Lee agreed that at some point in Pennsylvania, the Army of Northern Virginia would find a good solid defensive position and let Hooker (they didn’t yet know that Meade was the new commander of the Army of the Potomac) smash his army to pieces upon it. James McPherson in,  To Conquer a Peace: Lee’s Goals in the Gettysburg Campaign writes:

“In a conversation with General Isaac Trimble on June 27, when most of the Army of Northern Virginia was at Chambersburg, Pa., and when Lee believed the enemy was still south of the Potomac, he told Trimble: “When they hear where we are, they will make forced marches…probably through Frederick, broken down with hunger and hard marching, strung out on a long line and much demoralized, when they come into Pennsylvania. I shall throw an overwhelming force on their advance, crush it, follow up the success, drive one corps back on another, and by successive repulses and surprises, before they can concentrate, create a panic and virtually destroy the army.” Then “the war will be over and we shall achieve the recognition of our independence.”

The argument is that Lee, on the morning of July 3, 1863, found himself in a terrible strategic situation with very few options. It was imperative that Lee must, “destroy the [enemy] army;” nothing less than a great triumph in enemy territory would do. In Lee’s only official report of the battle of Gettysburg, written on July 31, 1863 he states:

The enemy was driven through Gettysburg with heavy loss, including about 5,000 prisoners and several pieces of artillery. He retired to a high range of hills south and east of the town. The attack was not pressed that afternoon, the enemy’s force being unknown, and it being considered advisable to await the arrival of the rest of our troops. Orders were sent back to hasten their march, and, in the meantime, every effort was made to ascertain the numbers and position of the enemy, and find the most favorable point of attack. It had not been intended to fight a general battle at such a distance from our base, unless attacked by the enemy, but, finding ourselves unexpectedly confronted by the Federal Army, it became a matter of difficulty to withdraw through the mountains with our large trains. At the same time, the country was unfavorable for collecting supplies while in the presence of the enemy’s main body, as he was enabled to restrain our foraging parties by occupying the passes of the mountains with regular and local troops. A battle thus became in a measure, unavoidable. Encouraged by the successful issue of the engagement of the first day, and in view of the valuable results that would ensue from the defeat of the army of General Meade, it was thought advisable to renew the attack. . . .

Lee was in for a penny and in for a pound. This was not the defensive battle of Longstreet’s choosing. This was now Lee desperately trying to, “throw an overwhelming force on their advance, crush it, follow up the success, drive one corps back on another, and by successive repulses and surprises, before they can concentrate, create a panic and virtually destroy the army,” but now the enemy had, “retired to a high range of hills south and east of the town.” The Union had flipped Longstreet’s strategy 180 degrees and it was they who had, “force[d] the enemy to attack [them], in such good position as [they] might find.”

I will create some other Gettysburg scenarios including ones with the Union and Confederate cavalry available. While not historical, it might make for some interesting gameplay and Human-Level AI decisions.

As always, please feel free to contact me directly with comments.

References

References
1 Isaac Trimble, Southern Historical Society Papers, Vol. 26, Richmond, Virginia: Reverend J. William Jones, D.D.,
2 Tactical Inference GenERator
3 In Computer Science lingo programs are machines that consume data / tokens