Jump to content

How does the AI work?


Recommended Posts

Hello,

I've been curious how the actual AI works in Combat Mission. Does it react to my moves? Is it dynamic? Or do they just follow a preprogrammed route that they don't stray from no matter what I do, or which direction I go. I've noticed some oddities, where they will have a large force camped out in a forest, while they send weak units piecemeal to my guns. The time runs out, and this huge force is still camping in the forest on the other side of the map that's not an objective.

Don't get me wrong, I enjoy CM very much, but I'm used to a seemingly much more robust and challenging AI from Achtung Panzer Operation Star.

Link to comment
Share on other sites

There are two layers to the AI.

The one you see the most is probably the "TacAI" which makes short term decisions on what to shoot at, whether to run away or fight, based on the immediate circumstances. This AI also controls your troops and the detail of how they execute their orders.

The other layer is controlled by the "AI Plan", created by the scenario or map designer. As it stands, that is, indeed, a sequence of orders which are run through according to the clock. The plans in scenarios, where the designer has complete knowledge of the forces that the plan has to control, and has more options for that plan can be quite sophisticated. QB maps have to have AI plans too, but it's much harder to write working plans because the designer has literally no idea what forces will eventually be attempting to execute that plan, and what might be a good idea for an armour-heavy force could be suicide for an infantry-heavy one.

The AI itself has no idea about objectives (i.e. it's different to CMx1); all its direction and motivation comes from the plan. Given the sheer number of QB-valid maps in FI, it's unsurprising that some AI plans are better than others...

There's also sometimes an issue where the AI gets confused about deployment zones and directions of attack. These trigger most often when you're playing "the wrong way round" on the map (so axis attack on an allied attack map or vice versa), and can be fixed by repainting setup zones and making sure friendly map edges make sense for the way you're playing in the editor.

Link to comment
Share on other sites

Well, there are three actually ;) although The Strategic and Operational are both controlled by the designer in the editor. The Tactical AI (which is fantastic) which determines how units react to their environment. The second level is the Operational level which decides how groups will move from one AI order to the next. And finally, there is the Strategic level which is the plan devised by the scenario author.

And the game that offers the best AI challenge for me is Command Ops.

I'm in the process of putting together a very detailed tutorial on how to create AI plans and what all the parameters do which I'll start posting after JonS finishes his Sheriff of Oosterbeek DAR.

Link to comment
Share on other sites

Well, there are three actually ;) although The Strategic and Operational are both controlled by the designer in the editor.

Can you expand on your use of words here. Specifically what do you mean by "Strategic" and "Operational". I do not use these words in the context of a CM battle because we are really way down at the tactical level when playing CM. That leads me to believe that we are not using those words the same way :)

I'm in the process of putting together a very detailed tutorial on how to create AI plans and what all the parameters do which I'll start posting after JonS finishes his Sheriff of Oosterbeek DAR.

Sounds excellent. Just what I am struggling with - the AI.

Link to comment
Share on other sites

ian.leslie,

Ok, don't take these terms literally, but CM is indeed still a Tactical Game in Nature. Womble & Paper are just saying that there are different levels of Tac AI within this Tactical Game.

-There is the Tactical AI: How troops react during combat ( Individuals, Teams, Squad ).

-Grand Tactical AI ( Strategic, Operational ): How any formation ( Team, Squad, Platoon, Co, etc, etc ) is going to be used in a Scenario by the designer ( When troops will be moved, Where they will be moved to, and How will they get there...the When, Where & How ).

Joe

Link to comment
Share on other sites

Can you expand on your use of words here. Specifically what do you mean by "Strategic" and "Operational". I do not use these words in the context of a CM battle because we are really way down at the tactical level when playing CM. That leads me to believe that we are not using those words the same way :)

Sounds excellent. Just what I am struggling with - the AI.

Yeah it is just trying to draw a distinction. For example.

"Strategic" would be the designers plan

at some point in the scenario he has the platoon use the Assault command

