Very poor AI

Thoughts from the dev team on Strategic Command's features.
Post Reply
vonik
Posts: 262
Joined: Fri Apr 08, 2011 12:12 pm

Very poor AI

Post by vonik »

As there is a blog post concerning AI in SC, I thought that I should post my analysis .
Overall the AI is fair from the tactical point of view .

The worst thing it does tactically is to counter and push as soon as there is an open space in the front .
A human player will destroy easily number of soviet units by simply opening a window in his front and then closing it when enough soviet units went enthousiastically into the (future) pocket .

However the purpose isn't here the tactics but the very basics of strategy where the AI is desperately bad .
I will use an example of a campaign won by Germany using the (France->UK->USSR) strategy .
If there was not US, this strategy would always ncessarily win .
So the one and only key for Allied to prevent a German win relies on the USA .
Follows (again necessarily) that the US strategy is a translatlantic Invasion .
The location is not so important (UK, Ireland, France, N.Africa) what is important is that an invasion happens .

And the necessary and sufficient condition to make a transatlantic invasion is to have naval superiority .
So what is the strategy to achieve a naval superiority against Germany ?

The naval combat in SC is a simple rock-paper-scissors game .
Subs beat major ships . Destroyers beat subs . Major ships beat destroyers .
Germany being strong in subs, its strategy to naval domination is to destroy ennemy destroyers .
Follows that the US/UK strategy must be to build destroyers and to destroy German subs .
The one who achieves his strategical target first wins the war .
In my game Germany successfuly destroyed first the UK destroyers (what enabled the invasion of UK) and the US destroyers second what enabled the Atlantic domination .

What did the AI in the meantime ?
First is the screen shot of the US production queue when the war was finished .

Image

Everything is totally useless . Not a single destroyer being produced . The same is true for the remnant of UK in Canada .

So what is the AI doing ? Second screen shot .

Image

Well it is sending units across the Atlantic . As one can see, they get all slaughtered by the German waiting subs .
So apparently the AI is just blindly sending units across the Atlantic , not realizing that none survive the Journey .

And what did the US do since their entrance in the war in 41 ? Third screen shot .

Image

Well they have just been producing and storing tons and tons of planes , tanks and infantry in the US . Note that the UK in Canada has been doing the same thing .
This is not only useless but it is incredibly dumb . Such a strategy is no threat to Germany and it is not even a correct defensive strategy .
If the game continued after the fall of USSR, Germany would simply invade North America . It would be only a matter of time untill the experienced and elite units just punch through this inert mass of UK/US units .

Conclusion and suggestion .
To significantly improve the AI performance on the naval strategy field, it would be enough to make it realize that the naval combat is a paper-rock-scissors game and to act accordingly .
Basically in the WWII setting that means that what counts are ONLY the "Allied destroyers/German subs" and the "Allied destroyers/German major ships" ratios .
The closer they get to 0 , the more certain is the German Victory .
That's why the only Allied strategy enabling them to survive and perhaps even to win is to research, produce and manoeuver in such a way that this ratio stays around 1 and if possible above 1 .
If it falls below 0.5, then the war is strategically over .
User avatar
BillRunacre
Posts: 5894
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: Very poor AI

Post by BillRunacre »

Thanks for the feedback vonik, we'll be taking a look at this for sure! [:)]
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
Hubert Cater
Posts: 5875
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: Very poor AI

Post by Hubert Cater »

Thanks for the feedback and it looks like you had a successful Sealion and then the AI got a bit stuck dealing with some sort of recovery after that... I'll take a look as admittedly most of the development focus was on standard strategies as we needed to ensure those played out as well as they could first and foremost. I did do some work on post Sealion but apparently there is still room for much improvement.
vonik
Posts: 262
Joined: Fri Apr 08, 2011 12:12 pm

RE: Very poor AI

Post by vonik »

Well actually the AI doesn't do better in a "standard" German strategy either .
I redid a classical game with France then Barbarossa .
During all this time I was sending the U boats all over the Atlantic to (successfully) kill all Allied destroyers and Carriers .
When USSR was practically beaten (summer 43), I transferred all bombers and the most experienced units to France and invaded UK in fall 43 . London was taken 2 months later and the game won .

