Follow Progress with the Changelog

A typical screen shot posted in the Changelog. Click to enlarge.

One of the many techniques that Andy O’Neill has brought to the General Staff project is the Changelog. A Changelog is, “a log or record of all notable changes made to a project,” and is common in developing business applications. Currently, it is over 23 pages of screen shots, updates and commentary.

The General Staff Changelog is here: http://grogheads.com/forums/index.php?topic=21270.0


You can subscribe to updates in the Changelog and also make comments or report bugs that you have found. If you’re reading this, you’re probably a beta-tester.

I will continue to post updates here at this site. But, if you want more frequent – and often more technical – updates I would suggest subscribing to the Changelog.  You can do this by registering on the GrogHeads forum and clicking on the ‘Notify’ button.

 

Movement & Maps

Screen shot showing unit movement arrows for the battle of Antietam scenario. Note how movement is stopped by the small creek in the upper left hand corner of the screen. Click to enlarge.

I‘m in self-quarantine. As many of you know, I had a bone marrow / stem cell transplant in 2014 followed by a year of intense chemo. I’m fine (all things considering) but my immune system took a beating. In 2014 H1N1 put me in the hospital for 3 days so I’m taking COVID-19 seriously as, uh, the plague. In a way, being cooped up in the house (the weather hasn’t been cooperating, either, as I had hoped to replace my daily gym workout with long walks with my dog, George) is a lot like a typical upper Midwestern winter: it’s what I call ‘good programming weather’. There’s not much else to do but hunker down and write code. So, obviously, I’m working on General Staff and I wanted to show you an update (above).

General Staff is being written in C# and Windows Programming Foundation (WPF). There are a number of technical reasons why this was a good idea but I’m not overly familiar with WPF and doing some basic things, like creating these transparent movement arrows, took far longer, and involved a lot more programming, than I thought it would.  My partner on this project, Andy O’Neill, is a WPF rockstar; I’m a novice. I would much rather be working on the ‘under the hood’ stuff (like AI) but for the last week or so I’ve been working on movement arrows while Andy is busy with another project (the kind that pays the rent). Anyway, I’m very pleased about how they turned out. Please feel free to write me with comments.

Movement arrows for units at Quatre Bras. Note how blue units are stopped by the stream feeding the large pond. Click to enlarge.

Forward movement of this blue division is stopped by this tiny creek.

But, I also discovered a very interesting problem while testing these movement routines: our maps are too good! If you look at this detail (right) from the Antietam screen capture (above), you’ll see that movement is stopped when it encounters a tiny creek. I’ve walked that area of the Antietam battlefield and that little creek (well, I think it would be more properly called a ‘crick’) wouldn’t stop a division moving forward. However, the movement validation routines stop units from crossing bodies of water (except in column formation while crossing a bridge or a ford).  Ed Kuhrt, who digitized these great maps and copied every small detail was, perhaps, too precise. Definitely better to err on the side of being too precise when it comes to maps, Ed.

We’re seeing the same thing at Quatre Bras (above): the little streams that feed Materne Pond (Etang Materne) are also stopping the French from attacking. I haven’t been to Quatre Bras but I know the French crossed the small streams to attack the Anglo-Allied army’s positions.

Luckily, fixing this is easy. If you have done any work with the General Staff Map Editor you know that erasing terrain features, like water, is quick.

Removing the water in the little stream that feeds Antietam Creek by placing a ‘field’ over the water. Note that the ‘Field’ object is ‘above’ the ‘River’ object on the left Edit Terrain tab. Screen shot. Click to enlarge.

In the above screen shot we’ve opened the Antietam map in the General Staff Map Editor and drawn a ‘Field’ over the ‘crick’ that kept the Union forces from advancing. Note that both the Field and the River are objects and whichever object is higher in the list on the left ‘overwrites’ lower objects. If, for whatever reason, we wanted to restore the water in the creek we could either delete the Field or move it lower down the list than the River object.

