Author Topic: ESAI: FH2 Edition  (Read 28102 times)

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #75 on: 06-11-2010, 05:11:39 »
Well, the first beta version of the alternate Operation Luttich is finished.

EDIT: I screwed up the neighboring, look a few posts down for the release.

« Last Edit: 06-11-2010, 08:11:32 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #76 on: 06-11-2010, 08:11:09 »
Just played it twice. Its definitely an improvements, Allied tanks still trickle in, but they seem to move to the front alot faster, especially at the start of the battle.

Axis tanks also roll in unending with infantry in tow, which totally beats the former way of attacking, with trickle of infantry coming in and the odd tank

I think the new flags DO give the battlefield quite a bit of flexibility, while staying true to the original design. The battle still centers around Mortain, but it gives the victors something extra by allowing them to route the enemy.

Still, I feel the Axis North flag (Great names, btw... Mine sucked proper) is a bit too close to the axis center. Perhaps moving it to the field right to the NW of it would make it more independent. I know at least THAT field is navmeshed because my bot-team pass through it to get there. I'd actually put it right on the path to Abbaye Blache as it give seach side a few seconds breather with Gerry not start firing at the defenders from the get-go, but you look and see which you think works better with flow

Somehow, even with the new flags, the farm, and more so Abbaye blanche still seem isolated. Axis usually cap these with little resistance and hold it for most of the battle.

A big negative I did note when the US had capped all but Axis center and South, the AI commander kept telling us to attacking the German main in the endless commander spawn that goes with such an order... There might be an issue with neighboring or something for him to give that order

In conclusion, this map has definitely picked up, and with the battle raging everywhere, its certainly been given a fresh lease on life

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #77 on: 06-11-2010, 08:11:17 »
If there is base commander spam then I made a mistake with my neighboring, which is embarrassing. I did do this in basically a day though.

I'll fix the Commander Spam and post a new version of the map.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #78 on: 06-11-2010, 08:11:42 »
Operation Luttich Alternate Version Take Two.

Now without Commander Spam!

It looks like this:



I've already got the map hooked to ESAI. Just download the file below and patch in the changes (instructions included).

Here is the corrected version:

Operation Luttich SP Alternate Version

So far only two downloads of the first version. I'll let more people try this proper map before I go moving flags around.
« Last Edit: 06-11-2010, 08:11:30 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #79 on: 06-11-2010, 10:11:46 »
One little bug I have noted in many of the ESAIed maps is that the commander can 'change his mind'. He would tell you attack one location, and a bit later, but not as a spam, he switches to another. If that was somehow introduced with ESAI, then I fear it might undermine the momentum ESAI otherwise brings, because it takes a few secs for bots to imbibe a change of plan. Don't see significant loss of momentum, if anything its the opposite, but I'm going on the theory here - Anyone else confirm noting this oddity?

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #80 on: 06-11-2010, 12:11:49 »
Void:

Would you mind explaining the strategy sets in detail?

All i understand is that:

FCA (Focused Counter Attack): Is this a strategy to make bots attack whatever flags that is not theirs?

PF (Push Forward): From your explanation, it is like the bots will attack the front lines, and will not commit "backcapping" (bypassing first line of defense, and capturing whatever flag behind it (depends on the flag neighboring though)). So they will continue attacking in order, the front most flag, then the flag behind it, and so on. Is that right?
So this strategy is less effective in a free-for-cap map like Villers Bocage or Cobra, where bots could attack any flags they want and able to capture it.

PB (Protect Base): Make bots protect any flags designated as "base" defined in gameplayobjects.con file.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #81 on: 06-11-2010, 16:11:20 »
Quote
One little bug I have noted in many of the ESAIed maps is that the commander can 'change his mind'. He would tell you attack one location, and a bit later, but not as a spam, he switches to another

That just means you have failed to do his wishes and so are punished by confusing orders.

Seriously though...

The commander changing his "mind" is often part of what makes ESAI work, but if he is changing it too often then it is a problem. FH2 maps seem to be made so that,usually, once you start going for a CP, you are committed to trying to cap it.

The commander is usually changing orders when the active strategy changes. For example, you may be in a counterAttack3 strat, attacking 3 flags at once. This strat has a time limit, and you reach it. If nothing has changed flag wise, you will now be in a counterAttackHarder3 strat - still attacking 3 flags at once. Like as not the exact same flags are still under attack, but unfortunately the commander seems not to always assign the same attack orders to the individual squads.

