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

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #60 on: 05-11-2010, 02:11:53 »
In light of Devilman's post, I suggest you all to run FH2 under patch 1.41 for SP. Setting up a dual BF2 install is fairly easy, though that is probably a topic for a separate thread.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #61 on: 05-11-2010, 06:11:24 »
I am pretty much finished with Gazala, and am ready to release ESAI:FH2 version 1.5.

All Map Specific files are now included in the main package - no more seperate map downloads.

I would like to keep all the ESAI downloads tidy and organized in one place, rather than scattered throughout this topic. This topic is great for feedback and project discussion.

May I make a separate ESAI release/download thread?

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #62 on: 05-11-2010, 07:11:27 »
Sure, there is also a Singleplayer DL thread for all fan-based contents relating to SP/COOP - if CanonFodder would be able to update its first page to include ESAI there, since its his


Also, how do I enable ai debug rendering?
As for the location, its pretty much on the sketch I drew



/North-Westerly Field or Abbaye Blanche Environs     -     Field overlooking Abbaye Blache
/Northern Pass    -    Curve in road through NW bocage-pass
/North-Easterly Field   -     Field overlooking Mortain
/Tank trap or Southern-Field      -    Empty field with blown out tanks to the south

For the flags below:
/Western Advance (Western Road)
/South-Westerly Field
/Eastern Advance (Eastern Road)

in that order as it appears on the map, from North to South. Their point, in essence is to get the fighting in the fields around Mortain as opposed to in the constricted town alone.
« Last Edit: 05-11-2010, 07:11:13 by djinn »

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #63 on: 05-11-2010, 07:11:20 »
To enable AI debug draw, you need to add some lines to \mods\fh2\AI\AIDefault.ai

look in the ESAI folder \Debug and you will find an example file with AI debug rendering enabled. The needed lines are commented; just copy and paste the code.

Offline sheikyerbouti

  • Full Member
  • ***
  • Posts: 1.402
  • Yay, Rep feature is dead
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #64 on: 05-11-2010, 10:11:19 »
 I must say this project sounds very interesting, if the AI does perform as people are saying, it would breathe major life into some of the maps.

IMO, Op. Cobra (if not already addressed) would be a fine candidate for this work.

keep it up, fan contributions to SP seem to be gaining steam, which really amplifies the experience for COOP.
My Quebec includes Canada

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #65 on: 05-11-2010, 19:11:56 »
Thanks Sheik, it is good to know that some of you are actually following our updates  :D

BTW, to light some ideas for Luettich, here is some brief text of approximately what happened:

Operation Luettich (German for Liege), is actually a foolhardy offensive ordered personally by Hitler to the German forces in Normandy. He intended to push west through the allied line until reaching coastal town of Avranches, cutting the main Allied forces into two, trapping the west-advancing American Army in the Brittany (Op. Cobra) and encircling the Allied forces amassing at the Normandy beach up north, from eastern-most town of Caen to western-most Contentin Peninsula. Field Marshall von Kluge, despite knowing the certain defeat, could do nothing but throwing everything he got into American defensive position, which lies in the town of Mortain. Eventually the German forces were defeated in this battle when their offensive were halted and raided by the Allied Air Force.

Now in FH2:

The map is re-created by Fenring, considerably scaled down, and simplified. The map features the town of Mortain itself, where the actual fights occurred on its outskirts. The map also features Abbaye Blanche and farm to simulate flanking attack routes, which was attempted by both parties. It does not count the air force and Hill 314 (overlooking the town) contribution however, it tries to recreate second day of the battle, where the thick early morning fog encircled the battlefield.

As Djinn showed, the battle for the town occurred on its outskirts as the real event did. US tanks are put in main base to recreate the brief German advantage over Mortain, before being stopped by US 3rd Armored Division.

In the game:

