Strategic AI

Fury Games has now signed with Matrix Games, and we are working together on the next Strategic Command. Will use the Slitherine PBEM++ server for asynchronous multi-player.

Moderators: MOD_Strategic_Command_3, Fury Software

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

Strategic AI

Post by EdwinP »

Will SC3 have an AI that chooses between different strategies; i.e. Axis: Britain first (Sea Lion - 20% GV1(1,20)), Russia (60% GV1(21,80)), or a North Africa/Middle East focus(20%(GV1(81,100))?

Will it have a strategic AI that reinforces success and changes strategy if needed?

Example: If the Axis AI selects a North Africa/Middle East Strategy (20%) does it 1) focus on a traditional move along the North Africa coast towards Egypt or 2) focus diplomacy on Turkey to secure a land bridge to the Middle East and if successful it moves south from Turkey to Egypt. Or 3) does the Axis AI secure Spain (via Force or Diplomacy) and Portugal to take Gibraltar before moving on to conquer North Africa and Egypt?

Example: If UK is lightly defended, does the Axis AI attempt a Sea Lion invasion of the British Isles or do they ignore GB to focus on Russia or North Africa? With a Sea Lion Focus (20%) the AI would select a different research and production strategy (this would need to be extensively tested) that would focus on air power, rockets and wolf packs to support the invasion. After Britain falls the AI would switch to a production & research strategy better suited for the campaign against Russia.

What if the Axis AI had a 20% (GV1(1,20)) to select Sea Lion as their strategic focus? If so, then in one out of five games the player would encounter a dramatically different operational threat. If,during the prior games the human Allied player left the UK undefended to focus on defeating the Axis in the Med without any consequences, they would be very surprised by an Axis invasion of Britain.

Likewise, if the Axis AI focused on North Africa and Egypt after France falls (20%) a strong push into North Africa would surprise a human player that expected only the limited forces that the AI usually assigns to the North Africa front.

If the AI selects the Russian focus strategy (the historical strategy) does it follow history or does it seek to draw Turkey into the Axis Alliance via Diplomacy. This lengthens Russia's front and weakens Russian defenses.
User avatar
Hairog
Posts: 1587
Joined: Tue Jul 11, 2000 8:00 am
Location: Cornucopia, WI

RE: Strategic AI

Post by Hairog »

Good ideas EdwinP
WW III 1946 Books
SC3 EAW WW Three 1946 Mod and Naval Mods
WarPlan and WarPlan Pac Alpha and Be
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic AI

Post by EdwinP »

Operation Felix - "In 1940, the Nazis, smarting from their failure to pave the way for the invasion of Britain by destroying the Royal Air Force, hatched a plan to take the British stronghold of Gibraltar. By seizing Gibraltar, located at the tip of the Iberian Peninsula, Germany could prevent the Royal Navy from operating in the Mediterranean and completely cut off Britain’s supply lines from the Suez Canal. They would try to starve the British into surrender."

Code-named Operation Felix, the invasion required sending German troops into neutral Spain. Top government officials between the two sides held a series of discussions on the proposal. Adolf Hitler even personally asked Spanish dictator Francisco Franco for his support. Franco ultimately turned him down, since the arrival of German troops would mean Spain entering the war on Germany’s side. He was more afraid of a British invasion than he was of the Fuhrer. Hitler would continue to consider Operation Felix even after his forces had invaded the Soviet Union in 1941." - Source: Listverse

SC3 Notes: If the AI selects the Optional Felix Option it could choose between two 2 strategies: 1) Invasion of Spain or 2) Diplomatic Campaign vs Spain. A German invasion of Spain forsakes Spain as an Ally while the "timely" success of a diplomatic campaign is less predictable. When I created a mod with a script for an German invasion of Spain in SC2; a long ways back, I found that it worked best if the attack across the Pyrenees was supported by amphibious landings along the Eastern coast of Spain.


