Category Archives: Computers

A Wargame 55 Years in the Making (Part 3)

The goal of my doctoral research was to create a suite of algorithms that were capable of making ‘human-level’ tactical and strategic decisions. The first step is designing a number of ‘building block’ algorithms, like the least weighted path algorithm that calculates the fastest route between two points on a battlefield while avoiding enemy fire that we saw in last week’s post. Another important building block is Kruskal’s Minimum Spanning Tree algorithm which allows the computer to ‘see’ lines of units.

I use terms like ‘see’ and ‘think’ to describe actions by a computer program. I am not suggesting that current definitions of these terms would accurately apply to computer software. However, it is simply easier to write that a computer ‘sees’ a line of units or ‘thinks’ that this battlefield situation ‘looks’ similar to previously observed battlefields. What is actually happening is that units are represented as nodes (or vertices) in a a graph and some basic geometry is being applied to the problem. Next week we will use probabilities. But, at the end of the day, it’s just math and computers, of course, don’t actually ‘see’ anything.

Examples of how Kruskal's Minimum Spanning Tree algorithm can be used to separate groups of units into cohesive lines. These figures are taken from, "Implementing the Five Canonical Offensive Maneuvers in a CGF Environment." by Sidran, D. E. & Segre, A. M.

Examples of how Kruskal’s Minimum Spanning Tree algorithm can be used to separate groups of units into cohesive lines. These figures are taken from, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. & Segre, A. M.

When you and I look at a map of a battle we immediately see the opposing lines. We see units supporting each other, interior lines of communication, and lines of advance and retreat. The image, below, shows how the program (in this case, TIGER, the Tactical Inference Generator which was written to demonstrate my doctoral research) ‘sees’ the forces at the battle of Antietam. The thick black line is the ‘MST Spine’. You and I automatically perceive this as the ‘front line’ of the Confederate forces, but this is a visual representation of how TIGER calculates the Confederate front line. Also important is that TIGER perceives REDFOR’s flanks as being anchored (that is to say, BLUE does not have a path to the flanking objective, the tip of the green vector, that does not go through RED Range of Influence, ROI, or Zone of Control).

Figure 1. TIGER screen shot of ‘flanking attribute’ calculations for the battle of Antietam (September 17, 1862, 0600 hours). Note the thick black line that repres ents the MST spine of REDFO R Group 0, the extended vectors th at calculate the Flanking Goal Objective Point and BLUEFOR and REDFOR ROI (red and blue shading). REDFOR (Confederate) has anchored flanks.

TIGER screen shot of ‘flanking attribute’ calculations for the battle of Antietam (September 17, 1862, 0600 hours). Note the thick black line that represents the MST spine of REDFOR Group 0, the extended vector that calculates the Flanking Goal Objective Point and BLUEFOR and REDFOR ROI (red and blue shading). REDFOR (Confederate) has anchored flanks. From, “Algorithms for Generating Attribute Values for the Classification of Tactical Situations,” by Sidran, D. E. & Segre, A. M.

Now that TIGER can see the opposing lines and recognize their flanks we can calculate the routes for implementing the Course of Action (COA) for various offensive maneuvers. U. S. Army Field Manual 3-21 indicates that there are five, and only five, offensive maneuvers. The first is the Penetration Maneuver (note: the algorithms for these and the other maneuvers appear in, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. and Segre, A. M.) and can be downloaded from ResearchGate and Academia.edu.

The Penetration Maneuver is described in U.S. Army Field Manual 3-21 and as implemented by TIGER. Note how TIGER calculates the weakest point of REDFOR's line. From, "Implementing the Five Canonical Offensive Maneuvers in a CGF Environment." by Sidran, D. E. and

The Penetration Maneuver is described in U.S. Army Field Manual 3-21 and as implemented by TIGER. Note how TIGER calculates the weakest point of REDFOR’s line. From, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. and Segre, A. M. Click to enlarge.

The next maneuver is the Infiltration Maneuver. Note that to implement the Infiltration Maneuver, BLUEFOR must be able to infiltrate REDFOR’s lines without entering into RED’s ROI:

The Infiltration Maneuver.

The Infiltration Maneuver as described in U.S. Army Field Manual 3-21 and as implemented by TIGER. Note how TIGER reaches the objectives without entering into REDFOR ROI. From, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. and Segre, A. M. Click to enlarge.

The next maneuver is the Turning Maneuver. Note: in order to ‘turn an enemy’s flanks’ one first must be able to recognize where the flanks of a line are. This is why the earlier building block of the MST Spine is crucial.

The Turning Maneuver as illustrated in U. S. Army Field Manual 3-21 and in TIGER.

The Turning Maneuver as illustrated in U. S. Army Field Manual 3-21 and in TIGER. From, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. and Segre, A. M. Click to enlarge.