Edit: After originally posting this, some readers (see comments, below) suggested that units crossing a small stream should suffer a movement penalty. This is absolutely correct. Instead of ‘painting’ with ‘field’ terrain, I should have used ‘mud’. This allows for a movement penalty (set in the Scenario Editor).

Adjusting unit type speeds across various terrain types in the General Staff Scenario Editor. Screen capture.

And now that that obstacle to movement has been eliminated the I and XII Union Corps can advance:

Now that the water has been removed from the little stream feeding Antietam Creek the Union forces can advance again. Screen shot.

As always, I would love to hear any comments or feedback that you may have.

Introducing a New Generation to Wargames

My childhood friend, Carl Hoffman, introduced me to Avalon Hill wargames. Carl is now a history teacher.

It was my good friend, Carl Hoffman, who lived across the street when I was about 10, who introduced me to Avalon Hill (AH) wargames. The AH wargames of the 1960s were perfectly suited to spark a kid’s imagination. The rules were easy to understand (four pages, big type, with illustrations explaining movement and combat), the Combat Results Table (CRT) was straightforward (and taught us to calculate ratios, too), and we could refight Gettysburg or Waterloo on a rainy afternoon. We learned history (Carl became a history teacher) and problem solving (I became a computer scientist). I’m sure many of us had similar experiences forty or fifty years ago.

For a long time I’ve felt that there is a need for similar ‘introductory wargames’ to engage the next generation of grognards and wargamers. While the hardcore aficionados want more complex and detailed games I’ve also understood that we needed simple, introductory games, to entice a new generation.  From the beginning, I have always had a simpler wargame embedded inside of General Staff. Specifically, if we remove all the layers of historical simulation, what remains is a simple introductory wargame.

The Layers of Historical Simulation in General Staff

Each layer of historical simulation can be turned on or off when playing a General Staff scenario. The more options you add, the more historically accurate the simulation becomes. The options are:

  1. Unit strength
    1. Unit strength is a value from 1 – 4 with units being reduced in steps.
    2. Unit strength is the actual historic number of troops and every individual casualty is tracked.
  2. Combat resolution
    1. Simple Combat Resolution Table like the old AH CRT.
    2. Complex Combat Resolution Equation taking into effect morale, experience, leadership, terrain, and elevation.
  3. Moving units
    1. Units are moved directly by the player.
    2. Orders to move units are issued down a chain of command from the top HQ to the subordinate HQ via couriers and the rapidity with which the orders are executed depends on the Leadership Value of the subordinate HQ and subordinate units.
  4. Fog of War (FoW)
    1. No Fog of War. The entire map is visible and all units (friend and foe) are displayed on it.
    2. Partial FoW. The entire map is displayed and the sum of what all friendly units can see is displayed.
    3. Complete FoW. You see only what the commander can see from his HQ and nothing else. All unit positions not directly observable are updated via couriers and are frequently no longer accurate by the time the courier arrives.

So, at it’s most complex (let’s call this a Historical Accuracy level of 100%) this is what the player commanding the Army of the Potomac (Blue) would see (what General George McClellan could actually see through his telescope on the lawn of the Pry House on the morning of September 17, 1862):

Antietam from the perspective of General George B. McClellan at the Pry House on the east bank of the Antietam Creek. This is complete Fog of War and the highest level of historical accuracy. Screen shot. Click to enlarge.

And, interestingly, this view of what McClellan could see is confirmed in The U. S. Army War College Guide to the Battle of Antietam and The Maryland Campaign of 1862 edited by Jay Luvaas and Harold W. Nelson.”General McClellan and his headquarters staff observed the battle from the lawn of the Pry House… Through a telescope mounted on stakes he enjoyed a panorama view of the fighting… He could see Richardson’s division break through the Confederate position at the Bloody Lane. He could not, however, follow the movements of the First and the Twelfth Corps once they disappeared into the East Woods, which masked the fight for the Cornfield, nor did he witness the attempts to seize Burnside’s bridge to the south because  the view from the Pry House was blocked by trees and high ground.” – p. 119.