Operation Sea Lion - "Hitler also planned to invade Great Britain after defeating France. Operation Seelowe (German for Sea Lion) would have mobilized 160,000 German soldiers aboard 2,000 barges to cross the English Channel. However, his generals were afraid of the British Royal Navy and Air Force and argued that air superiority should be established first. The Luftwaffe tried to destroy the RAF in a series of aerial battles over a three-month period which came to be known as the Battle of Britain. The British decisively beat the Germans back and the invasion was canceled indefinitely. This major setback influenced Hitler to go east toward the Soviet Union." - Source Listverse

SC3 Notes: Writing Scripts for an AI Sea Lion - with a reasonable chance of success - will probably be the most difficult as it will require different Production, Research and Build Scripts, and maybe a decision event to give the player a choice between receiving 1 sub unit or 1 corps unit to reflect a choice of prewar production decisions. The larger map in SC3 will make a Sea Lion invasion easier as the defenders cannot be everywhere at once.
Ason
Posts: 361
Joined: Fri Nov 29, 2013 11:14 am

RE: Strategic AI

Post by Ason »

There's no point in writing here, I doubt the devs ever check this forum... I think the suggestion is nice though, would be nice to have these things optional, like you can turn it on in the settings when starting a game, having "historical mode" and this "alternative strategies mode". Sometimes it's nice to have the AI follow historical events, but it would be really refreshing to have this option when you're tired of "historical mode".
pzgndr
Posts: 3486
Joined: Thu Mar 18, 2004 12:51 am
Location: Maryland

RE: Strategic AI

Post by pzgndr »

ORIGINAL: Mrslobodan

There's no point in writing here, I doubt the devs ever check this forum...

Incorrect.
Bill Macon
Empires in Arms Developer
Strategic Command Developer
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic AI

Post by EdwinP »

The SC series has (or had?) 10 global variables (GV) that can serve as triggers for scripts. Each GV is assigned a random value of 1 to 100.

GV1(1,20) Sea Lion Focus - Major Effort to Invade the UK
-- Note: May require special production/research/diplomacy scripts with "Zero" spending to ensure that MPPs are available to pay for amphibious movement and transport movement of many units for a UK invasion.

GV1(21,80)Russia First Focus
GV1(21,30) France > Spain > Russia - Axis conquers Spain to weaken Allied access to the Mediterranean Sea, before preparing to attack Russia. (Weak Axis effort in North Africa)
GV1(26,40) France > Sea Lion "if" UK is undefended)> Russia (10% to trigger, may lure the Human player into leaving the UK undefended)
GV1(41,50) France > Diplomacy vs Turkey > Russia. Axis AI invests in Diplomacy vs Turkey.May require custom production and research scripts to ensure that MPPs are available for Diplomacy Purchase. Ideally the Axis purchases 2 chits.
Note: If Turkey joins Axis, offensive scripts are needed to take advantage of this.
GV1(51,80) France > Russia (Weak Axis effort in North Africa)

GV1(81,100) North Africa Focus (Strong Axis effort in North Africa)
GV1(81,85) France > Spain via Invasion > North Africa (5%)
GV1(86,90) France > Spain Via Events (Vichy France: No and Military Concessions to Spain: Yes)> North Africa (5%).
GV1(81,100) France > North Africa (10%)
User avatar
Happycat
Posts: 157
Joined: Mon Oct 23, 2006 10:45 pm

RE: Strategic AI

Post by Happycat »

ORIGINAL: Mrslobodan

There's no point in writing here, I doubt the devs ever check this forum... I think the suggestion is nice though, would be nice to have these things optional, like you can turn it on in the settings when starting a game, having "historical mode" and this "alternative strategies mode". Sometimes it's nice to have the AI follow historical events, but it would be really refreshing to have this option when you're tired of "historical mode".

Closed beta has just begun today. The threads on Matrix are being looked at, and while I can't answer the specific question regarding alternative strategies, I can at least assure everyone the forum is being looked at by devs and moderators.