Certainly the most complex offensive maneuver is the Envelopment Maneuver which requires two distinct movements and calculations for the attacking forces: first the attacker must decide which flank (left or right) to go around and then the attacker must designate a portion of his troops as a ‘fixing force’. Think of an envelopment maneuver as similar to the scene in Animal House when Eric “Otter” Stratton (played by Tim Matheson) says to Greg Marmalard (played by James Daughton), “Greg, look at my thumb.” Greg looks at Otter’s left thumb while Otter cold-cocks Marmalard with a roundhouse right. “Gee, you’re dumb,” marvels Otter. In an envelopment maneuver the fixing force is Otter’s left thumb. Its purpose is to hold the attention of the victim while the flanking force (the roundhouse right) sweeps in from ‘out of nowhere’. In the next post I will show a real-world example of an Envelopment Maneuver created by my MATE (Machine Analysis of Tactical Environments) program for DARPA.

The Envelopment Maneuver as shown in U. S. Army Field Manual 3-21 and as implemented in TIGER.

The Envelopment Maneuver as shown in U. S. Army Field Manual 3-21 and as implemented in TIGER. From, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. and Segre, A. M. Click to enlarge.

Lastly, and obviously the maneuver of last resort, is the Frontal Assault:

The Frontal Assault Maneuver from

The Frontal Assault Maneuver from, “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.” by Sidran, D. E. and Segre, A. M. Click to enlarge.

All that I’ve done in this post is show some of the things that the TIGER program does. What I haven’t done is show how the algorithms work and that’s because they are described in the papers, below. Obviously, this is a subject that I find pretty interesting, so feel free to ask me questions (you can use the Contact Us page).

It is my intention to incorporate these algorithms into the General Staff wargame. However, I’ve been told by a couple of game publishers that users don’t want to play against a human-level AI. What do you think? If you’ve read this far I would really appreciate it if you would answer the survey below.
[os-widget path=”/drezrasidran/survey-11-27″ of=”drezrasidran” comments=”false”]


Papers that were cited in this post with download links:

“An Analysis of Dimdal’s (ex-Jonsson’s) ‘An Optimal Pathfinder for Vehicles in Real-World Terrain Maps'”

In PDF Format

“Algorithms for Generating Attribute Values for the Classification of Tactical Situations.”

In PDF Format

“Implementing the Five Canonical Offensive Maneuvers in a CGF Environment.”

In PDF Format


 

Rules for Artillery

Screen shot of the page describing the rules for artillery in General Staff.

Screen shot of the page describing the rules for artillery in General Staff.

The special, “proof of concept” demo that we’ve been working for a ‘very well known computer wargame publisher’ is coming along very well and we wanted to share this screen capture of the Special Artillery Rules page. This also will give you a glimpse into how artillery will be used in the game.

As always, comments, critiques (and catching typos!) are always welcome!

New, Faster Pathfinding AI

A screen shot showing traditional A* (pronounced A Star) pathfinding. The green areas are 'nodes' that the algorithm explored on its way to finding the optimal path (in Brown).

A screen shot showing traditional A* (pronounced A Star) pathfinding. The green areas are ‘nodes’ that the algorithm explored on its way to finding the optimal path (in Brown). Click on picture to enlarge to full size.

Artificial Intelligence (AI) plays an important role in wargame development; it’s what separates a good game from a great game. One of the most important algorithms employed in wargame AI is the A* (pronounced ‘A star’) pathfinding algorithm that was created in 1968 by Peter Hart, Nils Nilsson and Bertram Raphael. The paper describing it, A Formal Basis for Heuristic Determination of Minimum Cost Paths can be downloaded here. I did my doctoral Qualifying Exam on optimized pathfinding. My paper, “An Analysis of Dimdal’s (ex-Jonsson’s) ‘An Optimal Pathfinder for Vehicles in Real-World Terrain Maps'” can be downloaded here.

How long will it take for your orders to arrive?

How long will it take for your orders to arrive at this unit? How long will it take for the unit to send a courier back to headquarters with its current location?

Pathfinding is important in wargames because it’s how units, under computer control, move around on the map. Also, and we’re announcing this for the first time here, when you give orders in General Staff a courier has to ride from your headquarters unit to the unit that is to receive your orders. Also, units on the battlefield that are not directly visible to the Headquarters unit (this is done with a 3D Bressenham line algorithm; more about this later) slowly begin to fade from view on the map. However, every hour a courier is dispatched from every unit to headquarters with an update on their position. As we can see from the information box, above, the courier will take 41 minutes to deliver the new position information to headquarters.

The top screen capture shows an implementation of the classic A* algorithm for calculating the optimal path from Blue’s headquarters unit to a far-flung cavalry unit. Note, this is an especially difficult path to calculate because the unit is across a river and there are only three bridges across. The A* algorithm performs perfectly but it is just too slow to be used with a real-time tactical wargame like General Staff. After some thought I wrote a major optimization of A* which we present here for the first time.

An example of the new EZRoadStar pathfinding algorithm created for General Staff. Compare it to the top screen capture which uses the classic A* algorithm. Click to enlarge.

An example of the new EZRoadStar pathfinding algorithm created for General Staff. Compare it to the top screen capture which uses the classic A* algorithm. Click to enlarge.

