Category Archives: Game Design

Maps, Commanders & Computers

How a map of the battle of Antietam looks to us humans. Screen shot from the General Staff Map Editor. Click to enlarge.

How the computer sees the same map (terrain and elevation). This is actually a screen shot from the Map Editor with the ‘terrain’ and ‘elevation’ layers turned on. Click to enlarge.

Computer vision is the term that we use to describe the process by which a computer ‘sees'1)When describing various AI processes I often use words like ‘see,’ ‘understand,’ and ‘know’ but this should not be taken literally. The last thing I want to do is to get in to a philosophic discussion on computers being sentient. the world in which it operates. Many companies are spending vast sums of money developing driverless or self-driving cars. However, these AI controlled cars have had a number of accidents including four that have resulted in human fatalities.2)https://en.wikipedia.org/wiki/List_of_self-driving_car_fatalities The problem with these systems is not in the AI – anybody who has played a game with simulated traffic (LA Noir, Grand Theft Auto, etc.) knows that. Instead, the problem is with the ‘computer vision’; the system that describes the ‘world view’ in which the AI operates. In one fatality, for example, the computer vision failed to distinguish a white semi tractor trailer from the sky.3)https://www.theguardian.com/technology/2016/jun/30/tesla-autopilot-death-self-driving-car-elon-musk Consequently, the AI did not ‘know’ there was a semi directly in front of it.

In my doctoral research I created a system by which a program could ‘read’ and ‘understand’ a battlefield map4)TIGER: An Unsupervised Machine Learning Tactical Inference Generator http://www.riverviewai.com/download/SidranThesis.html. This is the system that we use in General Staff.

The two images, above, show the difference in how a human commander and a computer ‘see’ the same battlefield. In the top image the woods, the hills and the roads are all obvious to us humans.

The bottom, or ‘computer vision’ image, is a bit of a cheat because this is how the computer information is visually displayed to the human designer in the General Staff Map Editor. The bottom image is created from four map layers (any of which can be displayed or turned off):

The four layers that make up a General Staff map.

The background image layer in a General Staff map is the beautiful artwork shown in the top image. The place names and Victory Points layer are also displayed in the top image. The terrain and elevation layers are described below:

The next three images are actual visual representations of the contents of memory where these terrain values are stored (this is built in to the General Staff Map Editor as a debugging tool):

Screen shot from the Map Editor showing just terrain labeled as ‘water’. Click to enlarge

Screen shot from the General Staff Map Editor showing the terrain labeled as ‘woods’. Click to enlarge.

Screen shot from the General Staff Map Editor showing the terrain labeled ‘road’. Click to enlarge.

A heightmap for Antietam. This is a visual representation of elevation in meters (darker = lower, lighter = higher). Click to enlarge.

To computers, an image is a two-dimensional array; like a giant tic-tac-toe or chess board. Every square (or cell) in that board contains a value called the RGB (Red, Green, Blue5)Except in France where it’s RVB for Rouge, Vert, Bleu  ) value. Colors are described by their RGB value (white, for example, is 255,255,255).  If you find this interesting, here is a link to an interactive RGB chart. General Staff uses a similar system except instead of the RGB system each cell contains a value that represents various terrain types (road, forest, swamp, etc.) and another, identical, two-dimensional array, contains values that represent the elevation in meters. To make matters just a little bit more confusing, computer arrays are actually not two-dimensional (or three-dimensional or n-dimensional) but rather a contiguous block of memory addresses. So, the terrain and elevation arrays in General Staff which appear to be two-dimensional arrays of 1155 x 805 cells are actually just 929,775 bytes long hunks of contiguous memory. To put things in perspective, just those two arrays consume more RAM than was available for everything in the original computer systems (Apple //e, Apple IIGS, Atari ST, MS DOS, Macintosh and Amiga) that I originally wrote UMS for.

So, not surprisingly, a computer stores its map of the world in which it operates as a series of numbers 6)Yes, at the lowest level the numbers are just 1s and 0s but we’ll cover that before the midterm exams. that represent terrain and elevation. But, how does a human commander read a map? I posed this question to Ben Davis, a neuroscientist and wargamer, and he suggested looking at a couple of studies. In one article7)https://www.citylab.com/design/2014/11/how-to-make-a-better-map-according-to-science/382898/, Amy Lobben, head of the Department of Geography at the University of Oregon, said, “…some people process spatial information egocentrically, meaning they understand their environment as it relates to them from a given perspective. Others navigate more allocentrically, meaning they look at how other objects in the environment relate to each other, regardless of their perspective. These preferences are linked to different regions of the brain.” Another8)https://www.researchgate.net/publication/251187268_USING_fMRI_IN_CARTOGRAPHIC_RESEARCH reports the results of fMRI scans while, “subjects perform[ed] navigational map tasks on a computer and again while they were being scanned in a magnetic resonance imaging machine.” to identify specific, “involvement or non-involvement of the brain area.. doing the task.”