Here is the view of the Atlantic :

Image

Again the AI is just sending transports that get sunk by the waiting subs and this has been going on like that since mid 42 . There is still a handful of US ships that I had not the time to sink because they transferred their Pacific fleet to Atlantic . So with or without Sealion the AI is unable to understand that it makes no sense to send tranports that get ALL sunk .

Here is the view of UK .

Image

UK is full of american (useless) planes . I wonder how they could have got there (flying through Iceland ?) but they actually contributed to the fast demise of UK because the place they take can't be used for more useful units like tanks or infantery .
An amusing point is that UK produced a cavalery unit - perhaps to copy the polish idea of horses against Panzers :)
Another strange point is that they didn't even try to bomb France or Germany a SINGLE time so that the AI was producing and stocking bombers without apparently having an idea why it was doing so .

Here is the US production queue :

Image

What a surprise :) More planes .
The AI was a few months before loosing the war, the Atlantic full of subs wreaking havoc (11 Battleships, 7 Carriers, 18 destroyers and 11 other ships sunk - basically the whole UK&US Navy plus some 20 + transports) and it produces planes ....

Actually as I said above, the key to winning against the Allied AI is simply to kill their destroyers . Everything else is (almost) irrelevant . Unfortunately it destroys the replayment value because if I redo this simple strategy with the German, I know already in 1940 that the game is won .
Symetrically playing with the Allied against German AI, I know that I won already before the game begins because I will never let the AI to destroy my destroyers but will destroy its subs instead :)
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Very poor AI

Post by EdwinP »

Vonik, good overview of the Naval AI limitations.

I would like to see AI build and research scripts conditions that respond to enemy units and tech levels. If the US AI sees; via Intelligence & Spotting, a large number of subs it builds destroyers until a specific ratio is reached.

Suggestion: Garrison script option for positioning maritime bombers in specific locations.

Example:
Garrison Script - for Unit Type: Maritime Bomber in location xx. This would allow the allied AI to position LR Maritime bombers in locations to support naval actions against Axis units.

Suggestion:Research script criteria based on number of enemy units of a specific type spotted.

Example: If Axis has submarine superiority then Allied AI script triggers that gives priority to destroyers, maritime bombers, LR and Anti-Sub.
vonik
Posts: 262
Joined: Fri Apr 08, 2011 12:12 pm

RE: Very poor AI

Post by vonik »

This is right EdwinP .
A much simpler alternative which is really more just common sense than intelligence is to have a hard scripted priority to keep the number of destroyers at their max cap at all times .
One gets sunk, another goes in production immediately .
The same rule is true for the German but it is subs instead of destroyers .

The drawback is that because it takes the same time to produce a sub or a destroyer, the game is trivialized .
There are only 2 possible German strategies .
1) Early Sealion takes London . Germany wins .
2) Without Sealion it is a draw . Germany can no more establish naval superiority so that even with URSS beaten, the US&UK will always have enough navy to prevent an invasion . Symmetrically with all experienced German units back to France from USSR, USA&UK are unable to invade the continent . As Germany is outproducing US&UK, the war can go on forever without any chance for final Victory for neither side .
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Very poor AI

Post by EdwinP »

Another alternative for the Allied AI is to improve its Sea Lion Defensive Scripts. Say that 50% of the time the UK would give priority to defending the UK. The downside is that this would weaken it in the North Africa Theater.

Axis AI scripts need to be updated to provide a chance for adopting a Naval First strategy 25% of the time. This would surprise a human player that focused on land units.

Note: Historically, the time that it took to produce aircraft, bombers, destroyers and submarines dramatically declined over time. Sunk destroyers were rapidly replaced. This is not reflected in the game. I would like to see the UK, US and Germany have an option to purchase a Production Minister. The purchase of such a unit would reduce the production time for a specific type of unit. To change production priorities a player disband the existing one and would purchase a new minister.

Example: Germany - Purchasing Donitz would reduce production time for submarines.UK - Purchasing General "Bomber" Harris would reduce the time it takes to produce strategic bombers.



gravyface_
Posts: 148
Joined: Sat Apr 21, 2007 2:25 pm

