Category Archives: Army Design Module

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.

General Staff will Ship in 2022

A few of Grant’s unsuccessful attempts to take Vicksburg. Map from West Point Atlas of American Wars. Library of Congress. Click to enlarge.

Grant took Vicksburg on his sixth attempt. He first tried a direct movement, east of the Mississippi, against the city but was forced to turn back after Confederate General Van Dorn’s raid destroyed his supply base. Sherman next attempted a direct assault and failed at Champion’s Bluff. Grant then tried to cut Vicksburg off from the Mississippi by digging a great canal across the neck of a giant oxbow. Unusually low water levels in the river that year caused another failure. Grant also tried more canal digging and river clearing at Lake Providence and the Yazoo Pass without luck.

Col. Theodore Lyman, a staff officer of the Army of the Potomac, wrote of Grant, “He habitually wears an expression as if he had determined to drive his head through a brick wall, and was about to do it. I have much confidence in him.”

Grant finally succeeded with his brilliant amphibious landing south of Vicksburg followed by a series of ‘must win’ battles that concluded with besieging the city on May 22, 1863. Confederate General Pemberton surrendered Vicksburg on July 4, 1863.

The General Staff: Black Powder Wargaming System is comprised of four separate programs: the Army Editor, Map Editor, Scenario Editor and the actual Game Engine, itself. The first three have been done for some time (it’s what I use to produce scenarios for testing the AI). They were written in C# using Microsoft’s Windows Presentation Foundation (WPF) which is often used for creating desktop business applications. This decision made sense because the Army, Map and Scenario Editors function not unlike a suite of business applications that create and share data with a common look and feel. However, while WPF was a good development decision for the Editor programs it turned out not to be a great tool for creating the Game Engine.

A flow chart of the General Staff: Black Powder Wargaming System. Files created in the Army Editor and the Map Editor are combined in the Scenario Editor to create a scenario or simulation. Click to enlarge.

What the Game Engine does is it takes data created in the three Editor programs, displays them in a visually exciting way, enables the user to make input (orders), and simulates those orders (as well as the AI’s orders) and the resulting combat to the highest degree of accuracy possible. That sounds like a lot, but it really isn’t. And the heavy lifting that the Game Engine is being asked to do is all visual: making everything look good on the screen.

Recently, I’ve been looking at Grand Tactician: Civil War which is an immersive voyage into 19th century American typography, cartography, tactics and grand strategy. I eagerly look forward to having the time to do more than gaze upon it in amazement 1)Full disclosure, the developers were kind enough to give me a review copy of Grand Tactician and, damn, it looks fantastic.. I reached out to Ilja on their development team and he convinced me that we should complete the General Staff Game Engine in Unity (which is what they used for Grand Tactician). What they accomplished visually with Grand Tactician was precisely the look and feel that I wanted for General Staff 2)I’m talking about the typography and the UI, not thousands of tiny 3D soldiers on the battlefield; which look really great, but, General Staff is not that kind of a wargame..

Consequently, we are officially announcing that we are abandoning writing the General Staff: Black Powder Game Engine in WPF and, instead, will be creating it using the Unity engine. We believe that this will produce a far superior visual experience 3)Please note: we will not being using Unity to create a 3D simulation with tiny soldiers. I like playing those kind of games, but that’s not what General Staff is..

Because Unity is designed to facilitate the creation of computer games, this move will greatly accelerate the completion of the General Staff Game Engine and will allow us to ship General Staff: Black Powder this year.

I am certainly not U. S. Grant, though I like to think I have some of that bulldog determination. Like Grant before Vicksburg, I’ve had to acknowledge that our first attempt will not succeed and we’re moving on to another plan. I am sorry for the delay in the release of General Staff and am confident that, with Unity, we will soon be reporting some good news.