So, the above is the 100% historically accurate view of the battle of Antietam from McClellan’s Headquarters. This is the ‘introductory’ view:

Antietam in ‘Introductory’ mode. Note that unit strengths are represented by one to four icons. Also note the lack of HQs. Screen shot. Click to enlarge.

I first saw the concept of ‘unit steps’ in Jim Dunnigan’s Avalon Hill classic, 1914 and I’m shamelessly using it here. I very much like the simplicity of this system: as units take casualties, they are reduced, in steps, from four icons, to three, to two, etc. I also very much like the idea that this is not an abstraction of the battle of Antietam (or Little Bighorn, or Quate Bras, etc.) but the actual units in their actual locations. This fulfills my requirements for an introductory wargame: historic, teaches tactics and problem solving, easy to play, simple rules, quick to learn and quick to play (I would think a game could easily be played in less than an hour).

Here are some more General Staff scenarios in ‘introductory mode’:

1st Bull Run, 11:30 hours, ‘introductory’ mode. Screen shot. Click to enlarge.

Little Bighorn in ‘introductory’ mode. Screen capture. Click to enlarge.

Quatre Bras in ‘introductory’ mode. Screen capture. Click to enlarge.

I could use your help! Announcing a ‘name the mode’ contest!

From ‘The American Kriegsspiel. Clicking on this image will take you to the Grogheads.com article on William Livermore’s American Kriegsspiel.

I originally called ‘introductory’ mode, ‘Kriegsspiel’ mode because I was reminded of the maps and blocks that Kriegsspiel uses. However, I pretty quickly received some emails from the Kriegsspiel community complaining – and rightfully so – that Kriegsspiel isn’t an introductory game. Absolutely! And if you’ve ever taken a look at the original rule books and tables you would agree, too.

So, here’s my problem (and how YOU can help): I need a new phrase to replace ‘Kriegsspiel mode’. I’ve been using ‘Introductory mode’ but I just don’t like it. I really need a new name for this version. I’m open to any suggestions. How about a completely made up word? ‘Stratego’ would be great if it hadn’t already been used. So, I’m announcing a contest to ‘name this mode’. The winner will receive 2 General Staff coffee mugs. Please email me ([email protected]) with you suggestions. Thank you for your help!

Feeding the Machine

The famous Turing Machine1)It was first described in Turing’s, “On Computing Machines with an Application to the Entscheidungsproblem,” in 1937 which can be downloaded here: https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf. Also a very good book on the subject is Charles Petzold’s, “The Annotated Turing: A Guided Tour through Alan Turing’s Historic Paper on Computability and the Turing Machine.” was a thought experiment and, until recently did not physically exist 2)Yes, somebody has built one and you can see what Turing described here: https://www.youtube.com/watch?v=E3keLeMwfHY . When computer scientists talk about machines we don’t mean the, “lumps of silicon that we use to heat our offices,” (thanks Mike Morton for this wonderful quote), but, rather, we mean the software programs that actually do the computing. When we talk about Machine Learning we don’t think that the physical hardware actually learns anything. This is because, as Alan Turing demonstrated in the above paper, the software functions as a virtual machine; albeit, much more efficiently than creating a contraption with pens, gears, rotors and an infinitely long paper strip.

When I talk about, “feeding the machine,” I mean giving the program (the AI for General Staff is called MATE: Machine Analysis of Tactical Environments and the initial research was funded by DARPA) more data to learn from. Yesterday, the subject at machine learning school was Quatre Bras.

Screen shot of the General Staff AI Editor after analysis of Quatre Bras and calculating the flanking Schwerpunkt or point of attack (blue square).  Click to enlarge.