I can reduce the frequency of CO order changes, but it means raising all the strategy time limits in the ESAI core. ESAI:FH2 is using a tweaked version of my latest beta core for regular ESAI. This core does indeed have lower strategy time limits than my last regular ESAI version. I may have to raise the time limits back to where they used to be, or even higher, since FH2 vehicles are slower in general than BF2 transportation.


Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #82 on: 06-11-2010, 16:11:12 »
True, sometimes it is frustrating that the bots repeatedly sacrificed their lives attacking overwhelmingly fortress-like position and bleeding huge amount of tickets as a result.

The commander be better change his mind i say. For example in Fall of Tobruk, our offensive attacking officer's building failed, but the outskirts are taken, then the commander changes mind to concentrate all of his forces to Mussolini's Plaza. This way, it works better than repeating useless attack to the well defended position.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #83 on: 06-11-2010, 18:11:10 »
Quote
Would you mind explaining the strategy sets in detail?

Yes I mind, but I'll explain anyway just for you...or in all seriousness, let me just explain more how ESAI works:

The core tests three simple conditions, one of which will always be true to the exclusion of the others. It is all about flag balance. The core asks if the number of friendly flags is <,=, or > than the number of enemy flags.

There are 3 families of core strategies, each of which is activated under one of the 3 conditions:

<  : counterAttack, counterAttackHarder
=  : basicAttack, basicAttackHarder
>  : pressAttack, pressAttackHarder

Each family has multiple variants for *attack and *attackHarder. The only difference in these is the number of simultaneous attacks, and the time limits for the strategies. This is where organizing the core strategies into Strategy Sets comes into play.

For example, I could cover all possibilities by simply assigning this to both teams:
Code: [Select]
rem -- Minimalist Map Strategies --

rem Team 1
ai.addSAIStrategy 1 basicAttack2
ai.addSAIStrategy 1 pressAttack3
ai.addSAIStrategy 1 counterAttack4

rem Team2
ai.addSAIStrategy 2 basicAttack2
ai.addSAIStrategy 2 pressAttack3
ai.addSAIStrategy 2 counterAttack4

Note the numbers at the end of each strategy. This number denotes the maximum number of attacks available to the CO when the strat is active.

Note also that the *attackHarder strats aren't even included in my example. They are not needed to cover the absolute basics.

basicAttack* should usually be chosen so that it has the fewest amount of available attacks compared to the other two strategy families.
pressAttack* should usually be chosen so that it has more attacks available than basicAttack*, but less than counterAttack*
counterAttack* should usually be chosen so that it has more attacks available than pressAttack*

In the default strategy sets, I've simply organized core strategies into groups that seem to work well together, and organized them into different "sizes", where increased size is targeted at maps with greater numbers of CPs, i.e., greater numbers of flags that can come under attack simultaneously.

That is enough about the core and default strats. Now on to the rest of your questions about some of the user space plugins / strategy sets.

Quote
FCA (Focused Counter Attack): Is this a strategy to make bots attack whatever flags that is not theirs?

The goal of FCA is to drop the number of max attacks to only one, and gain a flag as soon as possible.

FCA activates when both these conditions are true:

1. The team is behind on flags
2. The team is behind on tickets: 75% or less friendly to enemy ticket ratio.

This combination is the closest I can come to checking for ticket bleed

FCA has the following characteristics:

1. One attack at max agression
2. SA Temperature multiplier for all Fronts, boosting chance that bots will spawn at Fronts
3. SA Temperature multipliers for all Remotes and Safes, reducing chance that bots will spawn away from the Front.
4. 3 Minute time limit, so as not to wear down the army going for one flag if it can't be taken.

Quote
PF (Push Forward): From your explanation, it is like the bots will attack the front lines, and will not commit "backcapping" (bypassing first line of defense, and capturing whatever flag behind it (depends on the flag neighboring though)). So they will continue attacking in order, the front most flag, then the flag behind it, and so on. Is that right?

I think you are confused about what I mean by "Front". In terms of SAI code, a Front is an owned Flag that has one or more Hostile neighbors. The inverse of Front is Safe. Safe Flags are owned areas that have no Hostile neighbors.

