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

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
ESAI: FH2 Edition
« on: 26-10-2010, 19:10:38 »
Based on CF's post on other thread, i think this topic deserves its own thread.

The solution to the other major drama (stoopid CO) has already been pointed out. I haven't had time to try it yet, so I can't confirm it, but hopefully I'll have time this weekend. The solution? ESAI. Why? To quote it's creator:
Quote
ESAI is Strategic AI code. It cannot alleviate the basic limitations of BF2 bots, some of which were enumerated by SP4Me. It works at the AI Commander level, controlling which Flags are attacked, when they are attacked, and with what level of resources.

The Vanilla BF2 Commander only has one basic strategy to work with 99% of the time - just a basic attack strategy. ESAI gives the AI commander more options. At the ESAI core there are sets of strategies for when a team is behind on flags, when the number of flags are even, and for when a team is ahead on flags.
- http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=15109&st=0

I just couldn't express my happiness. This modification on AI files really improve the bot behavior a lot!

Tried this on Alam Halfa, the map known to be boring for SP, until recently in 2.3, where the bot finally learned how to drive vehicles. But we all seem to experience the same thing: that the attacking German bots wouldn't likely went to the next flag or have their offensive stuck at the first flags. But this is not the case here, the Germans always at some point, managed to stop their bleed and continue to harass the 3rd line! So it was a spectacular achievement in such humanly designed map.

The bot actually defended its position, manned the MG and emplacement seriously, for the first time of FH2 SP history. You won't need special SP codes to make them stay, but this time, they lie there waiting to strike back the panzer waves (yeah, they come in waves indeed, that is quite fascinating as well).

This is my experience so far. In Ramelle, the German bots managed to grey out several flags after the Outskirts, quite an improvement from the previous one.

ESAI could potentially removes some of notorious commander order spam in some maps, but i haven't confirm this. At least in Alam Halfa, it is resolved.

Just follow the link and download Void's ESAI, follow his instruction, install specific strategies he provided in the pack into your specific FH2 map, and voila! So far only 4 major strategies provided and 5 combinations of them:

AA = Air Attack (still buggy)
FCA = focusedCounterAttack
PF = pushForward
PB = protectBase

I use FCAPFPB for Alam Halfa, in order for the German bots to PF, and Brits to PB (failed so far, since no command issued at the beginning, so it really depended on where the bots spawned), and the British to FCA when they are driven out. But these plays are mixed, depending on the situation. The German repeatedly camp their base on 1st line when being counter-attacked from the 2nd line, or vice versa.
« Last Edit: 10-11-2010, 13:11:42 by ZooMotorpool »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #1 on: 26-10-2010, 20:10:10 »
Remick, Remick! Lookie! Lookie!!

Thanks cF, thank zM. Will check this out when I can. Seems like the magic bullet. We could certainly use that....

I wonder though, does it possibly allow the bot commander to defend a weak zone before enemy bots get within its cap area?

and, can bots be made to make a tactical retreat rather than bleeding away in trying to recap a flag? Then maybe countering with all their might?

Now that would make me do the jig

Offline Remick04

  • Moderator
  • ***
  • Posts: 103
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #2 on: 27-10-2010, 02:10:30 »
Sounds promising ;D Give it the full thorough testing, if no problems are found I'll see what I can do about adding it. So far my experience with Strategies.ai files they cause increase in comander spam. Speaking of which the comander spam on lebisey is caused by mount olympus' strategies.ai file getting mixed in. deleting it will solve that problem.

Offline :| Hi

  • Masterspammer
  • ****
  • Posts: 4.944
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #3 on: 27-10-2010, 03:10:46 »
-starts worshipping-

[2:06:54 PM] Tolga: cant use tha shit underwater -Tolga on the G3

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #4 on: 27-10-2010, 07:10:05 »
...Speaking of which the comander spam on lebisey is caused by mount olympus' strategies.ai file getting mixed in. deleting it will solve that problem.

Delete it, but replace with what?

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #5 on: 27-10-2010, 10:10:20 »
Nothing...I took it out before I uploaded the fixed server.zips, and I've played it since and it works ok.


The only drawback I can forsee with ESAI, is the amount of time it'll take to add the files to every level, not to mention the time spent fiddling around with the strategies.

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #6 on: 27-10-2010, 19:10:07 »
The most basic improvement with this enhancement, adding to that, my leftover knowledge in programming, i could foresee that this only improves the bot's coordination by allowing them to be aware of the situation.

