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

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #105 on: 10-11-2010, 10:11:12 »
Small idea, if or whenever you get to Invasion of Crete. By itself the bots know what to do, which is quite excellent for a map with no clear front. ESAI will probably enhance their aggression. Something else that may be nice would be to change the spawn order for the JU52s, so that rather than there being 2 which spawn right after each other, there is an indefinite amount, or at least a larger number of them. Also, having them spawn there while there are planes on at the airstrip means, JUs will constantly come flying in and Gerry will always have Stukas in the air.

The Brits will therefore need to really make use of those bofers to down the divebombers or their defense is kaput - Currently its hard work for the Germans who land with only 2 planes (That's not everybody, the rest need to spawn once a flag is capped) and trek inland under weathering fire.

Also, its just darn cinematic. I'm sure we can change bofers to be as aggressive with JUs as Stukas ... but that's a minor, and currently unimportant aspect.

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI: FH2 Discussion
« Reply #106 on: 10-11-2010, 13:11:07 »
Zoomotorpool can do that. U just need to edit his first post, am i right, zM?

Yeah, but that will only change the first post.

I think we should have renamed at my post here.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #107 on: 10-11-2010, 17:11:20 »
Thread renaming is no big deal, just thought it unneeded to have my handle screaming in the title. I don't need that much credit, heh. But it really doesn't matter.

Now to business. I'm currently working on Op. Goodwood 64. On this one, both sides get incorrect attack orders, so it is going to be more involved than some of the others.

Can one of you please tell me the flag capture order on this map - what flags depend on what flag and so on - so I don't have to play it half a dozen times to figure it out myself?

EDIT:

Djinn, I will see about Invasion of Crete in due time. I want to finish Goodwood first, then I'm releasing ESAI:FH2 with a big fat 2.0 version number (because I had to rewrite Lebisey once from the ground up).

The plugin for Lebisey is complex - it is almost as large as the ESAI core. It is a good example of how to write SAI code so that bots attack specific flags.

zM, I'm still waiting for you to learn how to write SAI code so you can help me on some of these maps!

EDIT2:

cF, I humbly suggest waiting for the upcoming ESAI:FH2 version 2.0 before adding ESAI to your D/L sticky. When I release it, we will have custom SAI for 7 maps. That should do nicely for a testing/feedback/update cycle.

« Last Edit: 10-11-2010, 20:11:53 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI: FH2 Edition
« Reply #108 on: 10-11-2010, 19:11:02 »
First 2 flags, closest to Allies, then both flags in Cagney, then both flags at the German side... Not sure there's even Push in this one, but that's the order that works

If possible, would it be possible to somehow get Brits spawning on, or next to their arty. It NEVER EVER gets used.

Map doesn't need much otherwise

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #109 on: 10-11-2010, 19:11:05 »
Quote
First 2 flags, closest to Allies, then both flags in Cagney, then both flags at the German side... Not sure there's even Push in this one, but that's the order that works

Thanks man. Now I can get started....and Yeah, there is a push mode in this map. Both sides get incorrect orders, so the code for it will feature a defense / counter offensive set of strategies as well as strategies for the invaders.

I'll see about the arty. Looks like this level may need to be brought into the editor for some minor adjustments.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #110 on: 10-11-2010, 21:11:25 »
OK Then, problem:

Operation Goodwood has 4 "dummy" control points that belong to the Allies. They have no AreaValue, and they have no associated Strategic Areas. These CPs are wreaking havoc with testing for flag balance in the ESAI core.

Can anyone tell me their purpose?

If nobody knows their purpose, may I remove them?

Never seen this in a BF2 map before...

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI: FH2 Edition
« Reply #111 on: 10-11-2010, 21:11:15 »
wow... 4 allied dummy control points?

That's not like spawn points is it?

The only thing I recall Winterhilf did to this map was to tweak spawn points, specifically for axis, and have armor able to move across the rail itself as well as across the dikes.

He's probably the best to answer this. But he's super scarce on these forums lately

Well, you know the drill, backup, delete, review.... All i can say :-\

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #112 on: 10-11-2010, 23:11:48 »
Just loaded it up in the editor. Actually, one of the dummies is for Axis. They are all vehicle spawners. I'm going to just leave the dummy CPs alone, and write the SAI code to work around them.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI: FH2 Edition
« Reply #113 on: 10-11-2010, 23:11:52 »
yer, it might be conditional spawns or something. The King tiger spawns if Cagney falls to Allies.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #114 on: 11-11-2010, 08:11:24 »
I've finished with Operation Goodwood, and am about to release ESAI:FH2 v2.0.

I really liked this map, and spent many hours on the code for its strategies. I tried to create two AI commanders who were both reasonably sane, yet with different "personalities". In my tests, the allies consistently win - but this is without human intervention.

Djinn, there already were spawn points by the arty; sorry the bots don't seem to show.

Anyway, I'm going to wait for this thread to hopefully get filled with a little user feedback before I decide where to take this project next.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI: FH2 Edition
« Reply #115 on: 11-11-2010, 10:11:42 »
I've played Goodwood so far. Bots definitely seem to engage more in the town, and for the first time playing this map, the british 25pdrs were used, BOTH of em!

Only issue I note is that not enough Germans spawn at their main base so almost no tanks make it on the battlefield. I saw 2 Panthers, a King Tiger, a PzIV (which is usually the only one that gets taken) and a StuG just sitting there.


The layout of the map means, few Germans spawning right on defensive guns like the 88s, the PAk40s (including the mobile one at the middle-map base) should be able to defend the entire area with the marders only acting as thorns in the sides of the Brits, leaving a large force spawning back for tanks


Will try the rest later and give feedback

Great work btw - Even tanks seem to move better. I think clear orders really do help

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: ESAI: FH2 Edition
« Reply #116 on: 11-11-2010, 11:11:22 »
...cF, I humbly suggest waiting for the upcoming ESAI:FH2 version 2.0 before adding ESAI to your D/L sticky. When I release it, we will have custom SAI for 7 maps. That should do nicely for a testing/feedback/update cycle.


Cool. Sounds like a plan to me... :)

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI: FH2 Edition
« Reply #117 on: 11-11-2010, 14:11:52 »
My learning plan pretty much stalled by real-life work  :( I'm so sorry.

But from what i've learned. We can assign specific control points on map for the AI-strategist to see right? I'm trying to show coordinates in-game, do anybody know how to enable this "AI-debug" mode?

TBH, what I really want to be able to do now is to Navmesh and code bot-weapon/vehicle interaction!! Some map like Anctoville still have glitches like British bots trying to superficially flank the attack route, only to find the hedgerows to cumbersome to maneuver in-between.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #118 on: 11-11-2010, 18:11:52 »
to enable AI debug mode, add these lines to \mods\fh2\AI\AIdefault.ai

Code: [Select]
rem =======================-   Enable AI Debug Output   -===================================
rem   Main Switch
rem :
aiDebug.draw 1
rem %
rem   Turn Off bot AI stats
rem :
aiSettings.setDrawBotStats 0
rem %
rem   Limit the draw distance for bot targeting/pathfinding lines to 1m
rem :
aiSettings.setStatsViewDistance 1
rem ========================================================================================

place that right before the line that runs that bot names file.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI: FH2 Edition
« Reply #119 on: 11-11-2010, 21:11:25 »
Quote
But from what i've learned. We can assign specific control points on map for the AI-strategist to see right?

It works like this: You have a CP, then bind it to a Strategic Area (which I will just call "SA" from now on).

Then you assign a designation (ObjectType) to the SA. This gives you a means of both testing for ownership of that particular CP, as well as attacking/defending it.

In some cases it is useful to create SAs that are not associated with a CP - these can be used as a kind of "super waypoint" for bots. However, if you do not write your SAI code properly these types of SAs can become Commander Spam generators from hell.

I suggest you d/l the standard reference on BF1942 Strategic AI written by Tobias Karlson. You can find it at BFSP Here

It is written for bf1942, but most things still apply to BF2. I would also suggest you read my own "Intro to BF2 Strategic AI", but I haven't finished it yet. Perhaps I will work on it today.

Finally, beware of trying to learn from examples of SAI code you find out in the wild. There are surely exceptions, but most of the custom SAI code I've run across is basically crap. It took me a lot of trial and error to learn how to write map strategy, largely because I was looking at poor examples of it.