I am also very excited to announce that my good friend, Damien, will be joining the team to specifically work in Unity completing the General Staff Game Engine. Damien lives in Ireland and has been a devout wargamer since playing Arnhem on the ZX Spectrum. When not enjoying a Guinness or a Jamesons, he’ll be playing tabletop or computer games, whether that means pushing cardboard counters across hex boards, drawing LOS between badly painted miniatures on the tabletop, or day-long sessions in front of a computer – where he particularly enjoys playing against a challenging, non-cheating AI. Damien is a 28 year veteran of the IT industry, having worked on everything from telecoms, healthcare and financial systems, across Mainframes, Linux, Unix and Windows, and co-inventor of two messaging system patents. He has a particular passion for language processing and domain specific languages, originating from his interest in the elegance of recursive descent compiler construction.

References

References
1 Full disclosure, the developers were kind enough to give me a review copy of Grand Tactician and, damn, it looks fantastic.
2 I’m talking about the typography and the UI, not thousands of tiny 3D soldiers on the battlefield; which look really great, but, General Staff is not that kind of a wargame.
3 Please note: we will not being using Unity to create a 3D simulation with tiny soldiers. I like playing those kind of games, but that’s not what General Staff is.

I Was Wrong About George Washington

Washington Crossing the Delaware by Emmanuel Luetze. 1851. The Metropolitan Museum of Art. Click to enlarge.

I must confess that I was never much a fan of George Washington’s generalship. Having not studied American Revolution military history I thought that from 1776-1781 the British chased Washington and his sad excuse for an army up and down the eastern seaboard of what was to become the United States until the French Comte de Grasse defeated the British naval forces at the Battle of the Chesapeake and the Comte de Rochambeau at the head of a French army surrounded, besieged and eventually captured, Cornwallis at Yorktown.

To make matters worse, years ago I stumbled upon George Washington’s Expense Account which is, frankly, brutal. Washington turned down the magnanimous salary of $500 a month for being Commander in Chief of the Continental Army famously saying,

“As to pay, Sir, I beg leave to Assure the Congress that as no pecuniary consideration could have temped me to have accepted this Arduous employment (at the expense of my domesttic [sic] ease and happiness) I do not wish to make any Proffit [sic] from it. I will keep an exact Account of my expences. Those I doubt not they will discharge, and that is all I desire.” 1)George Washington’s Expense Account, Washington, George & Kitman, Marvin, page 15

If Washington had accepted the salary he would have been paid $48,000 for five years’ service. Instead, his ‘expences’ came to $449,261.51! This book – and it contains a photocopy of every page of Washington’s Expense Account in fine copperplate handwriting along with a humorous explanation of the expense – is damning. Washington’s very first entry for June, 1775 was for $6,214 (over an entire year’s salary at $500 per month) for “…the purchase of five Horses… to equip me for my journey to the Army at Cambridge – & for the Service I was Then going upon  – having sent my Chariot and Horses back to Virginia.” There are also numerous expenses for cases of the finest wines and plenty of food while at Valley Forge. Not surprisingly, when Washington offered Congress the same terms when he was elected president (no salary just expenses) Congress insisted that he take $25,000 a year; no expenses paid.

Like most Americans, what little knowledge I had of the battle of Trenton can be summed up in Luetze’s famous painting, above: Washington, posed heroically, crossed the Delaware River on Christmas Eve and surprised a garrison of drunken Hessian mercenaries at Trenton capturing them all without a shot. In reality, not much of that is true. Yes, Washington did attack Trenton but it was on the morning of December 26, 1776, and the Hessians weren’t drunk; they fought bravely and their commander, Col. Johann Gottlieb Rall, died leading them.

Then I discovered (from reading David Hackett Fischer’s Pulitzer Prize-winning Washington’s Crossing) that the amazing part of the story wasn’t the battle of Trenton (which really was an extraordinary tale of a small, poorly-equipped, non-professional army making an audacious amphibious crossing of an ice-choked river) but the campaign that followed the victory from December 30, 1776 to January 3, 1777.

The strategic situation in the Princeton / Trenton area, December 29, 1776. Screen shot from the General Staff Scenario Editor. Click to enlarge.