So, how computers and human commanders read and process maps is quite different. But, at the end of the day, computers are just manipulating numbers following a series of algorithms. I have written extensively about the algorithms that I have developed including:

  • “Algorithms for Generating Attribute Values for the Classification of Tactical Situations.”
  • “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.”
  • “Good Decisions Under Fire: Human-Level Strategic and Tactical Artificial Intelligence in Real-World Three-Dimensional Environments.”
  • “Current Methods to Create Human-Level Artificial Intelligence in Computer Simulations and Wargames”
  • Human Level Artificial Intelligence for Computer Simulations and Wargames.
  • An Analysis of Dimdal’s (ex-Jonsson’s) ‘An Optimal Pathfinder for Vehicles in Real-World Terrain Maps’

These papers, and others, can be freely downloaded from my web site here.

As always, please feel free to contact me directly if you have any questions or comments.

References   [ + ]

1. When describing various AI processes I often use words like ‘see,’ ‘understand,’ and ‘know’ but this should not be taken literally. The last thing I want to do is to get in to a philosophic discussion on computers being sentient.
2. https://en.wikipedia.org/wiki/List_of_self-driving_car_fatalities
3. https://www.theguardian.com/technology/2016/jun/30/tesla-autopilot-death-self-driving-car-elon-musk
4. TIGER: An Unsupervised Machine Learning Tactical Inference Generator http://www.riverviewai.com/download/SidranThesis.html
5. Except in France where it’s RVB for Rouge, Vert, Bleu
6. Yes, at the lowest level the numbers are just 1s and 0s but we’ll cover that before the midterm exams.
7. https://www.citylab.com/design/2014/11/how-to-make-a-better-map-according-to-science/382898/
8. https://www.researchgate.net/publication/251187268_USING_fMRI_IN_CARTOGRAPHIC_RESEARCH

How Will You Play General Staff?

Every wargame that I’ve designed allows the user to adjust important variables such as leadership and morale and how they affect combat. Usually included is the ability to design your own armies, maps and scenarios as well. However, with the General Staff Wargaming System we’ve added a new feature: the ability to control the realism level before playing a scenario.

The General Staff Wargame has two basic levels of play:

Simulation mode uses HQ units and a chain of command that passes orders down from the General HQ to the sub-commander to the individual unit. How fast the unit responds to the orders are affected by the distance that the courier must travel and the Leadership Value of the HQs.  Simulation mode also employs a more detailed combat resolution model and tracks the actual number of troops in every unit.

An example of Simulation Mode: the path (red line) and time (16 minutes) it will take for a courier to travel from JEB Stuart’s HQ to Munford’s cavalry with orders. Click to enlarge.

Kriegsspiel mode does not have HQ units and friendly units are moved directly and immediately (no transmission of orders via couriers). The combat resolution model is simpler and units have a value of 1-4 displayed by the number of unit icons on the map.

Antietam in Kriegsspiel mode. Notice that there are no HQ units (so no couriers to deliver orders) and units are represented by 1-4 icons. Units in column have a ‘tail’ that indicates the unit strength. Click to enlarge.

In addition to the two game modes (Simulation and Kriegsspiel) there are three Scenario Options:

Order of Battle (OOB) displayed / not displayed. Enemy units with known positions appear dark; enemy units ‘on the map’ but with unknown locations appear grayed out. This, of course, gives the user complete knowledge of the enemy’s OOB and, more importantly, knows when units from certain formations are not directly observable.

A mock up of how the Order of Battle option will appear (note this image was created from screen captures of the Scenario Editor and the Sand Box). Click to enlarge

Only friendly units directly observed by the General HQ are displayed. All other friendly units fade at their last known location. Couriers bring in unit location updates, but they are outdated by the time they arrive.

Only enemy units directly observed by the General HQ are displayed. All other enemy units fade at their last known location. Couriers bring in unit location updates, but they are outdated by the time they arrive.

If both of these above options are selected (only friendly and enemy units that are directly observable by your commanding General HQ) you will be simulating the Fog of War that field commanders of the age of gunpowder experienced.