RE: Very poor AI

Post by gravyface_ »

Good read, great ideas.

Not sure if it's a fluke or the 1.1 patch, but the UK right now is actually putting on a solid defensive effort in 1940, with 4 AA guns ringing around London and they seem to be building destroyers enmasse.
User avatar
EdwinP
Posts: 175
Joined: Fri Feb 20, 2004 7:34 pm

RE: Very poor AI

Post by EdwinP »

A function that allows the AI to track the number and status of sighted units would be helpful. Then the AI could base build and research decisions on this.

Example: AI spots 5 different axis Sub and sinks 1. It knows that the Axis has at least 4 subs. The production script could say if AI Destroyer/Sub Ratio is less than 2:1 build destroyers. If AI Destroyer/Ratio is 2:1 or do not execute.

Example: RatioDestroyers [2.0] - If AI Destroyer to SPOTTED Enemy Sub Ratio is 2:1 or less build subs.
Example: RatioAircraftFighters [1.5] - If AI Fighter Aircraft to Enemy Fighter is 1.5:1 or less build fighters.
User avatar
Zuxius
Posts: 77
Joined: Sun Nov 06, 2005 2:14 am

RE: Very poor AI

Post by Zuxius »

I fully verify the piecemeal of naval units. It would seem that the AI is woefully inept on the grand scheme of what it would take for a outright Naval War. It seems to follow a scripted historical view when it is playing the Germans. Ships are scattered to the wind. I played the game from both sides after successfully taking England, the entire Middle East and feeling assured I had an Axis Fleet that would handle anything the Allies would throw at me. I knew at that point I had won as the Axis, but it took me like another 18 hours to find out. I saved the game there. Once I won as that Axis, I played it as the Allies. To my shock, the USA was hoarding some 10000 MMPs with Russian's hoarding some 4000 MPPs, even though things were truly desperate for them. I built a massive US fleet that I would hope could break through my previous massive Axis Navy, only to find that the computer had scattered them to the wind...so I just walked into England. Retook the Middle East without a fight. The AI seemed clueless on how to deal with a lost England Scenario. I think the build up of units in the Americas is just how it prepares to defend itself until it is ready to attack over land. It bottlenecks because the overseas logistics is beyond its programming. If I played this game to win as the Axis every time, it would be the fall of England before Russia every game.I no longer see the AI as something I want to play anymore. I don't enjoy complaining about a game, nor do I enjoy playing a game where I win because the AI is poorly implemented. I would not mind a sucky AI, as long as it can learn and be improved by the community.
vonik
Posts: 262
Joined: Fri Apr 08, 2011 12:12 pm

RE: Very poor AI

Post by vonik »

ORIGINAL: Zuxius

Ships are scattered to the wind.
I built a massive US fleet that I would hope could break through my previous massive Axis Navy, only to find that the computer had scattered them to the wind

Yes this is in my opinion the biggest problem with the AI .
While the AI (very vaguely) knows the concept of local superiority on land, it has no clue about local superiority on the sea .
Yet this is the single most important concept in military strategy .
Hanibal didn't win at Canae (and almost destroyed the Roman Empire) because Carthago was globally stronger than Rome . He won because he was locally stronger .

2 000 years later the German concept of Schwerpunkt was basically the same thing .
The Wehrmacht was not (much) stronger than the UK&France Armies or the Red Army . But the Wehrmacht applied a massive local superiority with intelligence on places where the global ennemy superiority didn't matter .

Your "massive Axis Navy" was not powerful because it was massive but because you have been using it with intelligence minding to have local superiority at all places of engagement .
Once the AI scattered it all over the place it made it useless regardless how "massive" it still was .

It is actually a physical principle .
Energy is Energy Density times Volume
So how to destroy a large mass (f.ex a tank) with a small energy (f.ex a Panzerfaust) ?
Well as the Energy Density is Energy / Volume, you just apply (concentrate) this relatively small energy in the smallest possible volume .
This gives an Energy Density high enough that it locally melts steel, goes through and destroys everything Inside regardless how many tons of steel make up the whole tank .
The Schwerpunkt concept is the same thing .
Post Reply

Return to “Developer Blog”