CM AI design

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
I cringe every time they even use the word "AI" for the mechanism in modern wargames.

There will be no competitive opponents as long as wargame developers don't allow outside people to write the programmed opponents. Apart from not being worth the investment on part of the game developer's team itself it is very unlikely that your 3D programmers also happen to be familiar with both classic game "AI" and what is normally referred to as "AI", including various forms of machine learning.

Speaking of machine learning, nothing will happen until game record events in games and send them back for integration into better programmed opponents. Right now it's a one-way street of information.

I mean it'll take a while until a computer program will read a bunch of the more academic Glantz books and puts them to good use. But right now the whole wargaming community is in a complete freeze.
 

slm

Member
Joined
Jan 6, 2010
Messages
203
Reaction score
0
Location
europe
Even if AI played like a total noob *human* player people would probably think it sucks :)
If you take latest CMx2 AI from CMFI (I'm skipping it, so don't know how it compares to CMBN), I wonder what are its weakest points? Which things could be improved most to make it more competetive?

To me the most annoying thing is that AI plans are totally time dependent. Triggers could help some, but then testing AI plans would take even more time.
 

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
Even if AI played like a total noob *human* player people would probably think it sucks :)
If you take latest CMx2 AI from CMFI (I'm skipping it, so don't know how it compares to CMBN), I wonder what are its weakest points? Which things could be improved most to make it more competetive?

To me the most annoying thing is that AI plans are totally time dependent. Triggers could help some, but then testing AI plans would take even more time.
CMx2's AI has no ability to tell it how to react to events. As you say, time based only. It's a similar issue to not having SOPs, SOPs would be very useful not only for more efficient play on part of human players (not to mention more realistic), but it would also make an AI (scripted or autonomous) much more capable with just a little bit of preplanning.

Anyway, this issue rules it right out as a contender. And that's a major reason why I think it's actually overall a step back from CMx1's autonomous AI. Apart from the fact of course that somebody has to put plans in and that you can run out of plans. And of course since even putting in the plans has to be done interactively with a mouse instead of from an outside program.
 

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
Right, I should have said computer wargaming is in the dumpster.

Ironically kickstarting the hobby again would be greatly helped by a competent AI, because that is a strength of a computer game compared to a boardgame.

Apart from the obvious advantages of a challenging experience it also enables co-op play (multiplayer one side against programmed opponent) and you can use subcomponents of it to enhance control on the player side.
 

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
Whatever happened to your open source game?
Won't happen until I get fired from the daytime job.

The whole idea only came up when I could only find games to write an AI for that are somewhere in the FPS space or whereabouts. However, writing both a game and an AI is "a little bit" outside the scope of an evening project.

To elaborate a bit more, the specific hope that was crushed is how much time you save by using an existing open source 3D engine. While these engines are very powerful and do save a lot of time, namely Ogre, there still are humongous amounts of code to be written. Namely, the terrain managers available don't fit a CMx1/PzC style game at all, there is no support for tiles with different textures and different properties, so you have to write your own terrain manager. It goes without saying that after you have written your new terrain manager for Ogre you'll find all those bugs and unimplemented features in Ogre that the other terrain manager didn't find. Then there is LOS. While there is LOS checking in Ogre it isn't suitable for a game like we want.
 
Last edited:

junk2drive

Member
Joined
Feb 18, 2005
Messages
897
Reaction score
7
Location
Arizona West Coast
Too bad you and Matrix couldn't get together on a project with the PCO engine. It uses multicores, reasonable AI, jumbled mess of code, etc.
 

Chelco

Should be working ...
Joined
Aug 15, 2003
Messages
209
Reaction score
3
Location
Germantown, MD, USA
Country
ll
I just dropped by to say that the last screenshot of that article is mine (Whatda?!). Do I win a prize or something?

Oh my, reading that article made my eyes bleed. Sounded like the minutes from a high school computer geeks workshop. Then I realized that is Steve being interviewed ... This guy can speak about anything, can't he? :eek:

What Combat Mission needs is triggers. It's useless to claim "oh, it's too complex!", shrug and leave Combat Mission as it is. Sure it is complex, but the AI in Combat Mission has the brain of an ant. Slash that, even ants have collective brains that work way better (swarm intelligence).