What General George B. McClellan could actually see at Antietam. Screen shot (General Staff Sand Box). Click to enlarge.

We would like to hear from you and get your opinion on what realism features you will use in General Staff:

“What Ifs” at Little Bighorn

I‘m used to learning a lot when researching a battle but nothing prepared me for the ‘what ifs’ of Little Bighorn. My doctorate is in computer science but I have been an American Civil War buff since I was about five years old. I’m very familiar with brevet Major General George Armstrong Custer’s achievements during the Appomattox campaign where he commanded a division that smashed Pickett’s right flank at Five Forks. I knew that after the war Custer returned to his previous  rank in the U. S. Army of Lt. Colonel, that he fell under a cloud with U. S. Grant, was stripped of his command, and had to beg for it back from President Grant, himself, at the White House.

Brevet Major General George Armstrong Custer taken May 1865. Credit: Civil war photographs, 1861-1865, Library of Congress, Prints and Photographs Division.  Click to enlarge.

And, of course, I knew of the debacle at the Little Bighorn.

After I wrote UMS, the first computer wargame construction system, users began to send me Little Bighorn scenarios that included Gatling guns. I assumed that these were science fiction ‘what if’ scenarios. such as a story I read back in the ’60s about what if Civil War units had automatic weapons from the future. But, recently, while reading Stephen Ambrose’s Crazy Horse and Custer I learned that General Alfred Terry, Custer’s superior and the commander of the expedition, had indeed offered Custer not just three Gatling Guns (manned by troops from the 20th Infantry 1)The Guns Custer Left Behind; Historynet
https://www.historynet.com/guns-custer-left-behind-burden.htm
) but four extra troops from the 2nd U. S. Cavalry.  Custer turned down Terry’s offer of reinforcements and more firepower with these infamous words:

“The Seventh can handle anything it meets.” – Custer to Terry

Photo taken by F. Jay Haynes of one of the Gatling guns that were available to the 7th Cavalry. Click to enlarge.

Screen capture of the Order of Battle of the 7th US Cavalry with the addition of 3 Gatling guns and 4 companies of the 2nd US Cavalry. Click to enlarge.

As for the battle of Little Bighorn, itself, I didn’t know much more than the broad outline that Custer and his command were killed to the last man by an overwhelming number of Native American warriors (this, of course, wasn’t correct as members of Reno’s and Benteen’s columns survived). Custer, himself, was the text book image of hubris and became the butt of late night comedians and humorous pop songs. But the reality turned out to be much more complex and nuanced.

Custer had a reputation of being dashing, headstrong, and gallant; the iconic description of a cavalry commander. The traditional narrative of the disastrous battle of Little Bighorn is that Custer impulsively attacked a vastly superior enemy force; possibly propelled by a belief that Native American warriors were no match for organized cavalry armed with 45-70 trap door carbines. Indeed, Napoleon’s maxim was that, “twenty or more European soldiers armed with the best weapons could take on fifty or even a hundred natives, because of European discipline, training and fire control.” 2)Crazy Horse and Custer” p. 425 Stephen Ambrose To make matters worse, Custer had pushed the 7th mercilessly and by the time they arrived at the battlefield both men and horses were exhausted.

Custer’s plan of attack is also widely condemned as overly optimistic. He split his command of 616 officers and enlisted men of the 7th cavalry into three battalions. If the four companies of 2nd Cavalry had come along, Custer’s force would be 30% larger.3)Ibid The main force led by himself would be the right flanking column, Reno would have the left flanking attack column and Benteen and the pack train would be in the middle.  Custer also drastically underestimated the Native American force at about 1,500.

In theory, Custer’s plan of attack wasn’t that bad:

  • If Custer was up against a force that was only two or three times his size and
  • If Reno had pressed home his attack drawing the Native American warriors east toward him and
  • If Custer had been able to cross the Little Bighorn above the Native American camp and
  • If Custer had been able to attack the village while the warriors were engaged with Reno

Custer might have, indeed, had a great victory that would have propelled him to the US Presidency (as he had hoped). But none of these suppositions were correct.

Screen shot of the General Staff Scenario Editor where the battle of Little Bighorn scenario is being set up. Not the Order of Battle of the 7th Cavalry (with attached units of the 2nd Cavalry and Gatling guns) on the left. Units are positioned by clicking and dragging them from the Order of Battle Table on the left onto the map. Click to enlarge.

So, the question remains: what value for Leadership would you give to Custer?

Screen shot of the General Staff Army Editor showing the slider that sets the Leadership value for a commander. What value would you give Custer? Click to enlarge