PF merely attempts to spawn bots at the front lines using SA Temp modifiers similar to the ones in FCA, and have them steam ahead with a max of two attacks.

PF activates when the following is true:

1. Friendly is ahead on flags
2. There are no Neutral flags
3. There are more friendly Safe CPs than friendly CPs that are Fronts

The third condition is the most important, and when it is true it usually means that the other team is on bleed. PF tries to go in for the kill, but will not necessarily ignore flanks and so on if there are any.

Quote
PB (Protect Base): Make bots protect any flags designated as "base" defined in gameplayobjects.con file.

PB doesn't defend anything, it tries to Protect your Base by spawning bots at the Base, and ordering them to attack (hopefully) the Hostile CP that is closest to the threatened Base.

You designate a Strategic Area as a Base in the file StrategicAreas.ai.

PB activates when the following is true:

1. Side is behind on flags
2. Side has more flags that are Fronts than those that are Safe
3. Side has a Base that is also a Front

PB targets Hostile CPs more than Neutral ones, and has a max of 2 attacks at 3/4 Agression.

Does that help somewhat? I would explain more, but I need to get busy doing some real world stuff.

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #84 on: 06-11-2010, 18:11:34 »
Now this is very detailed indeed. Thank you very much Void.

I could begin to tweak some codes with more confidence now. Might experiment a bit, to keep some small percentage of the bots spawning at main base, because it is where all the big tanks and vehicles are located.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #85 on: 08-11-2010, 02:11:28 »
Quote
Might experiment a bit, to keep some small percentage of the bots spawning at main base, because it is where all the big tanks and vehicles are located.

You are welcome to tweak ESAI however you please. Here are some paths I would suggest you try for more control over bot spawning patterns:

 First off, there are several ESAI supported ObjectType flags you can add to Strategic Areas, beyond "Base". Look at the code comments in the \ESAI\Core\esaicore.ai for a list of supported ObjectType flags. Adding these on a per level basis is often all you need to do to achieve satisfactory spawn patterns.

 Secondly, you might want to have a look at ESAI\Core\esaivars.ai . This file holds all the values for the SA Temperature multipliers. Experiment with different weights for the various ObjectType flags if you cannot get the spawn patterns you want using just level specific SA ObjectType flags.

If you want to really get into things, write your own ESAI:FH2 plugin. I can help teach you how to write the code. You can actually learn yourself by looking at the code I've already written.

If you want to write some SAI code, I will help if you need me to explain how.

« Last Edit: 08-11-2010, 02:11:47 by Void »

Offline SavageCDN

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #86 on: 08-11-2010, 18:11:26 »
Thanks Sheik, it is good to know that some of you are actually following our updates  :D

Just to let you know there are others following as well and appreciate the hard work being done by all involved.
 8)

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #87 on: 08-11-2010, 19:11:21 »
Well, ESAI:FH2 v 1.5 has been downloaded 24 times as I write this. Not bad, not bad. Seems a few folks are paying attention...

It is hard work, but it is fun work, so it is all good.

For the next release of ESAI:FH2 I am working on custom SAI code for our alternate version of Operation Luttich. If it turns out the way I want, the map should play a little differently. Here is a summary of what I am cooking up:

British: At map start, defense orders on the 4 front line Flags. Not that the Brits will know where the initial Axis invasion will occur...

Germans:

 At map start, Axis CO will choose one of four equally likely invasion plans. I have creatively named them plans A,B,C,and D.  Each plan has 3 phases, with phase 2 further subdivided into two sub-plans (the choice of phase 2 sub-plan depends on the results of phase 1).

Each major invasion plan starts with a max of two attacks: an Axis thrust towards specific front line targets.

The Germans may attack the North/South flanks first (plan A) , the middle two flags first (Plan B), the northernmost two flags first (plan C), or the southernmost two flags first (plan D).

If it works the way I want, the map's game play should be substantially challenging for either side and unpredictable from the defender's point of view.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #88 on: 08-11-2010, 23:11:55 »
I just noticed that Siege of Tobruk 64 doesn't obey the push order for flags under the Vanilla AI. I'm going to fix it before I get into the Luttich project.

This map have the "double cap" bug? If yes, which flag?

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #89 on: 09-11-2010, 02:11:25 »
I think its the docks, or so I hear. Anyone confirm this fact?