For once, I would like to read this guy Steve say "we don't know how to do it" or "we can't do it" instead of all this BS and other patronizing comments he always has. It's OK to not know everything, it's OK to recognize minor shortcomings, dude.

Forget about machine learning, agent based intelligence, artificial neural networks and other academic delicatessen. These can be used effectively only by a limited group of hardcore researchers and industry experts. Only example I've seen of these ideas being used effectively is John Rushing's implementation of data mining for John Tiller's Total War in Europe. Years of expertise and research, kickass AI in the two game releases.

Steel Beasts ProPE uses triggers and the user can create some very dynamic and believeable computer opponents. I have to say that it all depends on who is editing the scenario, though.

Cheers,
 

slm

Member
Joined
Jan 6, 2010
Messages
203
Reaction score
0
Location
europe
There are 2 features I'd really like to see added to CMx2 engine: AI triggers and CoPlay.
Since triggers would improve playability for all users playing against the AI, I guess they have better chance of getting implemented.
Making scenarios that would use triggers well would take more time, but I think it would make scenario authors more happy.
IMO designing good AI plans using triggers would add new challenge and make it sooo much more interesting than what we have now.
 
Last edited:

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
Steel Beasts ProPE uses triggers and the user can create some very dynamic and believeable computer opponents. I have to say that it all depends on who is editing the scenario, though.
Steel Beats (not just Pro, even the year 2000 version you can pick up for $2) has all the good stuff here, triggers and SOPs and everything else that would life in CMx2 so much easier.

People don't realize how much SOPs done right (with inheritance and whatnot) would help both human and programmed players.
 

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
Too bad you and Matrix couldn't get together on a project with the PCO engine. It uses multicores, reasonable AI, jumbled mess of code, etc.
I don't do Microsoft-only things like C#, Direct3d and the like.

In fact when I heard that PzC was using those I had a bad feeling. Just like CMC those who do weird tools often have problems staying on target, and the actual game can get under the steamroller.
 

NUTTERNAME

Member
Joined
Jan 3, 2010
Messages
1,943
Reaction score
37
Location
N
Country
llVietnam
Steve weighs in deeply here. I suppose he knows much about chess. I suppose I would wager a nice sum he could not beat me. But he is full of opinions so enjoy.

English version

1/ For you, what’s really an AI in a wargame. Several scripts and algorythms, of course, but anything more ?

This is going to sound odd, but there is something else… « artistic creativity ». If you boil things down they usually can be categorized as scripts or algorithms, however the devil is always in the details. Especially with AI. To get complex behavior the AI not only has to have a very strong set of scripted behaviors to select from, but it also has to understand when to use and not use them. It’s the last part that’s so difficult to do in the real world. Limited time budgets, competing resource needs within the game, and the enormity of the task (i.e. duplicating Human intelligence) require a clever approach with a very skilled programmer. This is why academic AI programmers rarely venture into commercial gaming.

Cheating is a tool that some games use to give the player more of a challenge without having to do lots of complex AI programming. However, players quickly see through this and find it angering. Gamers have very low patience for cheaters. Which is why so few wargames use much, if any, cheating.

2/ For a PC wargame, what are the differents AI models ? And the differents software tools for developers ?

AIs generally fall into two basic types; on-the-fly and scripted. The first method means the program conducts it’s actions without any direct help from a Human. Most wargames favor this approach. The scripted concept means the AI takes cues from Humans who developed the battles being played out. This requires some degree of end user tools and the skills to use them well. Most non-wargames favor this approach. Then there are the hybrids which lean one way or the other, but combine elements of both.

The primary advantage of an on-the-fly system is more flexible and requires no end user effort. The disadvantage is the programmed AI is now solely responsible for figuring out how to approach a specific battle and how to deal with any number of different opponent actions. Scripted, on the other hand, has the advantage of a Human instructing the AI how to approach a specific battle based on his understanding of how that battle is likely to play out. The disadvantage is that battles take more time to create and (usually) AI scripting isn’t a skill most end users have. Which means reducing the numbers of potential battle makers simply because many don’t have the patience/skill to create AI scripts.