The actual assault move is something the AI does and he is labeling "operational"

The actual turn by turn reaction of the pixeltruppen would be the TAC AI.

The Assault command requires multiple elements. If you want to use it for a squad you have to split the squads first as the AI will not do that. (Something that I took a bit of help to learn.)

Link to comment
Share on other sites

The actual assault move is something the AI does and he is labeling "operational"

It is that third thing that is confusing me. I understand there is a tactical plan as laid out by the scenario designer and the Tac AI that controls each individual unit.

A third thing I don't get. And I still don't. @Paper Tiger could you elaborate? Which name are you using for the scenario's AI plan? What is the third thing you are referring to? Does @sburke have the definition correct? Is it about the scenario designer's choice of unit separation between AI groups?

Link to comment
Share on other sites

...I'm in the process of putting together a very detailed tutorial on how to create AI plans and what all the parameters do which I'll start posting after JonS finishes his Sheriff of Oosterbeek DAR.

That's great! I look forward to reading it and thank you very much!

Link to comment
Share on other sites

A third thing I don't get. And I still don't. @Paper Tiger could you elaborate? Which name are you using for the scenario's AI plan? What is the third thing you are referring to? Does @sburke have the definition correct? Is it about the scenario designer's choice of unit separation between AI groups?

These are the terms Steve, or whoever wrote the CMSF manual, used to define the three levels of AI:

The Computer opponent consists of three main sub-elements:

-the customizable "Scenario AI" which can be "programmed" by the Scenario Designer who determines the overall strategic goals as well as possible avenues of approach and is able to "script" certain behavior;

-the hard-coded Operational AI (OpsAI) that co-ordinates and assigns the orders to sub-units;

-and the hard-coded Tactical AI that controls the individual behaior of units and soldiers based on the assigned order and the situation that develops after the shooting starts.

From the CMSF manual p 36-37

From this, we can see that the player has total control over the first and limited control over the other two. I'll discuss each element in more detail when I start making these posts along with screenshots and a possible demo to show how they all work together. I don't particularly wish to dilute the effort at this stage. ;)

That's great! I look forward to reading it and thank you very much!

IMHO, it's scripting AI plans that is really holding the community back from creating missions. Scripting the AI is actually quite easy and is a lot of fun to do too. What I think is needed is a clear, step-by-step guide through the basics of scripting and then a couple of posts dealing with 'advanced techniques'.

Link to comment
Share on other sites

Maybe I should read the manual more... :D

What is the third thing you are referring to? Does @sburke have the definition correct? Is it about the scenario designer's choice of unit separation between AI groups?

That wasn't quite what I meant. The Assault command is one where the AI does the decision making about how the units move within the parameters you set for the length of the assault movement (incidentally it has been suggested to me to keep any leg with an assault movement short. For example you don't want to use that for a 300 meter stretch.)

To use an assault movement command you have to select a unit with multiple organizational elements. A squad is not a multi organizational element as the AI will not break down squads into teams. Typically it is used in scenarios with Platoons as the base unit. In order to use assault for a single squad unit, you have to start the scenario with a squad broken down, it can then use assault as it now does count as a multi organizational element. Just another example of how much more flexible a human player has things over the AI.

Either way, the AI will determine the order of movement of the specific individual elements whether they be squads in a platoon order, or teams in a squad order.

I'll leave this to PT as having a more comprehensive guide works so much better than individual hints.

Link to comment
Share on other sites

These are the terms Steve, or whoever wrote the CMSF manual, used to define the three levels of AI:

From the CMSF manual p 36-37

Well look at that, I found it on page 56-57 of the CMBN Game Manual.

So the "Scenario AI" script is translated into specific orders to the units by the operational layer and then the tacAI controls the units the same as it controls ours after we issue orders.

I understand. Can we call it the "Scenario AI script"? I read the manuals way back when I first got the game. Clearly some of it did not stick.

Having done some work with the Scenario AI scripting I can see that there needs to be something that translates those broad strokes into specific CM commands but I never though of it before. I am looking forward to learning more.

