Offensive AI idea

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

Offensive AI idea

Post by vonik »

Having read the blog post about SC AI and observing it in several games, I would like to submit an idea of improvement of the AI in the offensive sector .
It is on purpose that I don't mention in detail the AI in defense because it is already pretty good in this sector .
Neither will I mention the strategic, naval and scripted levels because it would blow the scope of the post .

So basically I will deal only with the tactical and the fuzzy level for offensive operations – typically the Eastern and African front .

1. 2 fundamental observations

First is that the key to any (succesful) operation in SC is the supply . The supply value of units dictates their max reinforcment cap, their moral and their readiness . These are in turn defining the offensive and defensive values which finally decide about success or failure of individual combats .

Second is that the AI often chooses badly its offensive targets . It rushes itself in impossible potentially non supplied positions and doesn't anticipate counter attacks which almost always finish by cutting off and destroying the adventurous unit(s) .

A typical example is the Kursk area .
When the German reach Kursk, the next supply possibility is Voronezh .
But Voronezh is 6 hexes away what makes a Soviet attack from Voronezh towards Kursk stupid as their units will run out of supply even if only a single German units occupies Kursk .
It would take a serious and complex operation with 1 or 2 HQs to make sense and even then the single Kursk-Voronezh railroad can be (and will be) cut by supplied German attacks from Orel and Belgorod .
The same is true for the German with an additionnal handicap that Voronezh is behind Don what makes this attack vector useless both strategically and tactically .
Yet the AI often attacks in this no man's land with no chance to achieve anything significant.

I think that I understood why it is so when I read that the fuzzy AI level which dictates the identification of targets is based on computing offensive and defensive values .
In other words, the AI attacks because it can but not because it makes sense .
On the other hand a human player knows that offensive and defensive values are useful and relevant only in specific situations of the face to face, continuous front kind .
In all other situations (the majority), the supply is a more important variable and a human player knows that he can destroy a group of ennemy units of much larger offensive and defensive value than his own provided that he reduces their supply potential .
This is what the encircling and pocketting of Soviet or German unit groups exactly does .

2. Supply value based AI

So while a combat strength evaluation is of course necessary and paramount to decide whether the available forces allow an immediate attack or no, I tried to add a supply based evaluation which would lead to a much more efficient target identification and an optimised movement pattern .

The principle is to make an AI engine working with 3 steps .

Step 1 : Identification of primary and secondary target hexes
Step 2 : Evaluation of strength ratios at target hexes
Step 3 : Decision to move, reinforce, attack or defend at target hexes

The following diagram shows the details of the 3 steps in an example of German AI in the Barbarossa case .

3. The AI diagram

Image


4. Additionnal remarks

The above diagram deals with the offensive behavior of the AI . As one can see, this kind of AI will create "Schwerpunkte" and sustainably maintain a superiority on all strategical targets .
It will spontaneously and agressively progress on all main assault directions .
It will also guard its supply lines, maximise its strength and avoid to run in badly supplied situations .

However an army is rarely offensive on every point of the front and if the offensive AI aims to create a superiority (Schwerpunkt) on the startegical hexes called H(i) in the diagram, it cannot create a superiority on every hex of the front .
That means that the offensive module must be preceded by the identification of groups which are at parity or inferiority and these groups will have to assume a defensive behaviour .

As I understood it, the current fuzzyl level AI is precisely able to identify those "weaker" groups so that a defensive behaviour can be assigned to them .
Actually the defensive behaviour is identical to the offensive behaviour with one exception – as the strength ratio S is per definition smaller than 1 these groups will not attack unless the probability to destroy an ennemy unit is ~ 100 % .
They will also not benefit from the arrival of reinforcing units unless all H(i) groups have already a solid local superiority .
From that follows that in the rare case of an asymetrical war where the ennemy creates a Schwerpunkt at own weak points, the AI will not be very smart in deciding to weaken its strong points H(i) and sending H(i) units to reinforce secondary priority groups .
Personally I doubt that an asymetrical war makes much sense because if the AI captures the main strategic targets, it doesn't help much the adversary to capture any secondary targets .

Lest remark concerns encirclements which are the bread and butter of an offensive human player .
The ultimate superiority of a human player on an AI is that he is able to "see" approximately the possible situation in 2 or 3 turns on selected front sectors .
This allows him to do "unnatural" movements like sending units to non supplied situations where they cut off the supply of selected ennemy groups .
Even if such a "sacrified" unit has a high probability to be destroyed, the human player knows that it will buy him time to tighten the pocket around the ennemy group and finally destroy many more ennemy units than what he has lost .
As this human behaviour deals with time while the AI understands only space and strength, it is quite difficult to create an AI which is able to encircle ennemy groups by exchanging strength against time .

I gave some thought to the design of an encirclement able AI but the introduction of the time factor makes the algorithm much more complex and as I am not sure how far it would slow down the AI computing, I relinquished to post on this idea .
Post Reply

Return to “Developer Blog”