Washington’s forces had made it safely back across the Delaware River after the Trenton raid but he now faced a difficult decision: terms of enlistment were running out for many units in his army and he feared taking the field again in bitter cold with a diminished force. As always, Washington held a council of war. As the senior commanders of the army advised caution a courier arrived informing them that Brigadier General John Cadwalader with his Pennsylvania militia had already crossed the Delaware and was at Crosswicks itching for a fight with the British (this is the blue force at the bottom of the map, above). After more discussion, one group stated, “tho’ they would not have advised the Movement, yet it being done it ought to be supported.”2)Washington’s Crossing, David Hackett Fischer page 266. Eventually, with Washington’s urging, the council voted to support Cadwalader, recross the Delaware and, again, defeat the British in the field.

This was a bold strategy; a defeat of the Continental Army with its back to a river would probably spell the end of the revolution. Washington’s plan was to assemble his forces east of Trenton, in a strong defensive position on ‘good ground’ behind the Assunpink Creek and lure Cornwallis, who was commanding the British and Hessian forces, to attack. This Cornwallis did and was soundly defeated. Washington now moved decisively, sending his forces to capture Prince Town (Princeton) to the north. At the crucial moment in this battle Washington rallied the routed Pennsylvania forces saying, ” ‘Parade with us, my brave fellows! There is but a handful of the enemy, and we will have them directly.’ Washington [then] led his men straight into the center of the battle, within thirty paces of the British line. He was mounted on a white horse, an easy mark for any British soldier.”3)Ibid. page 334

Frankly, I cannot comprehend such bravery. The attack, of course, was a success and the Americans captured Princeton and, perhaps more importantly, demonstrated that their volunteer army would fight, could fight and could win. Washington showed superb strategic and tactical vision throughout these ten crucial days4)See https://tencrucialdays.org/wp-content/uploads/2019/09/eb14b5212fb62dfea8d100f3efd1950f.pdf  for a wonderful series of maps that cover this campaign as well as extraordinary personal courage.

I was wrong about George. Washington.

References

References
1 George Washington’s Expense Account, Washington, George & Kitman, Marvin, page 15
2 Washington’s Crossing, David Hackett Fischer page 266
3 Ibid. page 334
4 See https://tencrucialdays.org/wp-content/uploads/2019/09/eb14b5212fb62dfea8d100f3efd1950f.pdf  for a wonderful series of maps that cover this campaign

The State of the Game

Grant’s Overland campaign that began at the Wilderness and ended at Petersburg. It can be argued that Grant did not win one battle but, clearly, achieved a great strategic victory. This was the beginning of the end for Lee’s Army of Northern Virginia and the beginning of the end of the American Civil War. Map by Hal Jespersen (www.posix.com/CW), found on Wikipedia. Click to enlarge.

I had just sat down to write this blog when a derecho,1)Ironically, the first person to use the Spanish word “derecho” to describe this type of storm was Gustavus D. Hinrichs, a German immigrant who settled in my hometown of Davenport in 1861. with wind speeds that peaked at 117 mph, flattened much of Iowa and dropped a hundred year old maple tree on my ’98 mustang. We also lost power and internet for a week. I spent much of that time reading old favorites including Horace Porter’s Campaigning with Grant. Porter, who served on Grant’s staff during 1864-5, provides a first person account of many extraordinary events from the start of the Overland Campaign to Lee’s surrender at Appomattox. Admittedly, the 19th century prose does get a bit flowery at times, but the he was actually there when it happened aspect of this memoir makes it invaluable.

I was struck by this passage from the beginning of the campaign and how it felt like what I wanted to write about to explain where we are on completing General Staff:

“[Grant] said,… “The only time I ever feel impatient is when I give an order for an important movement of troops in the presence of the enemy, and am waiting for them to reach their destination. Then the minutes seem like hours.” – Campaigning with Grant

At this point Grant was now General in Chief, commander of all U. S. armies including the Army of the Potomac. Orders had been issued and every U. S. army was to be on the march at this very moment and there was nothing more that Grant could do. Grant was confident that his plan would ultimately be successful. If we look at the map of the Overland campaign (above) we see that Grant wanted to fight Lee in the open. If that was not possible he would move by his left and Lee would have to respond. Eventually, Lee would be forced to entrench around Richmond and Petersburg and Grant would trap him. It was like a chess master looking sixteen plies ahead: there was nothing Lee could do, his defeat was inevitable.

