Thoughts on the Command AI and scenario design

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
User avatar
Mgellis
Posts: 2379
Joined: Sat Aug 18, 2007 2:45 pm
Contact:

Thoughts on the Command AI and scenario design

Post by Mgellis »

I've posted this in a couple of places, but I thought I would post it here, too, for anyone who might find my ideas useful.

I’ve been reading the discussions of Command’s artificial intelligence—or lack thereof—and I would like to offer some advice to scenario designers.

My thoughts are not based on any access to the code itself. They are based on my observations of how the game actually behaves.

Command: Modern Operations depends on the scenario designer to make the scenario challenging. Simply setting up two sides with different units will not result in a challenging scenario. The artificial intelligence is not meant to be a tactician.

Here’s what I think is the reason. The AI in Command: Modern Operations is not trying to solve problems. It is trying to follow orders. The game has a large library of options for how units will behave (e.g., where they go, the logic they follow when they decide if they should shoot at something, how many missiles they will fire at a certain target, etc.).

For example, if a computer-controlled side is told to send aircraft to patrol an area, and to shoot a certain number of missiles at a certain kind of target, it will do so and it will employ well-modeled tactics and military doctrine.

But I don’t think Command goes beyond its instructions (or, if it does, I think it is things like “if you have finished Task X, wander randomly within your predefined search area until you find something that might need to be killed”). It will follow instructions to send a group of aircraft on a mission. But it will not suddenly invent a new mission for those aircraft later on, like selecting a new loadout and a new set of targets, even if it would make a great deal of sense to do so. The game only does what the designer tells it to do. The instructions can be very detailed, but the game does not really go beyond them.

What all this means is that it is up to the scenario designer to create the tactics the game is going to follow. In a sense, Command is actually a “player vs player” game, but it’s asynchronous—the designer has created a tactical puzzle that the player has to solve later on. The AI is not creating new tactics on the fly. So, the scenario is only as good as the puzzle the designer has created for the player.

Every unit not controlled by the player has to be assigned to a mission and/or given a specific doctrine to follow. Often, this will not be very elaborate. The “mission” might be to cruise from point A to point B. Or to conduct an ASW patrol within a particular area. The doctrine might be “sit quietly and keep your radars off but you may fire at any hostile unit that visibly comes into range.” Or it might involve a very detailed WRA allowing the unit to attack only a certain kind of target.

This is, I think, a key point in scenario design. All units not controlled by the player must be given instructions (doctrine, mission, etc.) and those instructions should be tested to make sure the game does what the designer wants it to do. This will usually not be especially burdensome, but it is something scenarios designers need to keep in mind. Designers should not expect the AI to “help them out” by making the scenario smarter than it already is. This is not what the AI in Command does, I think; it is designed to make sure any instructions are followed properly (which may include choosing between certain options in certain situations, randomly generating courses to follow, etc.). It is the designer who must provide instructions in the first place.

It can also be very useful to make missions small and specific. Instead of telling five submarines to patrol a large area, for example, it can be more effective to create five separate missions, each one for one of the submarines, and each one limited to a particular patrol area. Or, instead of sending an entire squadron of aircraft on a bombing mission, it can be more effective to break the squadron into four or six flights and create a mission with its own specific targets and behaviors for each of those flights. (Giving a separate mission to each aircraft may achieve diminishing returns, but there is no harm in trying it out and seeing what happens.) The more details you give to Command, the more it can do for you.

In any event, I hope all this helps. I hope it encourages and inspires people to write more scenarios for Command.
thewood1
Posts: 10119
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Thoughts on the Command AI and scenario design

Post by thewood1 »

"make missions small and specific"

This has been my mantra almost since CMNAO 1.0. You can see just in the tech forum all the unanticipated things that can happen if you toss 20 aircraft into a mission and just tell them, "go bomb that".
DWReese
Posts: 2461
Joined: Fri Mar 21, 2014 11:40 am
Location: Miami, Florida

Re: Thoughts on the Command AI and scenario design

Post by DWReese »

The larger the scenario, the more broad the focus.

Since the AI side of the scenario has to be programmed with "smaller missions", it's easy to see that as the scenario expands, the focus becomes less clear.

IMO, scenarios are best when they only represent a specific segment of an unseen, but understood, larger and evolving situation. The game player has knowledge of the "big picture" but is presented with a specific situation that he must handle in order for this portion of the overall war to be successful involving a limited amount of units to accomplish a specific goal. To me, these are the more realistic, and manageable scenarios.
User avatar
Mgellis
Posts: 2379
Joined: Sat Aug 18, 2007 2:45 pm
Contact:

Re: Thoughts on the Command AI and scenario design

Post by Mgellis »

It took me a long time to learn this lesson.
thewood1 wrote: Sun Sep 14, 2025 10:47 pm "make missions small and specific"

This has been my mantra almost since CMNAO 1.0. You can see just in the tech forum all the unanticipated things that can happen if you toss 20 aircraft into a mission and just tell them, "go bomb that".
User avatar
SunlitZelkova
Posts: 377
Joined: Tue Mar 06, 2018 11:49 pm
Location: Portland, USA

Re: Thoughts on the Command AI and scenario design

Post by SunlitZelkova »

The only instance I have found where a big mission can be useful is in a very narrow type of land strike mission involving large numbers of an identical weapon against many different facilities.

Take a CJ-10 cruise missile strike on an air base 2,000 nautical miles away. So long as the WRA is properly set up, an entire regiment of H-6 bombers can be added to a single mission and they will properly distribute the missiles across all of the targets. No need to set up separate missions for separate classes of target (as I probably would do if I was using multiple different kinds of weapons; some with dumb bombs, some with cruise missiles, etc.).

There is still a limit on this though. If there are multiple regiments, I'll still make separate missions for each air base, because usually that kind of big, long-range strike also involves a time-on-target element and using the Operations Planner to coordinate that requires separate missions to take into account differing distances from the target.
"One must not consider the individual objects without the whole."- Generalleutnant Gerhard von Scharnhorst, Royal Prussian Army
BDukes
Posts: 2685
Joined: Wed Dec 27, 2017 12:59 pm

Re: Thoughts on the Command AI and scenario design

Post by BDukes »

Great string, thanks!

Only things I'd add:

You can chain missions together with conditional logic in Lua and now the editor interfaces. My experience is mostly with the former. I wouldn't go into reading the tea leaves and designing your matrix too far in the future but enough to make things interesting and sensible.

Test the AI missions. If your scenario is huge, test outside of it in a separate smaller scenario. The export functions really help to make this manageable. The mission work or they don't. It is not usually murky. You don't need rules pounded into stone or tacked to somebody's door.

Be a student of the craft. There are people who don't post on forums or youtube, but do great work. Look at how they do things, lift their code, and experiment with their methods. There are a couple of really good scenarios from people on the other side of the planet from me that aren't self-promoters.

Mike
Don't call it a comeback...
thewood1
Posts: 10119
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Thoughts on the Command AI and scenario design

Post by thewood1 »

"Look at how they do things, lift their code, and experiment with their methods"

Best advice on this thread. There are a lot of people smarter than me and experts on lua that can pave the way for good logic and ideas.

My only other comment is keep it simple, especially starting out. I see a lot of lua code suggestions thrown around and find a good number of them can be done through events, ops manager, and mission activation/deactivation. While lua is incredibly powerful, it requires knowledge and discipline to make sustainably useful.
Post Reply

Return to “Command: Modern Operations series”