Thanks all for your interest in and enthusiasm for SC3
Chance favours the prepared mind
User avatar
Hubert Cater
Posts: 5862
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic AI

Post by Hubert Cater »

Hi Edwin [:)]

Great to see you again in the forums and I can definitely say that the idea of an AI that would focus and choose from multiple grand strategies is still on my radar, I haven't forgotten [8D]

What I can say so far (for this release) is that the primary goal has been to improve the overall AI first and foremost, which meant improving the target logic, aggressiveness, attacking order in order to maximize defender casualties, calculation speed as the map and number of units has grown quite a bit, and the flexibility of the scripts for added options and so on.

We've spent some time on this and the results have great so far, especially combined with some of the new rules that the AI takes full advantage of, and I think players will be quite pleased.

At the moment the AI does employ a few optional strategies, but nothing quite as diverse as what you've described above just yet. Primarily because in the past, most of the non historical strategies tended to be a bit riskier and if the AI fails, then it can fail miserably and the resulting feedback was that the AI was not very good. That is something that has unfortunately always held us back from employing more diverse strategies as we've always wanted the AI to be the best that it can be.

However, Mrslobodan is correct in the sense that if we introduce the option for a player to have the AI play in an "alternative strategies" mode, then this would be a known choice (or selection) with the understanding that the AI may make some bold moves that may or may not work out, as opposed to what in the past always came across as simply a bad play on the part of the AI.

The good news is that this is still on my priority list and it all comes down to the time available as we near release.

Hubert
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic AI

Post by EdwinP »

Thanks for the update Hubert.

Looking forward to the improvements in the AI and scripting flexibility. After SC3 is released I will make the time to try my hand again at writing a good AI script for one of the options above. When I scripted an AI invasion of Spain (SC2) it took several weekends to get it just right so that Spain would fall quickly followed by the Rock.

A few suggestions:[;)]
Air Movement script to focus air units on a specific front. When I tried scripting an SC2 Strong North Africa Invasion a long ways back it was hit or miss whether the AI sent the Air units needed to break the British lines or destroy British supply.

Example 1: A successful Sea Lion really needs all the Axis Air Units in France (and not blocking loading tiles for transports).
Example 2: Axis AI sends 4 air units to Libya, then prior to launching war against Russia it moves the air units back to Germany.
Example 3: Axis AI sends 1 strategic bombers and 2 fighters to Libya to bomb UK supply sources in Egypt.

Unit Type Max for the Production script would be useful. This is so that the AI does not produce more than X number of Type Y units.

Example: I want an AI to pursue a stronger naval strategy vs the UK, but I don't want it to have more than 5 subs in service until Moscow Falls. I could give the Sub criteria a higher % knowing that it will not build more than 5 units.
---- #SUB=50 [2] [5] where the [5] is the maximum number of subs in play. If there are 5 or more active sub units, more subs will not be purchased. Thus freeing MPPs for other uses.
---- #CORPS= 25 [2] [100] where the AI can build as many as 100 corps.

QuantityCheck Criteria in Scripts
Likewise, the SC2 AI scripting did not respond to enemy strategic bombers or subs - i.e. If I as a human build a strong air force the AI will not build #Anti-Air. Nor can the AI respond to a strong Axis naval threat. A conditional criteria that controls the purchase script execution would be useful.
Example: ThreatCheck= [Axis][Subs][7]- i.e. if Spotted 7 or more active Axis Subs execute this script (I.e. research Anti-Sub and build Destroyers).
Example: ThreatCheck= [Axis][Strategic_Bombers][3] i.e. if Axis has 3 or more active strategic bombers execute this scripts with a greater chance to research and build Anti-Air.

