Strategic Command Blog Post #2: 'Artificial Intelligence'

Thoughts from the dev team on Strategic Command's features.
Daniele
Posts: 1797
Joined: Sat Feb 07, 2015 2:27 am

Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Daniele »

[center]Image[/center]

In 2002, the original Strategic Command game was a relatively simple construct. With a limited rule set and a much smaller 62x37 map of approximately 2300 hexes, the requirements for the AI were not necessarily trivial, but in general terms, they were straightforward.

Fast forward to today, and Strategic Command WWII: War in Europe has been expanded into a modifiable hexagonal game engine allowing map sizes of up to 512x512 or 262,144 hexes!

Quality vs. Speed
[center]Image[/center]

While it is simpler to have the AI identify targets, calculate optimal results and movement paths on smaller maps, any inefficient AI algorithms can unfortunately reveal themselves to be serious time wasting problems once the map grows up to 100 times larger. Often, the only solution to these problems is a sacrifice in AI quality in order to improve the duration or calculation speed of each AI turn.

While some sacrifices invariably need to be made, a significant reduction in AI quality was never on our acceptable radar. This ultimately led to an overhaul and rethink of the Strategic Command WWII: War in Europe AI in order to address the issue of quality vs. speed.

[center]Read the full entry here[/center]
User avatar
EwaldvonKleist
Posts: 2374
Joined: Thu Apr 14, 2016 3:58 pm
Location: Berlin, Germany

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EwaldvonKleist »

Thx very interesting
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EdwinP »

Question: Can the AI production, offensive and research plans be linked to a specific Tech Level or a number of spotted enemy units?

If you have rockets 3 tech give higher priority to building rockets, if you have bomber tech 3 give higher priority to building bombers?
If enemy has 5 bombers does the AI give higher priority to researching AA or producing Fighters to intercept them?
If the Axis has built lots of subs can the AI be told to give higher priority to anti-sub research?
If the Axis subs are destroyed does the AI switch to a different production/research plan that does not build destroyers or invests in anti-sub research?




n0kn0k
Posts: 490
Joined: Fri Jun 22, 2007 10:59 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by n0kn0k »

Nice blog!
TSPC37730
Posts: 14
Joined: Mon Jul 25, 2016 8:32 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by TSPC37730 »

Sounds very encouraging. More to look forward to!

The ultimate proof, however, will be in the game play...
Capitaine
Posts: 1028
Joined: Tue Jan 15, 2002 10:00 am

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Capitaine »

Good stuff! Pleased that Fury is also focused on a top notch AI which makes or breaks a single-player game.
User avatar
Hubert Cater
Posts: 5875
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Hubert Cater »

ORIGINAL: EdwinP

Question: Can the AI production, offensive and research plans be linked to a specific Tech Level or a number of spotted enemy units?

If you have rockets 3 tech give higher priority to building rockets, if you have bomber tech 3 give higher priority to building bombers?
If enemy has 5 bombers does the AI give higher priority to researching AA or producing Fighters to intercept them?
If the Axis has built lots of subs can the AI be told to give higher priority to anti-sub research?
If the Axis subs are destroyed does the AI switch to a different production/research plan that does not build destroyers or invests in anti-sub research?

Hi Edwin,

Unfortunately none of this is currently possible as it would require a more extensive rewrite of the script system and another level of complication in the design.

That being said it is not to say these types of situations are not on our minds when it comes to AI development, but rather that there are other mechanisms we already have in place that can bring us pretty close to the desired results without overcomplication, i.e. dozens of AI planning trees etc.

For example, we can have the AI go into a coordinated research and production path by linking scripts together and we can "force" the AI to make specific research investments and/or unit purchases if desired. Let's say we want the German AI to pursue an advanced sub program then we can coordinate several forced scripts of advanced sub research and submarine unit purchases.

In this case it is more directional versus reactionary, but we can have the AI consider suspending such a program under the right conditions, such as when the game map situation no longer favors the Germans, so there is a bit of reactionary scripting already possible.

Granted not quite as fine tuned as you've listed above,
Hubert
Ironclad
Posts: 1934
Joined: Wed Nov 22, 2006 1:35 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Ironclad »

This looks very impressive, although I'm going to have to read it a few times to fully take it in. Does it mean that the difficulty levels can be linked to more sophisticated criteria than the usual extra or less resources even if its still described in percentage change terms?
User avatar
Hubert Cater
Posts: 5875
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Hubert Cater »

Difficulty levels can indeed be linked to specific scripts and we could have the AI only perform certain actions at the hardest levels and skip them at the easier settings. At the moment this is currently limited as we wanted to have the AI perform as well as it could for any difficulty level chosen with the exception of some EVENT scripts that are AI only such as UNIT bonus events and so on.

Part of the reason for this is that once we are finished testing and are happy with the AI it is easy enough to turn scripts on/off or to make more specific difficulty level associations as needed.
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EdwinP »

ORIGINAL: Hubert Cater

Hi Edwin,

Unfortunately none of this is currently possible as it would require a more extensive rewrite of the script system and another level of complication in the design.
Thanks for the update and your comments on a directed vs reactive AI.
I assume that there is no research bonus script for the AI; i.e. IF Global Variable is (91-00) give AI 1 Bonus Research Chit in Submarine Warfare. You could edit the AI script to place Sub research at the top and give it 100% (provided that the AI did not spend its MPPs on something else first).

That said, with the new long ranges transports, it may be easier to surprise a Human Axis player with landings in North Africa followed by landings in Italy or Southern France. Perhaps even an occasional (25%) coordinated Channel and Southern France or Italian invasion? From the screen images appears that the AI will do a much better job of protecting Allied transports.