By the way, there will be three separate Little Bighorn scenarios for the General Staff Wargaming System: historically accurate Order of Battle for the 7th Cavalry, the 7th Cavalry plus four companies of the 2nd US Cavalry and 7th Cavalry plus four companies of the 2nd US Cavalry and 3 Gatling guns.

References   [ + ]

1. The Guns Custer Left Behind; Historynet
https://www.historynet.com/guns-custer-left-behind-burden.htm
2. Crazy Horse and Custer” p. 425 Stephen Ambrose
3. Ibid

New Battles on Old Battlefields

Plate 1 from, “The American Kriegsspiel. a Game for Practicing the Art of War upon a Topographical Map,” by W. R. Livermore, Captain, Corps of Engineers, U S Army published in 1882. Click to enlarge.

When I was about ten years old my father brought home an original copy of Esposito’s The West Point Atlas of American Wars. My life was forever changed. I had always been interested in military history and maps but now I could clearly see the complexity of tactical maneuvers and how these battles unfolded.

In previous blogs, I have written about my introduction to wargaming through Avalon Hill’s superb games. While diving deeper into the history of American wargaming I discovered Livermore’s American Kriegsspiel (by the way, it is available online from the Library of Congress here). When I first saw Plate 1, above, I couldn’t help but think of the officers at West Point, ‘practicing the Art of War’ on that black and white map.

Consequently, one of the first things that I wanted to do with the General Staff Map Editor was bring Plate 1 back to life so new battles could be fought on it:

The American Kriegsspiel map imported into the General Staff Map Editor and converted for use with the General Staff Wargaming System. Grid lines are optional. Click to enlarge.

My good friend, Ed Isenberg, did the colorization and we added some new features in the Map Editor to support importing rivers, roads and other terrain features, from a PhotoShop image (for more information see the online documentation for the Map Editor here).

Importing the American Kriegsspiel map into the General Staff Wargaming System was a good beta test of the Map Editor. If you are an early backer you should have the location and password to download it. If, for some reason, you don’t have these, please contact me directly.

One of the interesting features of the General Staff Wargaming System is that any two armies created in the Army Editor can be combined to create a battle scenario on any map created in the Map Editor. Thinking about all the ‘mix and match’ combinations I decided to create an army, in the Army Editor, from the Order of Battle Table (OOB) for the French Imperial Guard, August 1, 1813 from George Nafziger’s, superb “Napoleon at Dresden,” book:

The French Imperial Guard Order of Battle in the General Staff Army Editor. Click to enlarge.

We are currently beta testing the General Staff Scenario Editor. Here I’ve imported the American Kriegsspiel map (from above) and the French Imperial Guard (from above). To position units, just click and drag from the OOB on the left:

Screen shot of the General Staff Scenario Editor where the French Imperial Guard is being positioned on the original American Kriegsspiel map. Click to enlarge.

Hopefully, this will get your imagination going and thinking about what maps, armies and scenarios you would like to see. In addition to the ability to create your own new scenarios on old battlefields, General Staff will ship with 30 historical scenarios (the list is published in previous blogs).

Please feel free to contact me directly if you have any questions.

The Problem With Hexagons

Hexagons are ubiquitous in wargames now (indeed, both Philip Sabin’s War: Studying Conflict Through Simulation Games and Peter Perla’s The Art of Wargaming feature hexagons on their book covers), but this wasn’t always the case. My first wargame – the first board wargame for many of us – was Avalon Hill’s original Gettysburg  (by the way, $75 seems to be the going price for a copy on eBay these days).

No hexagons in Avalon Hill’s original Gettysburg. Remember how the map contained the original starting positions for the Union cavalry and out posts? From author’s collection. (Click to enlarge)

The American Kriegsspiel by Captain Livermore (circa 1882) only had a map grid for estimating distances. We also have a map grid in General Staff to facilitate estimating distances but you can turn the map grid on or off.

Plate 1 from The American Kriegsspiel by Captain Livermore. Click to enlarge. This image is from GrogHeads wonderful blog post on Nineteenth Century Military War Games. Link: http://grogheads.com/featured-posts/5321

And how about this picture from the Naval War College (circa 1940s)? I just needed an excuse to post this photograph:

A Fletcher Pratt Naval War Game in progress. I never understood why they didn’t use upside down periscopes to check broadside angles rather than getting down on the floor. Click to enlarge. From this blog http://wargamingmiscellany.blogspot.com/2016/02/simulating-gunfire-in-naval-wargames.html