TechCheck Condition in Scripts
Example: If Axis Subs Tech Level is >3 and Axis has > X number of spotted active Subs, Allied AI scripts that applies a priority to researching Anti-Sub should be higher.
Example: If Allied Anti-Sub is > 3 then Axis AI should choose between Script 1:not building any subs or Script 2: Researching Subs.
Example: If Axis AI has rockets level 3 the Axis AI builds rockets. If Axis AI has rockets level 0 the Axis AI does not build rockets

Diplomacy Priority script that executes prior to the other scripts would be useful for when you really want the AI to spend MPPS on diplomacy.

Air Superiority Condition in Scripts - allows a script to activate if the AI has a specified number of Air Units or Rockets within X tiles of a specified tile. If the number of Air Units falls below this the script is canceled.

Example: Launch Sea Lion is Axis has 4 or more air units (Fighters, Tactical Bomber, Strategic Bombers, Rockets) within 7 tiles of London or attached to the Sea Lion Offensive.

AirPriority - Assigns Air Fleets to Offensive Scripts based on their priority.
OR AirAttached - Assign specified number of air units to this offensive.

Research Event Script would also be useful. Could give AI a bonus in the research area.

Example:
#AI = 1 (Axis AI only)
#LEVEL = 4 (Advanced)
GV2= [1,20] (Rocket Focus)
#ROCKETS = 1 [1] (where [1] is a bonus level and [2] is a bonus chit)

i.e.
#ROCKETS = 1 [2] - AI receives 1 bonus research chit in Rockets
#ROCKETS = 1 [1] - AI gains 1 tech level in Rockets research




Looking forward to SC3.

Edwin
snowstorm
Posts: 26
Joined: Wed Feb 27, 2013 11:09 pm

RE: Strategic AI

Post by snowstorm »