I can imagine that if the AI has naval superiority in the Atlantic (no Enemy naval units within x tiles of y), the AI could send naval units to the Med if the Italian navy is still afloat. Or perhaps, early in the war the AI's priority is to sink Axis naval forces in the Med; to forestall Axis activity in North Africa, after these forces are sunk most Allied naval units return to the North Atlantic.





User avatar
Granfali
Posts: 1388
Joined: Mon Nov 06, 2006 2:17 pm
Location: Spain
Contact:

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Granfali »

Traducido al español. [;)]

tm.asp?m=4133202
roughseas
Posts: 1
Joined: Sat Aug 13, 2016 2:02 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by roughseas »

Plans for MAC OS?
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EdwinP »

Hubert,

Are there any changes in how are air units are allocated to offensive Plans in SC3? In particular, I am thinking of an Axis offensive for Alexandria, Egypt while USSR is neutral.
StrategyGamer
Posts: 39
Joined: Tue Nov 24, 2015 11:13 pm
Location: United States of America

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by StrategyGamer »

I've never seen an AI that good!
I'm can't wait to die within turns [:D]
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EdwinP »

I am most impressed by the improvements in the amphibious invasion execution,not only screening units for when transports are crossing the Atlantic but also the screening of the north and southern ends of the English Channel to protect the invasion fleet. In SC1/SC2 a human player could deal havoc with the transports. In SC3 the human player will have to rethink its strategy for the Western front.

Do you try to stop D-Day from the sea and/or from the air? Looking forward to the strategies that players will develop.

Stop from the Sea - Use Subs to sink the invasion fleet, requires investment in sub tech and subs
Stop from the Air - Use Long Range Bombers to sink the transports. Requires fighters to escort the bombers.
Stop from the Sea and Air - Use both Subs and Bombers to sink the transports - Expensive in terms of MPPs.

When playing as the Allied player it will be interesting to see whether the Axis AI always follows the same strategy in the Eastern and Western fronts, and whether the mix of combat units it chooses to produce is always the same.

When I modded the SC2 Axis AI years ago, I usually gave it 2-3 bonus units to mix things to add some variety; 20% (2 Bombers) or 20% (3 subs) or 20% (2 rockets) or 20% (2 tanks) or 20% (4 infantry) and I linked the research script to the bonus units. If the Axis AI received 2 bonus rockets it was more likely to research rocket tech, if the AI received bonus subs it was more likely to research subs. The one thing that the research script lacked was an option to halt research if no units of that type existed; i.e. do not research subs if you have no subs, do not research rockets if you have no rockets. I worked around this by having the linked scripts run for only a limited time, before returning to the more general research script.

The other mod that I added was new Axis AI offensive, production and research scripts that executed if Russia surrendered.
The AI had a 50% to follow either a 1) conquer England last strategy (after attacking and conquering all other countries (Turkey, Iraq, Iran, Egypt, Vichy France, Spain, Portugal and Sweden) or a 2) invade England first strategy.
User avatar
Hubert Cater
Posts: 5875
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by Hubert Cater »

ORIGINAL: EdwinP

Hubert,

Are there any changes in how are air units are allocated to offensive Plans in SC3? In particular, I am thinking of an Axis offensive for Alexandria, Egypt while USSR is neutral.

There is no direct scripting for this, (although this is on my list for down the road as well as evacuating air from abandoned theaters) but the handling is now improved for these secondary units to better balance them out between offensive plans.
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EdwinP »

Thank you. Evacuating air units from abandoned theaters would be most helpful.

In particular, I would like to be able to base Air Units in Western Europe based on AA tech, i.e. If AA Tech > 3 then lower priority for air units in France unless X condition is met. The reasoning is that the AA tech will damage the attacking bombers so that Axis air units can be safely allocated to the Russian front without risking massive losses to production.

PS: I would really like to see the AI have a chance to go for a strategic bombing campaign against Germany. Research LR and build bombers. Being able to have a tech level requirement in the production script would be most useful. I.e. If I have Long Range >=3 tech, I want to execute a plan that gives priority to building strategic bombers. IF LR tech is 0, I would assign strategic bombers a lower priority.
aaatoysandmore
Posts: 2846
Joined: Wed Sep 11, 2013 1:35 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by aaatoysandmore »

ORIGINAL: StrategyGamer

I've never seen an AI that good!
I'm can't wait to die within turns [:D]

Lol you won't see it here either. The hype of the AI has long since lasted longer than playing the game of said ai.

I'm from Missouri. When I see it happen I'll believe it but not until then. Been around 40+ years at this and haven't seen one yet that was really good. Only War of the Lance and Centurion Defender of Rome came close.
James Taylor
Posts: 677
Joined: Fri Feb 08, 2002 10:00 am
Location: Corpus Christi, Texas
Contact:

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by James Taylor »

If you can shy away from the "trap setting" maneuver, the AI in SC can usually give you good accounting of itself.

Like you said, we'll see!
SeaMonkey
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic Command Blog Post #2: 'Artificial Intelligence'

Post by EdwinP »

The system is now robust and running well enough, that any custom tactical level designed scenario (i.e. a land only map with preset objectives for each side) can be run through the game engine without the need of any further AI scripting or guides from the designer. The AI will identify the applicable objectives and dynamically assign itself to either offensive or defensive planning on a per turn basis as it will fully reassess after each turn. Tactical combat, as noted above, will also be fully handled by the AI with no further guide necessary from the designer as well.

One scenario that I am planning to write is a simple Blue vs Red scenario that can be completed within a few hours by two players. Similar to the Avalon Hill Blitzkrieg or Kreigspeil games from the 1970's. Two major powers, several minor nations whose leanings are selected randomly at game start. An equal starting pool of MPPs and units to get the game started.
Post Reply

Return to “Developer Blog”