Abbaye Blanche is rarely played.
Farm seems to be the main focus of German attack.
Mortain is pretty much useless for the armor, they only harass infantries from the outskirts by flinging HE shells into the town, and tries to hit by blindfire.
« Last Edit: 06-11-2010, 03:11:11 by ZooMotorpool »

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #66 on: 05-11-2010, 19:11:58 »
I've released version ESAI:FH2 version 1.5

Go and get it testers!

Map's now with custom SAI:

- Gazala 64
- Mareth Line 64
- Villers Bocage 64

Next on list is Op Cobra as requested, then I will play with our Luttich ideas.

Edit: Anyone care to fill me in on the improvements needed on Op Cobra? I just loaded it up; it looks like a fun map.
« Last Edit: 05-11-2010, 19:11:17 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #67 on: 05-11-2010, 19:11:20 »
The issue it has may be out of your hand. First off, there is the double-cap i.e the water-mill flag is capped by the US, but because Germans are still there when this happens, fucky code makes it such that, no one actually has the flag, and the US keep believing they need to wait a bit longer to cap (with the whole army chipping in to help), and the Germans will continue to spawn from there... This bug happens about 9/10 times - And is only solves when it goes back in German hands proper


Bots usually don't go into the town... They struggle to get the Farm, which can be epic, but then they sluggishly make their way to the railway, and may make failed attempts at the German airfield until by luck or a moment of guard-down, its capped. Germans, if they ever lose everything and need to counter-attack, will make weak attempts at the airfield, only being able to cap the farm

Oh you picked y'self a fa-ine kettle of fish, mehn :-)

But apart from the first bug, improved AI just might be all that's needed to solve this map

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #68 on: 05-11-2010, 20:11:58 »
Quote
The issue it has may be out of your hand. First off, there is the double-cap i.e the water-mill flag is capped by the US, but because Germans are still there when this happens, fucky code makes it such that, no one actually has the flag, and the US keep believing they need to wait a bit longer to cap (with the whole army chipping in to help), and the Germans will continue to spawn from there

1. Is this "double cap" bug some sort of Python nonsense ?
    1a. Why can Germans still spawn at a Hostile/Neutral flag?

2. If it is python nonsense, may I try and hack the problem out of the python code? I know only a little python, but can reverse engineer it somewhat.

3. The other problems do not sound like an impossible challenge, once the water-mill is figured out. A work around is to leave this flag in German hands until some other flags are capped, but I'd rather not hack around with funky SAI code just b/c of a map bug.

Seems I like to choose maps that are challenging...

Can someone tell me more about the FH2 "double cap" phenomena?

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #69 on: 05-11-2010, 22:11:33 »
Quote
The issue it has may be out of your hand. First off, there is the double-cap i.e the water-mill flag is capped by the US, but because Germans are still there when this happens, fucky code makes it such that, no one actually has the flag, and the US keep believing they need to wait a bit longer to cap (with the whole army chipping in to help), and the Germans will continue to spawn from there

1. Is this "double cap" bug some sort of Python nonsense ?
    1a. Why can Germans still spawn at a Hostile/Neutral flag?

2. If it is python nonsense, may I try and hack the problem out of the python code? I know only a little python, but can reverse engineer it somewhat.

3. The other problems do not sound like an impossible challenge, once the water-mill is figured out. A work around is to leave this flag in German hands until some other flags are capped, but I'd rather not hack around with funky SAI code just b/c of a map bug.

Seems I like to choose maps that are challenging...

Can someone tell me more about the FH2 "double cap" phenomena?


Sadly its more maps than just Cobra. about 50 or 60% of FH2 maps have this in COOP/SP.

Yer, Fritz still spawns at the flag. It changes to Allied flag on the ground, but is still German on the map. and because of that, Germans can still spawn there, while Allies wont leave it alone since, as far as they are concerned, its not ready yet

And, can you tinker with it... Yes, please? :-)

I think it has something to do with map linking or some such, maybe how the commander works with battle-flow cuz its exclusive to SP and COOP, and NOT in Conquest

But, yer, it MIGHT have some roots in python - Or so some say... Problem, no one has been able to solve it conclusively, but here is Winterhilf's theory - He worked on AI until 2.3