The MATE tactical AI algorithms produce a plan of attack around a geographic point on the battlefield that has been calculated and tagged as the Schwerpunkt, or point where maximum effort is to be applied. In the above (Quatre Bras) scenario the point of attack is the extreme left flank of the Anglo-Allied (Red) army. I apply the ‘reasonableness test’ 3)Thank you Dennis Beranek for introducing me to the concept of ‘reasonableness test’. See https://www.general-staff.com/schwerpunkt/ for explanation and think, “Yes, this looks like a very reasonable plan of attack – a flanking maneuver on the opponent’s unanchored left flank – and, in fact, is a better plan than what Marhshal Ney actually executed.

It would be good at this point to step back and talk about the differences in ‘supervised’ and ‘unsupervised’ machine learning and how they work.

Supervised machine learning employs training methods. A classic example of supervised learning is the Netflix (or any other TV app’s) movie recommendations. You’re the trainer. Every time you pick a movie you train the system to your likes and dislikes. I don’t know if Netflix’s, or any of the others, use a weighting for how long (what percentage watched over total length of show) watched but that would be a good metric to add in, too. Anyway, that’s how those suggestions get flashed up on the screen: “Because you watched Das Boot you’ll love The Sound of Music!”  Well, yeah, they both got swastikas in them, so… 4)Part of the problem with Netflix’s system is that they hire out of work scriptwriters to tag each movie with a number of descriptive phrases. Correctly categorizing movies is more complex than this.

Supervised machine learning uses templates and reinforcement. The more the user picks this thing the more the user gets this thing. MATE is unsupervised machine learning. It doesn’t care how often a user does something, it cares about always making an optimal decision within an environment that it can compare to previously observed situations. Furthermore, MATE is a series of algorithms that I wrote and that I adjust after seeing how they react to new scenarios. For example, in the above Quatre Bras scenario, MATE originally suggested an attack on Red’s right-flank. This recommendation was probably influenced by the isolated Red infantry unit (1st Netherlands Brigade) in the Bois de Bossu woods.  After seeing this I added a series of hierarchical priorities with, “a flank attack in a woods (or swamp) is not as optimal as an attack on an exposed flank with clear terrain,” as a higher importance than pouncing on an isolated unit.  And so I, the designer, learn and MATE learns.

My main concern is that MATE must be able to ‘take care of itself’ out there, ‘in the wild’, and make optimal decisions when presented with previously unseen tactical situations. This is not writing an AI for a specific battle. This is a general purpose AI and it is much more difficult to write than a battle specific AI. One of the key aspects of the General Staff Wargaming System is that users can create new armies, maps and scenarios. MATE must make good decisions in unusual circumstances.

Previously, I have shown MATE’s analysis of 1st Bull Run and Antietam. Below is the battle of Little Bighorn in the General Staff AI Editor:

The battle of Little Bighorn in the General Staff AI Editor. Normally the MATE AI would decline to attack. However, when ordered to attack, this is MATE’s optimal plan. Click to enlarge.

I would like to expose MATE to at least thirty different tactical situations before releasing the General Staff Wargame. This is a slow process. Thanks to Glenn Frank Drover of Forbidden Games, Inc. for donating the superb Quatre Bras map. He also gave us maps for Ligny and Waterloo which will be the next two scenarios submitted to MATE. We still have a way to go to get up to thirty. If anybody is interested in helping to create more scenarios please contact me directly.

References

References
1 It was first described in Turing’s, “On Computing Machines with an Application to the Entscheidungsproblem,” in 1937 which can be downloaded here: https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf. Also a very good book on the subject is Charles Petzold’s, “The Annotated Turing: A Guided Tour through Alan Turing’s Historic Paper on Computability and the Turing Machine.”
2 Yes, somebody has built one and you can see what Turing described here: https://www.youtube.com/watch?v=E3keLeMwfHY
3 Thank you Dennis Beranek for introducing me to the concept of ‘reasonableness test’. See https://www.general-staff.com/schwerpunkt/ for explanation
4 Part of the problem with Netflix’s system is that they hire out of work scriptwriters to tag each movie with a number of descriptive phrases. Correctly categorizing movies is more complex than this.