There are two programmers coding General StaffAndy O’Neill is working on the actual game from my design documents and me (I’m working on AI).  Andy specializes in Microsoft Windows Presentation Foundation (WPF) development of business applications. General Staff is a wargaming system that utilizes multiple interlocking programs (like Microsoft Office) so it is logical to use Microsoft WPF for development. Andy is literally a  Microsoft gold medal developer. Andy also specializes in the Model-View-View Model (MVVM) development technique. This is a method commonly used in Microsoft business applications.  Despite repeated efforts to learn MVVM I confess that I am just an old coder, set in my ways, and I can’t get it. While Andy and I both write in the C# programming language, it’s best if I do not muck about with Andy’s code. What I do is write AI routines in C# and Andy imports them into his code.

In early July or late June Andy, who lives and works in Liverpool, England, fell very ill with an undefined infection. He became very dizzy and nauseous and was unable to write any code for over a month. Andy reports that he is now, “sort of…nearly…better.”

And this is why I felt like Grant on May 2, 1865: there wasn’t anything I can do to move the game forward. I’m working on the AI Engine and researching battles, maps and OOBs but that’s it. And then we lost power and the internet for a week.

My wife says that when I can’t work I get, “very testy.” Grant, however, outwardly was imperturbed. This is how Porter describes him this day:

General Grant Whittling Again – Civil War Reenactor Kenneth Serfass portraying Lt. General Ulysses S. Grant whittling at the site of Grant’s headquarters knoll at the Battle of the Wilderness. 150th Anniversary of the Battle of the Wilderness, 1864-2014

“… most of the day he sat upon the stump of a tree, or on the ground, with his back leaning against a tree. The thread gloves2)It is assumed that Mrs. Grant gave him the gloves. Grant wore them out whittling and never wore them again. remained on his hands, a lighted cigar was in his mouth almost constantly, and his penknife was kept in active use whittling sticks. He would pick up one small twig after another, and sometimes holding the small end away from him would rapidly shave it down to a point, at other times he would turn the point toward him and work on it as if sharpening a lead-pencil, then he would girdle it, cut it in two, throw it away, and begin on another.” – Campaigning with Grant

So, in summation, almost nothing has been done in the last six weeks to move development of the actual game (what we call the Game Engine application) forward. For this I can only sincerely apologize and repeat what you know: there’s only two of us coding it and when the lead coder falls ill everything stops.

What’s Going on with the Scenario Editor?

There are three stand alone programs that create data files used by the General Staff Game Engine: The Army Editor, the Map Editor and the Scenario Editor. The first two have long been available to early backers. What’s holding up the release of the Scenario Editor?

The Scenario Editor is actually done, and has been completed for some time. I use it to create the scenarios that you’ve seen and that I use to test the AI:

Screen shot of Antietam with battle groups, range of influence and objectives displayed. Click to enlarge.

So, why haven’t we released it? Because as we (that is to say, Andy) works on the Game Engine we discover that we need to make changes in the data files. For example, I left out the time it takes for a unit to change formations. To correct this, we need to add that value to the scenario data files and that, in turn, means a change to the Scenario Editor, itself. And, even worse, it means that previously created scenario files are no longer compatible and have to be redone. Andy, specifically, said he didn’t want to make the Scenario Editor available to early backers for this very reason: you could lose your earlier work.

So, in conclusion, again please allow me to apologize for these delays. There will inevitably be more delays before General Staff is completed. But, like Grant at the beginning of the Overland campaign, I am supremely confident in our inevitable success. Grant famously said at this time, “I propose to fight it out on this line if it takes all summer.”  It actually took all summer, fall, winter and next spring before Lee surrendered. But the ultimate success of the campaign was never in doubt.

And, as always, please feel free to email me directly at Ezra [at] RiverviewAI.com.

References

References
1 Ironically, the first person to use the Spanish word “derecho” to describe this type of storm was Gustavus D. Hinrichs, a German immigrant who settled in my hometown of Davenport in 1861.
2 It is assumed that Mrs. Grant gave him the gloves. Grant wore them out whittling and never wore them again.