Re: Python flag capping bug.

Tried a few theories (seemed to work only for FoT), but still don't know for sure what the cause is.

Theories ranged from 2 or more CPs with the same or partly the same name & whether or not bots had vanilla kit ai templates.
But seems likely a piece of python code is the cause, python coders are a bit thin on the ground.

Try copying the gpm_cq over from the vanilla python folder & see if it's still happening. (back up 1st!)

Think also remming out "objecttemplate.forsoldieronly" helps, this doesn't occur in vanilla & could be causing python havoc for the bots.

@zM
There is actually alot that can be done with Luettich. It has, in my oppinion, one of the most representative bocage layouts: a small town, a farm, a church tower, mg positions, solid hedgrow and pass-through brush and various open fields surrounded by bocage, each unique and tactical important to one or other base - And bots seem to be able to go ANYWHERE

Extra flags, I feel would simply move the battle away from the constricted fighting more, and exploit that natural beauty... AND it wont take away from strategy: those flags are cap-pable, but shouldn't affect ticket bleed or be spawn areas per se. That last clause depends on whoever can take up the challenge

Its just nice to be part of, or run into an ambush in and battle against infantry or even armor through the hedgerows - It was done succesfully in FH1 maps like Road to Carentan AKA Purple Heart Lane ver. 1, and THESE bots don't have pixel aiming



« Last Edit: 05-11-2010, 22:11:51 by djinn »

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #70 on: 05-11-2010, 23:11:14 »
Well, I don't much feel like wandering through python code today, so I've been working on Luttich. I have the new American flags in, and am working on the new German positions now.

Didn't realize that Winterhilf had already tried to debug the double-cap bug. I will try to fix it, but don't get your hopes up too high.

I plan on writing a python module of my own that selectively writes to a log file the activities of other FH2 python code that I am suspicious of.

The eventual solution will probably be to gracefully disable some of the custom FH2 python. I'd like to do this on a per-map basis obviously. I've only started looking at the structure of FH2's python plugins. Don't know yet if I can hack them properly or not.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #71 on: 06-11-2010, 02:11:08 »
Well Djinn, I couldn't set up the flags exactly the way you wanted. There is no navmesh in the area you indicated for the northernmost German base, so I've reworked things with only three new flags for each side.

I am confused about the three partition combat area that was in the original version of the map. I deleted it, and have created a new standard combat area that simply follows the edges of the infantry navmesh.

Here is a screen of the new layout and combat area (bird's eye view from the Editor):



I'll try and have a working test version up soon.

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #72 on: 06-11-2010, 03:11:16 »
The "three partition" combat area is meant as "ABC" zone or "Anti Base Camping" zone, which could be pretty much irrelevant for SP, but quite important for COOP mode, where servers would like to run them to attract players.

The ABC zone acts like a desertion zone for the opposing team, so the player from the other team could not travel close enough to your base, find nice spot, and start killing other players right at their spawn points (before they are even able to do anything).

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: ESAI (Enhanced Strategic AI) by Void BFSP
« Reply #73 on: 06-11-2010, 03:11:08 »
Then I will have to learn how to create multiple combat areas. The original ABC zones encompassed some of the new flags, so they had to go. I will try to make new ones, but first will finish the other map changes.

I've finished creating SAs and neighboring them, and just got done with the infantry/vehicle order positions. I've loaded the modded map in game and everything works.

I just have to finish adding spawnpoints, and it will be ready for testing with, say, ESAI default mediumMap strategy set ... perhaps largeMap, we will see.

Offline Zoologic

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

The sluggish bot advance in Cobra, especially to the town and railway station is because of too many bomb craters out there, which bots would like to avoid.

These navigation problem could be partially solved by waypointing every narrow passes in the map. I once successfully did this in Bardia 64, forcing the bots to drive through the bridges smoothly, and ford the shallow river to cross it just by putting series of waypoints that lead them through it.

The same thing can be done with Railway crossings.