3/ What is possible with the computing power of a modern PC (more or less 2 years old) of good quality ? 3D asides, what other technicals constraints is there ?

There’s a very old axiom in computer technology… every new computing advance that comes out there’s already a game in the marketplace that can overload it. This means all new technologies allow games to advance in quality, but not as much as either game developers or game makers want. I’d say right now the two most important advances in the past few years are cheap RAM and higher core clock speeds. Video card technology hasn’t improved as much as it has in the past.

4/ Are some kind of wargames, so of historical conflicts, or scales of games, more appropriate for (current) AI ? If so, which one ?

Higher level games are easier to program AI for because the scale is easier to « fudge ». Tactical games are the hardest because the number of elements the AI has to successfully handle is much larger. The more « melee » a game is the easier because (again) the range of elements is far fewer than others. In fact, I was thinking about this last night as I played an RTS game that has only 4 types of units (Pikemen, Swordsmen, Archers, and Cavalry). One form of ranged fire, everything else is brute force hand to hand. Compare this to tactical modern warfare with it’s range of weaponry and unit specializations. Not even in the same ballpark from an AI standpoint.

5/ From your experience in game design, what technicals challenges have you meet ? Which one did you overcome ? Which one are still a barrier ?

Player expectations are always higher than any game can deliver, so that’s a barrier we still have. If we overcome it we’d probably be the first ever, which is why we don’t judge our games’ success based on such an unobtainable standard. What we have succeeded in doing is providing players with a very realistic game environment that produces reasonably realistic behaviors according to reasonable expectations. Where we need to do more work is giving scenario designers the ability to have their AI scripts be more adaptable based on their designs and unexpected situations.

6/ Is an AI allied with the player (for a game including alliances and several factions) more simple or more complicated to build than a unique AI enemy of the player (for a game where there’s mainly one adversary) ?

Whether a Human is directing AI or the AI is acting on it’s own, they must work from the same basic AI programming. Which means, basically, the two are identical in terms of difficulty. Remember, an allied AI that doesn’t behavior well without Human interaction is almost useless. The player might just as well be commanding all those units himself! And there is where the big difficulty comes about. In order for a Human to have a competent allied AI there needs to be a very strong capability of both Human and AI to interact with each other. What’s the use of an allied AI player if it’s getting beat up and doesn’t ask for your help? Or if it sends resources to help you and then doesn’t have enough to do anything for itself, which then requires you to send stuff back to it? How likely is the game to succeed if you can’t coordinate his actions with those of his ally’s? It requires an entirely unique type of UI and AI for this to work.

7/ In strategy games and wargames AI are very often better in attack than in defense, why ?

Defense, always. It’s the same in real life as well. The attacker is the one that has all the pressure on it to come up with something brilliant. The defender simply reacts to it. Much easier to react than to act.

8/ To what extent the perception of the AI from the player has to be taken into account ? Can an AI in a game just be less good strategically (than a human adversary), as long as it offers a good gameplay with its actions ? And so at the end, for a game, offers an entertaining result, thus something satisfying ?

AI must be at least entertaining, or it’s a waste of time. Anything beyond that is a bonus.

9/ For wargames, what development can we expect for AI in a relatively near future ? A crazy idea probably, if that was possible technically, could a wargame having part of its AI in the future (and rather hypothetical) « cloud » gain an advantage (ex : computing power, comparing moves in same other games) ?

If a wargame company could double it’s sales by making better AI then you’d see a number of really great innovations. Especially what is loosely called « learning » behaviors. They offer the best possibilities for major advancement, but they also require massive programming skills and time plus vast amounts of computer resources to make them work effectively. Since there is no financial incentive to improve AI these things will not happen. Or happen any time soon, at least.

10/ A chess game has a board with 64 squares and 32 pieces. So a base less important than a good wargame, and far much less than some « monster wargames ».
With 256 processors in parallel (allowing 200 millions move / sec.), in 1996-97 Deep Blue has finally beaten the world chess champion Gary Kasparov. In theory, well programmed, a computer do not make mistakes. But even with a super-computer, the machine still lacks a strategical vision, a global view ? If we increase the size of the « board game », for a wargaming simulation is it just a question of computing power ?

