Category Archives: Computers

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.