"Aggression"
This is the most basic thing, and we see this value tweaked based on pre-set conditions. To be honest, we really see a "thinking" bot as a whole. Individually, they are quite dumb magic shooter. But as a whole, they really keep their act together.

"Responsiveness"
Some of the ESAI codes involves the tweaks in bots respond time and its urgency in responding to the situation.
Try to be the commander sometime. Before this, i notice that the bots responded slowly to commands, some are even unresponsive. But responsiveness, based on my estimation, are 80% caused by navmeshes rather than AI codes. So even though i see improvement on my tested maps, but this doesn't instantly credits to the ESAI.

"Situation Awareness"
This is the main part of the enhancement. By making the bots understand that they have less flags than the opponent, they will know what to do. In some strategy sets, they will either try to counter attack (maintain flag balance, reduced aggressiveness), or just blindly push forward (attack to the last flag).

I wonder though, does it possibly allow the bot commander to defend a weak zone before enemy bots get within its cap area?

It really depends on where the bot spawned, as long as they have no order issued or instructed to defend the position.

At least the bots now man static guns, MG position, sit and wait along the defense lines. They really set up some "basic n00bish" defense. It is an improvement, but you really can't get the dynamics of human gameplay style. They don't respond to the flow of the battle, they simply receive orders and carry it to their death.

Quote
and, can bots be made to make a tactical retreat rather than bleeding away in trying to recap a flag? Then maybe countering with all their might?

Now this is can be done in some kind of a "save tickets" situation or any other conditioning you can think of. Because without a logic (if-then conditioning) to determine the situation, we cannot make the bot do the corresponding action. They just don't do unorthodox warfare tactics like humans do (ambushing, traps, coordinated retreats), which is all done using surprise element and the timing sometimes defy logic (which is why it is a "surprise"). Their decision making is determined by sets of logic, which made into several strategy sets made by Void.

One of the most basic example of the weakness is that, we at this point, still cannot make the bots to choose on which flag to attack other than "enemy" or "neutral". Which is then, depends on how we "neighbour" (link) the flags when we navmesh the map. They can't really choose to concentrate attack on certain points in a map. But then, they will assign each attack order per squad (divide manpower) if we choose to link all of them or it could be the otherwise if we artificially create a chokepoint by neighboring all of the flags into single flag as a chokepoint.

For example, in Totalize, we can't make them choose to attack Flak Batteries first than factory. What will they do is that, they will divide attack instructions per squads if we link the attack points from the main base to both.

Quote
Now that would make me do the jig

It is the ultimate goal of every AI developer. No that it is impossible or to sound negative, but I think you are really expecting too much from a 2006 AI engine.

My priority is, especially in FH2, to at least make the bots respond to our command. Just like the vanilla BF2 bots do.

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #7 on: 29-10-2010, 18:10:23 »
So far Ramelle has been a great burden. The game always stuck at the Germans being raped at Outskirts by numerous bots spawning as Zooks and engineers. The German infantries covering the vehicles are either TKed by their clumsy motorist teammate or get lost in the firefights.

This ESAI is a major help in almost every other map except bionic design one like Giarabub, Ramelle, and Mareth, where distance and complexity hinders true firefight. Only Mesra Matruh sees more balanced and smarter firefights.

BF2 bots are really predictable and the game results are mostly statistical, compared to BF1942, where situations changed in each game.
« Last Edit: 29-10-2010, 18:10:55 by ZooMotorpool »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #8 on: 30-10-2010, 08:10:33 »
Hmmm, would you say ESAI is therefore not a better prospect cuz there are some annoying bugs I realize about the current system.

The most major being a problem with determining balancing between going back for tanks at the main base and keeping a decent assault on flags. In some maps, the bots completely leave their vehicles at home only returning for the odd tank, which makes no difference against heavy defenses.

In a multiple pronged attack, its touch-and-go to see which they would focus on, inspite of how heavy some position's defenses are

I think BF42 was only less statistical because bots were uber-stupid there. BF2 have better response time and sure its simplistic AI, but it works. BF42 bots didn't even respond to being fired at if they were already engaged. BF2 bots seem to 'remember' you and when they're done with their primary engagement, they find you.

You know you can even do a suppression/flank attack on enemy units by sustaining fire on them from one position while your squad, or another squad flanks it and takes it... All you need to is stand somewhere else and engage it while the bots move along the beaten path - Just keep up more fire than they do.