Above is a screen shot of the results of the new EZRoadStar algorithm. It is almost identical to the original A* algorithm but runs thousands of times faster (my fellow computer scientists would probably prefer if I did some tests, wrote a paper and published the exact figures and I promise I’ll get around to that, some day).

In the screen shot, above, you can see the path of the courier (in green) from the Blue HQ unit to wayward cavalry unit. The new pathfinding algorithm, EZRoadStar, first looks for roads and then calculates how to get on and off the roads. This is much faster than the A* algorithm.

 

Computational military reasoning.

Computational military reasoning is a phrase that I coined to describe the process of a machine performing human-level analysis of tactical and strategic problems. I have spent the last 30 years of my life working on this problem. It was the theme of my doctoral research in computer science. The abstract for my doctoral dissertation reads:

We present here TIGER, a Tactical Inference Generator computer program that was designed as a test-bed program for our research, and the results of a series of surveys of Subject Matter Experts (SMEs) testing the following hypotheses:

Hypothesis 1:  There is agreement among military experts that tactical situations exhibit certain features (or attributes) and that these features can be used by SMEs to group tactical situations by similarity.

Hypothesis 2:  The best match (by TIGER of a new scenario to a scenario from its historical database) predicts what the experts would choose.

We have conducted three surveys of SMEs and have concluded that there is, indeed, a statistically significant confirmation of Hypothesis 1, that there is agreement among military SMEs that tactical situations exhibit certain features (or attributes) and, that these features can be used to group, or identify, similar tactical situations. The statistical confidence level for this confirmation of Hypothesis 1 is greater than twice the prior probability.

In order to test Hypothesis 2 we constructed, after SME survey analysis, a series of algorithms, which we present here, for the analysis of SME identified tactical features (or attributes) including: interior lines, restricted avenues of approach, restricted avenues of attack, slope of attack, weighted force relationships and anchored or unanchored flanks. Furthermore, the construction, and implementation, of these algorithms, required the design and implementation of certain ‘building block’ algorithms including: range of influence, optimal FindPath, ComputeGroupsByThreshold and ComputeGroupsByNumber.

We further present an overview of TIGER, itself, and the built-in utilities necessary for creating three-dimensional tactical situations, complete with terrain, elevation and unit types as well as our implementation of Gennari, Fisher and Langley’s CLASSIT classification system.

Lastly, we present TIGER’s classification of twenty historical tactical situations and five hypothetical tactical situations and the SME survey results of TIGER’s classification that resulted in TIGER correctly predicting what the SMEs would choose in four out of five tests (using a one sided Wald test resulted in p = 0.0001 which is statistically significant).

TIGER logo from my doctoral research.

TIGER logo from my doctoral research.

The entire dissertation can be downloaded here

I have also written a number of papers about implementing tactical maneuvers: “Implementing the Five Canonical Offensive Maneuvers in a CGF Environment,” which can be downloaded here. And “Algorithms for Generating Attribute Values for the Classification of Tactical Situations,” which can be downloaded here.

What will make General Staff stand out from other wargames is that it will be the first commercial computer wargame to implement this research. I have high hopes that General Staff will have the most advanced tactical AI ever produced in a computer wargame.

Announcing a new computer wargame: General Staff!

I am extremely pleased to announce the development of my first new computer wargame in over twenty years: General Staff.  The decision to write a new wargame came about because I simply couldn’t find a computer wargame that I wanted to play. Yes, I know, there are dozens – if not hundreds – of really good computer wargames out there; but none of them appealed to me at the moment.

Most computer wargames have taken advantage of the ability of the computer to handle scores of complex rules and hundreds of units. This often resulted – and I want to make clear that as a designer I was also guilty of this – in massive wargames that weren’t all that fun to play. Sure, they were incredibly accurate. Indeed, I would market my wargames as simulations; because that’s what they were. And, truth be told, they were as good, if not better, than many computer simulations currently used by the world’s largest armies, Defense departments and ministries.

A slide from my Computer Game Design class at the University of Iowa.

A slide from my Computer Game Design class at the University of Iowa. Click to enlarge.

However, what I was looking for was something simple and fun. When I taught Computer Game Design at the University of Iowa I would tell my students that these kind of games were sometimes referred to as, “Beer & Skittles” games. They were simple, fun and addictive. Yes, I wanted to think (I didn’t want just a twitch game). I wanted something strategic or tactical; but I certainly didn’t want to get involved in micro-management of  logistics, factory production and national will. I just wanted to have fun.

Modern Kriegspiel (Waterloo).

Modern Kriegsspiel. Click to enlarge.

About this time I read an article about wargaming in Nautilus magazine. The one thing that caught my eye was an illustration for the article of Kriegsspiel. Kriegsspiel was a  wargame invented in 1824 and used by the Prussian staff for training. A very good article about the original Kriegsspiel can be found here. It has been recreated from time to time and I recently found this picture of a modern version.

I don’t think there’s been a modern computer version done of Kriegsspiel; at least I haven’t been able to find one. So I decided to create it.

This blog will be about the development of General Staff. Your comments and questions will be greatly appreciated.