To get ready I should re-read the manual.

Link to comment
Share on other sites

Say what you will about the ai but it kicked my butt defending on a normal village setting. whoever set that map up did a good job as the ai was set to slaughter me just as i came over this ridge. I brought everything to gun even tried the flanks and it smeared me. I hate this game. lol good ai for me.

Link to comment
Share on other sites

Say what you will about the ai but it kicked my butt defending on a normal village setting. whoever set that map up did a good job as the ai was set to slaughter me just as i came over this ridge. I brought everything to gun even tried the flanks and it smeared me. I hate this game. lol good ai for me.

When it is timed right, yeah the AI has handed me my ass as well. This is one of the ongoing issues about player demand for more time in scenarios. More time for the player means the likelihood the AI plan will stand up just that much harder to achieve. Those players who insist on adding more time to existing scenarios need to look at the AI scripting and understand better what they are asking for. It is really difficult to achieve a challenging game if the AI plan has to be built over longer stretches of time.

A good AI plan is worth the feeling of being under time pressure. One of my favorite games against the AI was in Bad Day ay Beach Red. Just as I'd overcome the Italian initial defense line and launched my Rangers towards the next objective I ran head on into an Italian counterattack. Absolute mayhem and I loved every minute of it as I scrambled to hold the line and keep from getting over run.

Link to comment
Share on other sites

well these battles/skirmishes are an 1hr so I think that is plenty of time. I'd venture to say most skirmishes lasted only a few minutes anyways but those that lasted an hour or more were few and far between. I think there was a setting for an hour and a half but I was already beated by then.

Link to comment
Share on other sites

\

The Assault command requires multiple elements. If you want to use it for a squad you have to split the squads first as the AI will not do that. (Something that I took a bit of help to learn.)

I think I am actually incorrect on this statement. In designing the Venafro scenario I was working with existing teams and I believe that was why I could not use certain commands. The AI will allow the use of squads for an advance or assault command and divide the squad by it's components to execute the movement.

My bad... :o

Link to comment
Share on other sites

Thanks for the responses. I'm understanding better now how the AI works and why sometimes they send large formations to areas where they are not needed and camp.

I also now understand how assault command actually works. Keep in mind I never read the manual...

Thanks again!

Link to comment
Share on other sites

IMHO, it's scripting AI plans that is really holding the community back from creating missions.

For me, the biggest step forward would be greater scope for modding - assuming that Battlefront are not planning a major overhaul of the AI framework.

There is a mod for Arma2 https://docs.google.com/document/d/1cVRPr3YLfmM5TNl9-7sPmiKYstpje0i_X2N9lpvQ_1g/edit?pli=1 that essentially provides an in-mission AI commander. All the scenario creator has to do is lay down the AI units - or write a spawning script for randomization - and define the objectives. After that, the mod does the rest. It is very customizable - specific squads can be reserved for recon, the AI commander can be configured to prefer using covered approaches and combined arms attacks etc etc.

We are getting to the point, IMHO, where we have great graphics, great maps and great simulation, but without a dynamic AI opponent the game is crippled for those of us who don't want to play, or can't commit to, multi-player.

Link to comment
Share on other sites

Jock Tamson eh? You wouldn't be Scottish by any chance? :)

(-; indeed. But with a bit of Cumbrian, Welsh, Irish and Shetland. Which is probably why I'll be voting "no".

I would love the Battlefront games to get to a point where, when you suddenly have an hour spare, you can fire up a QB and get a surprising game out of the AI. Don't get me wrong, there have been many good scenarios over the years, but I'd like a more flexible, sandbox style framework for QB missions.

Link to comment
Share on other sites

I see what you mean about the ai and the designer because in my last battle whoever made it spread out his units all over the place and I made piecemeal of them one at a time basically. I guess it was suppose to be some kind of delaying action but it wasn't a very good 'random' battle with the ai on defense. Still like the challenge though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...