Computing power is, certainly, a major limiting factor. But the major factor is the the lack of what is called « outcome based AI ». In chess the elements have very specific capabilities and the variables boil down to which piece is moved and which direction and how many spaces does it move. There are only so many combinations of these things that can possibly happen given a specific circumstance. Deep Blue was programmed to search through all the patterns, identify potential moves, then play out those moves long term to predict where that one action might lead to many turns later. It’s only possible in Chess because the elements are so limited and predictable. Any significant simulation of warfare is vastly more complex.

The only real solution is to program a computer to think like a Human. Billions of Dollars could be given to the most advanced AI research centers in the world and still come up short of expectations.

11/ Tiebreaker question : If in a wargame an AI could beat certainly an experienced wargamer, whatever the simulated theatre of operations, to be a good game does it have to limit the AI to necessarily let the player win ?

Players don’t like to lose. They say they want really good AIs, but if they are given one they would quickly lose interest. So yes, when it comes down to it players don’t want great AI. They want AI that’s just good enough to give them a realistic challenge and then lose. At least most of the time.

Our thanks to Battlefront for taking the time to answer these questions.
 

Redwolf

Member # 3665
Joined
Sep 2, 2002
Messages
5,113
Reaction score
43
Location
MA, USA
Country
llUnited States
We should really be careful not to beat up Steve over this.

BFC can't afford to have Charles give interviews like this and even then, is he an AI specialist? I hope not, he's needed for 3D and for the combat resolution engine.

The alternative to the information posted would be having nothing.
 

NUTTERNAME

Member
Joined
Jan 3, 2010
Messages
1,943
Reaction score
37
Location
N
Country
llVietnam
And....how is that worse again? Propaganda makes me warm and fuzzy, how again?

I could care less...uh, I could give a rat's monkey fantasy, as far as Stevies opinions etc.
 
Joined
Aug 24, 2011
Messages
365
Reaction score
34
Location
Melbourne, Australia
Country
llSpain
What Combat Mission needs is triggers. It's useless to claim "oh, it's too complex!", shrug and leave Combat Mission as it is. Sure it is complex, but the AI in Combat Mission has the brain of an ant. Slash that, even ants have collective brains that work way better (swarm intelligence).
The CMx2 engine story could be summarized as "breadth in scope, then depth in features". It screams for triggers.

Chelco said:
For once, I would like to read this guy Steve say "we don't know how to do it" or "we can't do it" instead of all this BS and other patronizing comments he always has. It's OK to not know everything, it's OK to recognize minor shortcomings, dude.
Me too.

Chelco said:
Forget about machine learning, agent based intelligence, artificial neural networks and other academic delicatessen.
These are indeed buzzwords which as time goes by become effectively meaningless. They are indeed useful to make anyone using them to sound "knowledgeable" about one topic rather than "clueless". Regarding the 'other academic delicatessen' I beg to differ :)

Chelco said:
These can be used effectively only by a limited group of hardcore researchers and industry experts.
You just need those guys to get interested into apply that knowledge to build a PC wargame. Even if their involvement consists in devoting part of their spare time, their contribution can be significant.

Chelco said:
Only example I've seen of these ideas being used effectively is John Rushing's implementation of data mining for John Tiller's Total War in Europe. Years of expertise and research, kickass AI in the two game releases.
You forget about Panther Games' Command Ops series. Nothing signed by Tiller has even come close to the very first title by them, Red Devils Over Arnhem.
 
Joined
Aug 24, 2011
Messages
365
Reaction score
34
Location
Melbourne, Australia
Country
llSpain
Won't happen until I get fired from the daytime job.

The whole idea only came up when I could only find games to write an AI for that are somewhere in the FPS space or whereabouts. However, writing both a game and an AI is "a little bit" outside the scope of an evening project.

To elaborate a bit more, the specific hope that was crushed is how much time you save by using an existing open source 3D engine. While these engines are very powerful and do save a lot of time, namely Ogre, there still are humongous amounts of code to be written. Namely, the terrain managers available don't fit a CMx1/PzC style game at all, there is no support for tiles with different textures and different properties, so you have to write your own terrain manager. It goes without saying that after you have written your new terrain manager for Ogre you'll find all those bugs and unimplemented features in Ogre that the other terrain manager didn't find. Then there is LOS. While there is LOS checking in Ogre it isn't suitable for a game like we want.
Well, it doesn't need either to be a one-man project. Now that I'm becoming more settled, I am starting to wonder about what could I do with my spare time :)
 