Closed beta has begun? [X(]
Where do I sign up??? [:D]
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic AI

Post by EdwinP »

At the moment the AI does employ a few optional strategies, but nothing quite as diverse as what you've described above just yet. Primarily because in the past, most of the non historical strategies tended to be a bit riskier and if the AI fails, then it can fail miserably and the resulting feedback was that the AI was not very good. That is something that has unfortunately always held us back from employing more diverse strategies as we've always wanted the AI to be the best that it can be.

Agreed.

With an air movement script (to move 1 Strategic Bomber and 2 Air Fleets) and a UnitCondition (I.e. at least 1 Strategic Bomber is available) to Libya the AI is more likely execute a serious threat to Egypt. Why? The British units can be broken if the Axis AI can degrade/destroy their supply resources.

Thus.
Move [1,2] (Min,Max) German Strategic Bomber and [2,3] Fighters to Libya If 1 German Strategic Bomber Unit is active and Allied Anti-Air is <=1.
Transport 4 German units to Libya if 1 Strategic Bomber Unit is active and Allied Anti-Air is <=1.
Major Offensive to Take Cairo can succeed if the AI Offensive uses the air units (especially the Strategic Bomber).
solipsismMatrix
Posts: 55
Joined: Fri Dec 13, 2013 4:34 pm

RE: Strategic AI

Post by solipsismMatrix »

ORIGINAL: snowstorm

Closed beta has begun? [X(]
Where do I sign up??? [:D]
I think "closed" is the key word here.

Having said that, great news, and thanks to Fury Software for the update. It's a significant milestone.
snowstorm
Posts: 26
Joined: Wed Feb 27, 2013 11:09 pm

RE: Strategic AI

Post by snowstorm »

Not necessarily so. I am currently beta testing another Slitherine game that is also closed beta, but you can still sign up. Perhaps SC 3 is doing things differently? I don't know.
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Strategic AI

Post by EdwinP »

In Sc2 there is an AI unit script where Rommel and his units appear in the area of Tripoli.

It really changes the game for an Allied player if these units have a chance to appear in Germany - i.e. the Axis AI decides not to contest North Africa. The British have an easier time conquering North Africa but the Russians face a much stronger German offense.

The OOB is not changed, just the deployment orders.

Example:

GV2(1,50) - Rommel and his Afrika units appear in North Africa (50%) - Popup: Rommel arrives in North Africa
GV2(51,100) - Rommel and his Afrika units are assigned to the Eastern Front (50%) - Popup: Rommel takes charge of Eastern Front.

Though I have not tried this yet, another game changing option would be to take the MPPS for the Rommel units and use them in a different way. The MPP allocation is the same while the purchased units are different.

Example:

GV2(1,50) - Rommel and his Afrika units appear in North Africa (50%) - Popup: Rommel arrives in North Africa
GV2(51,75) - Rommel and his Afrika units are assigned to the Eastern Front (25%) - Popup: Rommel takes charge of Eastern Front.
GV2(76,100) - Funds went to the Navy Sub program instead of the Army(25%)- Popup: Rommel takes charge of Eastern Front (misleads human player). Germany receives Rommel HQ unit and Subs instead of Afrika ground units. Same MPP value, just different units. This really changes the US and UK build and research strategy. This option could be improved with an Event Script for Research that would allow a portion of the MPPS from the original unit OOB to be used for bonus chit in Submarine Warfare.
User avatar
xwormwood
Posts: 898
Joined: Mon Aug 28, 2000 8:00 am
Location: Bremen, Germany

RE: Strategic AI

Post by xwormwood »

I guess the Africa Korp and Rommel are only a working combination within Africa.
If the units of the Afrika Korps would have been assigned to the Eastern front instead, than they would have probably be assigned to a different General as well.
Would be a very nice penalty for abandoning Africa, too.
"You will be dead, so long as you refuse to die" (George MacDonald)
User avatar
Hubert Cater
Posts: 5862
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic AI

Post by Hubert Cater »

ORIGINAL: EdwinP

Thanks for the update Hubert.

Looking forward to the improvements in the AI and scripting flexibility. After SC3 is released I will make the time to try my hand again at writing a good AI script for one of the options above. When I scripted an AI invasion of Spain (SC2) it took several weekends to get it just right so that Spain would fall quickly followed by the Rock.

A few suggestions:[;)]
Air Movement script to focus air units on a specific front. When I tried scripting an SC2 Strong North Africa Invasion a long ways back it was hit or miss whether the AI sent the Air units needed to break the British lines or destroy British supply.

Example 1: A successful Sea Lion really needs all the Axis Air Units in France (and not blocking loading tiles for transports).
Example 2: Axis AI sends 4 air units to Libya, then prior to launching war against Russia it moves the air units back to Germany.
Example 3: Axis AI sends 1 strategic bombers and 2 fighters to Libya to bomb UK supply sources in Egypt.

Unit Type Max for the Production script would be useful. This is so that the AI does not produce more than X number of Type Y units.

Example: I want an AI to pursue a stronger naval strategy vs the UK, but I don't want it to have more than 5 subs in service until Moscow Falls. I could give the Sub criteria a higher % knowing that it will not build more than 5 units.
---- #SUB=50 [2] [5] where the [5] is the maximum number of subs in play. If there are 5 or more active sub units, more subs will not be purchased. Thus freeing MPPs for other uses.
---- #CORPS= 25 [2] [100] where the AI can build as many as 100 corps.

QuantityCheck Criteria in Scripts
Likewise, the SC2 AI scripting did not respond to enemy strategic bombers or subs - i.e. If I as a human build a strong air force the AI will not build #Anti-Air. Nor can the AI respond to a strong Axis naval threat. A conditional criteria that controls the purchase script execution would be useful.
Example: ThreatCheck= [Axis][Subs][7]- i.e. if Spotted 7 or more active Axis Subs execute this script (I.e. research Anti-Sub and build Destroyers).
Example: ThreatCheck= [Axis][Strategic_Bombers][3] i.e. if Axis has 3 or more active strategic bombers execute this scripts with a greater chance to research and build Anti-Air.

TechCheck Condition in Scripts
Example: If Axis Subs Tech Level is >3 and Axis has > X number of spotted active Subs, Allied AI scripts that applies a priority to researching Anti-Sub should be higher.
Example: If Allied Anti-Sub is > 3 then Axis AI should choose between Script 1:not building any subs or Script 2: Researching Subs.
Example: If Axis AI has rockets level 3 the Axis AI builds rockets. If Axis AI has rockets level 0 the Axis AI does not build rockets

Diplomacy Priority script that executes prior to the other scripts would be useful for when you really want the AI to spend MPPS on diplomacy.

Air Superiority Condition in Scripts - allows a script to activate if the AI has a specified number of Air Units or Rockets within X tiles of a specified tile. If the number of Air Units falls below this the script is canceled.

Example: Launch Sea Lion is Axis has 4 or more air units (Fighters, Tactical Bomber, Strategic Bombers, Rockets) within 7 tiles of London or attached to the Sea Lion Offensive.

AirPriority - Assigns Air Fleets to Offensive Scripts based on their priority.
OR AirAttached - Assign specified number of air units to this offensive.

Research Event Script would also be useful. Could give AI a bonus in the research area.

Example:
#AI = 1 (Axis AI only)
#LEVEL = 4 (Advanced)
GV2= [1,20] (Rocket Focus)
#ROCKETS = 1 [1] (where [1] is a bonus level and [2] is a bonus chit)

i.e.
#ROCKETS = 1 [2] - AI receives 1 bonus research chit in Rockets
#ROCKETS = 1 [1] - AI gains 1 tech level in Rockets research




Looking forward to SC3.

Edwin

Much of this is possible now (granted not all) through some of the script changes and just through some engine changes. For example, you can now set certain scripts like a particular Diplomacy script to be forced upon the AI and then you can tie that in with other applicable scripts linked to that idea and so on.

While we don't have an air movement script, the engine does now do a better job of splitting up air units to the various active plans and so on.

Making use of AI exclusion positions also helps and keeps the AI focused on certain objectives or certain defensive positions as well.
User avatar
Hubert Cater
Posts: 5862
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic AI

Post by Hubert Cater »

ORIGINAL: solipsismMatrix
ORIGINAL: snowstorm

Closed beta has begun? [X(]
Where do I sign up??? [:D]
I think "closed" is the key word here.

Having said that, great news, and thanks to Fury Software for the update. It's a significant milestone.

Thank you very much and indeed it is [:)]
User avatar
Hubert Cater
Posts: 5862
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Strategic AI

Post by Hubert Cater »

ORIGINAL: snowstorm

Not necessarily so. I am currently beta testing another Slitherine game that is also closed beta, but you can still sign up. Perhaps SC 3 is doing things differently? I don't know.

This is more of a preview beta for some of our core tester group before we go live with a formal closed beta. It will be in the end the same typical process of betas at Slitherine/Matrix, we are just not quite there yet.

But the good news is that it is a beta of sorts, which indeed means we are moving forward, and work continues in earnest [:)]


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

RE: Strategic AI

Post by EdwinP »

ORIGINAL: Hubert Cater

While we don't have an air movement script, the engine does now do a better job of splitting up air units to the various active plans and so on.

Making use of AI exclusion positions also helps and keeps the AI focused on certain objectives or certain defensive positions as well.
Looking forward to seeing this in action. The biggest problem with a SC2 Sea Lion was that scripts could not focus all Air Units on the French Coast after France surrendered. Nor could you tell the AI to pursue Sea Lion only if the Axis had air and naval superiority along with LR2. With success at LR research and regional air/naval superiority a Human can launch a successful invasion of the UK.

Looking forward to an explanation of AI exclusion positions. Sounds promising.
Ason
Posts: 361
Joined: Fri Nov 29, 2013 11:14 am

RE: Strategic AI

Post by Ason »

Where can I find the update from fury software?
Post Reply

Return to “Strategic Command WWII War in Europe”