It is pretty common knowledge among the wargaming community that Avalon Hill’s owner, Charles Roberts, introduced hexagons to commercial wargaming in the early 1950s .

“Later, he [Roberts] saw a photograph of one of the RAND gaming facilities and noted they were using an hexagonal grid. This grid allowed movement between adjacent hexagons (or hexes, as they are more frequently called) to be equidistant, whereas movement along the diagonals in a square grid covered more distance than movement across the sides of the squares. Roberts immediately saw the usefulness of this technique and adopted to his subsequent games.”

The Art of Wargaming, Perla, p. 116

In researching how the RAND Corporation – a major post-war defense think tank – came up with the original idea of employing hexagons to simplify movement calculations (as well as the invention of the Combat Resolution Table or CRT) I stumbled upon an amazing document: Some War Games by John Nash and R. M. Thrall (Project RAND, 10 September 1952; available as a free download here). Yes, that is THE John Nash; A Beautiful Mind John Nash; the Nobel Prize recipient John Nash. The Some War Games summary states:

“These games are descendants of the one originally instigated by A. Mood, and are both played on his hexagonal-honey comb-pattern board. – Some War Games Nash & Thrall.

But what appears on Page 1A of Some War Games is even more exciting:

The earliest reference of using hexagons for wargames. “The board is a honeycomb pattern of hexagonal “squares,” the same that was used in Mood’s game” – From Some War Games (Project RAND, Nash & Thrall).

Sadly, I have been unable to find an actual copy or documentation for “Mood’s game,” but did discover that A. Mood was a statistician who wrote the popular text book, “Introduction to the Theory of Statistics,” and, during World War II was involved with the  Applied Mathematics Panel and the Statistical Research Group. Moore was also the author of, “War Gaming as a Technique of Analysis,” September 3, 1954 which is available as a free download here. Unfortunately, I have yet to uncover any images of Moore’s original war game and the very first use of his ‘honeycomb pattern’ board.

Let’s take a quick look at the math behind hexagons:

The cost of moving diagonally as opposed to horizontally or vertically on a map board (from a slide in my PhD Qualifying Exam on least weighted path algorithms).

The problem of quick and easy movement calculation (as shown in the above graphic) is caused by the Pythagorean Theorem. Well, not so much caused, as a result of the theorem:

The distance to a diagonal square, d, is the square root of the square of the hypotenuse (the side opposite the right angle) which is equal to the sum of the squares of the other two sides. We all learned this watching the Scarecrow in the Wizard of Oz, right?

In other words, if everybody could just multiply by 1.41421356 in their heads we wouldn’t even need hexagons! The downside, of course, is now we’ve restricted our original eight axes of movement to six. And there’s another problem; what I call the, “drunken hexagon walk.”

An example of “drunken hexagon walk” syndrome. All we’re trying to do is go in a straight line from Point A to Point B and from Point A to Point C.

In the above diagram we just want to travel in a straight line from Point A to Point B. It’s a thirty degree angle. What could be simpler? How about traveling from Point A to Point C? It’s a straight 90 degree angle. It’s one of the cardinal degrees! What could be simpler than that? Instead our units are twisting and turning first left, then right, then left like a drunk stumbling from one light post to another light post across the street. In theory the units are actually traversing considerably more terrain than they would if they could simply travel in a straight line. This is the downfall of the hex: sometimes it simplifies movement; but just as often it creates absurd movement paths that no actual military unit would ever take.

So, what’s the solution? Clearly, there is no reason why a computer wargame should employ hexes. Computers are very good at multiplying by 1.41421356  or any other number for that matter. Below is a screen shot of General Staff:

Screen shot of General Staff (2nd Saratoga) based on the map of Lt. Wilkinson, “showing the positions of His Excellency General Burgoyne’s Army at Saratoga published in London 1780)  . Click to enlarge.

What’s missing from the General Staff screen shot, above? Well, hexes, obviously. Units move wherever you tell them to in straight lines or following roads precisely if so ordered. And units can obviously face in 360 degrees. Consider this screen shot from the General Staff Sandbox where we’re testing our combat calculations:

Screen shot from the General Staff Sandbox. Notes: 3D unit visibility is turned on, displayed values: unit facing, distance, target bearing, enfilade values, target offset. Click to enlarge.

For board wargames hexagons seem to be a necessary evil unless you want to break out the rulers (that never stopped us with the original Gettysburg or Jutland). But, when it comes to computer wargames, I just don’t see the upside for hexagons but I do see a lot of downside. And that’s why General Staff doesn’t use hexes.