Joined
Aug 24, 2011
Messages
365
Reaction score
34
Location
Melbourne, Australia
Country
llSpain
PS: My excuses to all those I left with a game pending... To cut a long story short: a very strong gust of wind took me all the way from Barcelona and dropped me on the other side of the world. I'm starting to catch up with my hobbies again... it's been nine crazy months.
 
Joined
Aug 24, 2011
Messages
365
Reaction score
34
Location
Melbourne, Australia
Country
llSpain
To elaborate a bit more, the specific hope that was crushed is how much time you save by using an existing open source 3D engine. While these engines are very powerful and do save a lot of time, namely Ogre, there still are humongous amounts of code to be written. Namely, the terrain managers available don't fit a CMx1/PzC style game at all, there is no support for tiles with different textures and different properties, so you have to write your own terrain manager. It goes without saying that after you have written your new terrain manager for Ogre you'll find all those bugs and unimplemented features in Ogre that the other terrain manager didn't find. Then there is LOS. While there is LOS checking in Ogre it isn't suitable for a game like we want.
Let me share my thoughts on this particular matter.

A couple years ago I was tutoring an undergraduate student who wanted to strap some 'solid AI' on a tank shooter he had wrote in order to get his Bachelor thesis. I managed to convince him that major changes where needed in the gameplay of his arcade game so a flexible AI engine made sense. You don't need anything very sophisticated in a game like Doom 3: the average lifespan of a NPC in a game like that can be measured comfortably in seconds. What's the point of having clever NPCs if they're going to be toast without being given an opportunity to show the player how clever they are? It's however quite ironic that we were borrowing the basic template for the architecture from an FPS, F.E.A.R. (check this site for some insight into the remarkably advanced and overkill architecture Jeff Orkin devised for that game: Jeff Orkin's GOAP webpage).

So we consistently turned a fast-paced tank shooter into something with a slower pacing. I couldn't convince him into making something resembling Combat Mission in WEGO: he wasn't interested in the hobby and, after all, it was his project not mine, and we ended with something between a shooter and a very poor man's Steel Beasts.

One of the problems we dealt with had to do with the problem that Redwolf describes. The scene manager we were using was great for rendering, but very poor for physics modeling (i.e. sighting, ballistics, etc.). At the beginning my student struggled trying to hack these subsystems into the rendering code. That didn't work. I had to step myself into the coding work, and helped him to decouple the objects we were modeling (vehicles, the terrain itself) from the rendering code. Then we got something like a reasonable physics engine, which gave us a lot of freedom to tweak parameters to our hearts content, test ballistics and penetration model independently from the 3D visualization, as well as implementing the data structures necessary to speed up these computations without worrying about affecting the efficiency of the rendering. Eventually we did the same thing for the AI that planned the actions for the vehicles on the terrain. The AI didn't really need to work with the same level of detail as the rendering engine or the physics in order to do its thing.

Obviously, we didn't get where I wanted to get, but I got close enough to figure out a few things which one doesn't learn unless one tries by himself. For instance, that decoupling the tactical AI (the component that decides how to achieve a particular goal) from the actual physical world by working on a suitably defined abstraction was indeed a good idea. But then realizing that in order to animate things properly, we needed a different kind of AI modeling dealing with motion planning. In other words, one thing is to decide how many tanks you need to send somewhere in order to achieve X and what's the best route for that, and another thing is to get each tank to execute that plan taking into account the physical constraints associated to a 30-ton vehicle moving at 40 kph which has to keep formation with other vehicles in the same squad.

This thing took us the best part of two years, with me devoting no less than 20% of my work hours to it (and supposedly, his full time dedication, however I'm afraid he never worked more than 50% on it). I wonder where we could have got I have had more time and he had been a more experienced programmer, which didn't need so much tutoring and was more focused.
 
Last edited:
Top