There is a reason I keep pressing for more out of bots. Simple as they may be, they work well in statistical terms: What gun they use, what vehicle they drive, and a bit of luck - Safe for fancy stuff like taking cover, they are golden imo.
« Last Edit: 30-10-2010, 08:10:44 by djinn »

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #9 on: 30-10-2010, 09:10:49 »
ESAI is actually wonderful enhancements that works really well in most of the maps and improved the game substantially. So, I would rather point it out on map designs literary.

I tried Gazala, Mareth Line, Ramelle, and Giarabub, i would call this map perfectly "bionic" in its design, meaning that the map doesn't do really well with even theoretically smartest bots. Map-design maps, "bionic" means that this map is full of human-made fortifications, designed to fend off foolhardy offensive methods, direct attack, and mass assault. It requires human-like systematic thinking to go through the foliage, traps, and fortifications.

German bots in Gazala for example, tend to prefer attacking on tanks, which prevents them from efficiently capping flags. Because minefields and fences surround most of the flags. Mareth is simply a case of "nearest reinforcement distance", it doesn't really matter if the allied got numerous tanks, they can be pwn3d rather easily by guns and recently, bombers that become too effective. In Giarabub, the Australian bots are pretty much exposed during their attack, and could not sweep through the Italian defense because of the narrow paths and flanks that the fortification creates.

We really need specialized bots for these "bionic maps". I haven't tried Mesra Matruh, but this would more likely result in the same manner. Humans tend to be better when they play as aggressors, while computers are mostly good as defenders. So statistically, attacking bots will always lose all of the time. So in Giarabub, Australia will lose; Mareth British is the loser; Ramelle and Gazala, it is the Germans. In addition, this is not always true with other "attack/push maps", because these other maps are less bionic.

Surprisingly, city fights, CQBs, are not that "bionic", bots do well in moving from cover to cover, clearing houses from human players, navigating along narrow paths, etc.

So yeah, ESAI won't help that much in "bionic maps", you'll only see more determined attacks there.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #10 on: 30-10-2010, 09:10:14 »
Not a problem. There may also be the issue of spawning. I noted that in villers, a corner building that spawned German infantry became a problem as they were stuck up there but in perfect position to defend.

I think ESAI would be the ultimate basic logic system for commander AI after which time, tricks like  using a few bots stuck in building and other such would be the next step.

So whats the next step with ESAI?

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #11 on: 31-10-2010, 00:10:10 »
Hi all, just found this forum. I'm the same Void from BFSP that wrote ESAI.

I'd like to point out that ESAI was created to replace the Vanilla BF2 Default strategies. It tries to be an improvement in general for the majority of SP maps out there. Map based custom strategies are always more effective.

In ESAI, overall patterns of bot spawning can be further tweaked by adding certain Object Type Flags to Strategic Areas in the file strategicareas.ai .

I'd also like to address something I read above, about ordering bots to cap certain flags under certain conditions. It was claimed this cannot be done. Not true! At a minimum of complexity, control points can be grouped into 10 "classes": Center,North,South,East,West,Flank,Route,Bridge,Remote,and Base. Different attack strategies can target one or more of any of these types.

If someone wants to give me a challenge, suggest a FH2 SP map that needs custom Strategic AI, and I will see what I can come up with.

The next step with ESAI is to find a mod interested in using it,people to test it, and so have a reason to keep developing it.
« Last Edit: 04-11-2010, 20:11:38 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #12 on: 31-10-2010, 00:10:32 »
You are in the right place :-)
So glad to meet the author in person. Big fan :-D

Ready to test, just say the word.  We already show great interest in this

Anyone want to nominate a tough map? Man wants a challenge :-)




Offline Torenico

  • Masterspammer
  • ****
  • Posts: 5.632
  • ¡Viva la Revolución!
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #13 on: 31-10-2010, 02:10:30 »
I would go for Mareth Line, awesome map with excellent vehicles and stuff.


See i really dont understand how ESAI work, my SP Life died in FH.7 but this could bring it back?


Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #14 on: 31-10-2010, 02:10:41 »
I'll see what I can do with Mareth Line, if someone cares to point out the improvements that it needs as well as the game play goals in terms of strategy.

I have not played much FH2, and am unfamiliar with the maps. I have tinkered around modding inside of older versions.

I'm currently doing a fresh install of 2.3. I've downloaded all the patches in the stickies here, but am confused. Is there a true FH2 SP minimod I need to download also?

I just want to be running the same mod version as you guys. Someone please clarify about that, and give me the rundown on Mareth Line.