What’s Wrong With This Picture?

Computer AI representation of battle lines for Antietam, dawn September 17, 1862. The AI is locating the Schwerpunkt or place to attack. Click to enlarge.

I was looking at this screen shot I posted as an illustration in my blog post, Battle Lines, Commanders & Computers (link) and something didn’t look right. Specifically, it was the Flank markers for Stewart’s cavalry on the Confederate left flank. And, the more I looked, the more I noticed other problems: Stewart’s cavalry was captioned as being in two groups (Group 6 and Group 7). There was an extra Flank marker with the Confederate reinforcements entering the field at the bottom of the map, the Flank markers for Union Group 2 were clearly wrong, too.

This began a two week long bug hunt that took me places I didn’t expect to revisit. To make a long story short – and how often have you heard that phrase but this is actually one of those few occasions when it’s true – I had to go back and look at my original computer code that I wrote in grad school and it turns out that there was a ‘worst case’ bug that just happened to pop up with the Antietam scenario.

This is what the battle lines and Flank markers should really look like (note: the map layer is turned on here and you can’t see the elevation layer like the top screen shot):

Correct battle lines and Flank markers for the battle of Antietam. Screen shot from the General Staff Sand Box AI test program. Click to enlarge.

I also discovered a logic flaw – a mental bug, if you will – in my definition of Flank units. Previously, I defined them as as the ‘maximally separated units of a MST (battle line) group’. That seems correct but if you think about it there are rare circumstances when this is not correct (think of the horseshoe lines at Gettysburg for example). I changed the definition of Flank units to: the ‘maximally separated units of a MST group with only one neighbor (i.e. they are at the end of a battle line and, therefore, have only one neighbor).

I thought I would finish this blog post with something that is truly unique: the very first computer bug:

On September 9, 1947 Grace Murray Hopper records ‘the first computer bug’ in the Harvard Mark II computer’s log book. Apparently, the moth was caught in a relay switch. And, yes, this is where the term comes from. Click to enlarge.

 

Leave a Reply