Author Topic: Bot Navigation Tweaks  (Read 9541 times)

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: Bot Navigation Tweaks
« Reply #45 on: 26-11-2010, 11:11:06 »
...The bot was so proud of itself that it went through that gap twice...
Maybe he was showing-off for the camera... :)

It's just as good as the other two, but I haven't seen many traffic jams at the gate. It usually happens at the underpass...one tank will get halfway through then inexplicably try to chuck a U-turn and end up getting jammed in there.

Or at the crossing...one will to 'n fro at the rail and the rest just pile up behind him.

Offline Remick04

  • Moderator
  • ***
  • Posts: 103
    • View Profile
Re: Bot Navigation Tweaks
« Reply #46 on: 27-11-2010, 00:11:51 »
I set the culldistance of all vehicles to 1000 for the sake of getting to the arty to be more than just a direct fire short range support, and actually have some range to them.... I fiddled around with different ranges of culldistances but settled with 1000. Though the GameLogic.MaximumLevelViewDistance X  and aiSettings.setViewDistance X on some maps tends to render the 1000 cull distance excessive, I found that that this distance was ideal for Arty on most maps that and the battlefield was more alive with it.

I can understand that tracking distant targets is interfering with the bots driving ability, but I can't imagine it so unbearable that we have to limit other aspects of gameplay. But maybe that’s just my own pride speaking over all the work I put into finding the ideal range.

Honestly it feels like you guys are making a mountain out of a mole hill. I know the bots maneuvering was far from perfect and I am looking forward to any improvements Void or anyone. But outside of scripting them to move the same way every time (which would be boring) you will always find perplexing behaviors in the bots. It's no different then the freewill of human players. I've played plenty of online games where people's behavior can be just as erratic and idiotic as FH2's bots currently are. Parking tanks in the middle of the only path to the enemy because they saw targets to engage but ultimately cause a traffic jam that got the whole group killed, happens online and in the real world too. Again, It's not that I think things can't or shouldn't be improved, merely saying that just because things aren't set up in game the way you think it should be set up, doesn't mean it's broken.


Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #47 on: 27-11-2010, 01:11:52 »
Just a note,most all FH2 maps are designed without SP in mind
They say,"that the narrowest part of a vehicle navmesh,should be wide enough for the largest vehicle to turn around on"

Ideally for SP,certain maps should be slightly modified, to increase the width of these narrow vehicle paths,by replacing certain small/narrow underpasses with larger/wider bridges

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #48 on: 27-11-2010, 03:11:41 »
Quote
I can understand that tracking distant targets is interfering with the bots driving ability, but I can't imagine it so unbearable that we have to limit other aspects of gameplay. But maybe that’s just my own pride speaking over all the work I put into finding the ideal range.

No, the arty has that kind of range, and so I will set the culldistance back to one kilometer. I don't think it's your pride speaking Remick, I think it the fact that you have much more experience with FH2 than I do. You have spoken your opinion, and I respect that. I'm now using some other tricks to control the unwanted shifts into the Fire behavior anyway.

I don't think problems with bot navigation in FH2 is either Mountain or Molehill, but rather is somewhere in between. I'm just taking a stab at making improvements, even if they are only slight improvements.

I know what you mean when you say:

Quote
I know the bots maneuvering was far from perfect and I am looking forward to any improvements Void or anyone. But outside of scripting them to move the same way every time (which would be boring) you will always find perplexing behaviors in the bots

They always perplex me. I tweak some values, run a test map about 6 times, think I've "got it", and then on test run number 7 I catch a bot moving a tank backwards and forwards for no apparent purpose. I'm only trying to do the best I can, which will certainly not be perfect, regardless of what I end up producing.

Remick, if I have posted anything you found to be an affront to the time and effort you have put into FH2 singleplayer then you have my most sincere apologies.

Offline Remick04

  • Moderator
  • ***
  • Posts: 103
    • View Profile
Re: Bot Navigation Tweaks
« Reply #49 on: 27-11-2010, 05:11:27 »
No worries Void :), I am nothing but appreciative that you have decided to give of your time to help improve the AI of FH2. I don't have as much free time as I use to, and could use all the help I can get. And although I have spent a lot of time going through the AI files of FH2, I am no AI programer, so I assume there are mistakes and holes in the AI as I am learning as I go here. I can certainly use any expertise you have to offer.

I think I'm just exhausted. Like you said 6 out of 7 test the AI will seem to behave fine, but they are never perfect. So, I stopped trying to make things perfect and just tried to make things "fun". I just hope despite the few problems here and there, people are having fun in Singleplayer ;)

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #50 on: 27-11-2010, 08:11:48 »
That we are. Thanks, guys

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: Bot Navigation Tweaks
« Reply #51 on: 27-11-2010, 09:11:59 »
The AI will never be perfect, it was only ever an afterthought anyway and I'm not talking about FH...

I bought BF2 about 6 months or so after it came out, installed it , tried all the SP maps looking for the vehicles and found none.

I had no 'net connection at the time, and was more than a little bit pissed off with the fact that nowhere on the box does it say "Online only" because that's basically what it was.

So the game sat untouched for the next year or so...then I stumbled across AIX... 8)


The bots are reactive, as such they'll do weird shit from time to time, so I try to look at the AI's behaviour as a whole, not individually.

And I don't know for sure, but I often get the impression that certain bots get more "CPU time". Maybe the game gives higher priority to bots that are near the enemy/frontlines... :-\


I've previously suggested slightly modifying maps for SP to remove particularly troublesome statics, e.g. the "barricade chicane" at Toujane on Mareth, and if memory serves, I was told it wasn't an option.


Overall though, FH's AI is now so much better than what it once was, it's not funny... :)

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #52 on: 27-11-2010, 09:11:20 »

I've previously suggested slightly modifying maps for SP to remove particularly troublesome statics, e.g. the "barricade chicane" at Toujane on Mareth, and if memory serves, I was told it wasn't an option.

You can always rename the map,with SP at the end of name,make desired changes for the SP players
removing obstacles,chicanes,and as i did for 1 map (PHL),lowering some hedges

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: Bot Navigation Tweaks
« Reply #53 on: 27-11-2010, 09:11:04 »
True, but I was suggesting it for the next release, so it'd improve things for people who don't mod their files.

But I wasn't surprised when it was knocked back, the mod is big enough as it is without adding more files to cater to the SP minority.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #54 on: 27-11-2010, 09:11:20 »
I think its best kept simple: Work with what you have.

There's a reason I made the Singleplayer Philosophy thread, although I think the reason was lost on most. But here's it put simply. I needed to define what the goal of the singleplayer project was, so its not just about 'improving AI' (Thats a scalar quantity and non-directional, what is 'improve'?), but rather set a goal for SP and follow that. Here's mine:

AI in Fh2 cannot represent tactical game-play since bots cannot be tactical. It represents logistics in tactics instead. A bot with a rifle should fire at the range of rifle with the speed his rifle allows, an smg should get in closer and spray, an mg gunner should fire from at least rifle range, if not further, move in a bit, fire again - Same goes for ordinance, armor and other vehicles. The desired effect is therefore a simulation of how the battle would proceed with the various guns and vehicles thrown in according to the battle they represent, with the constraints that are the very nature of the map/ battle.

This is why I for one, am not in favor of changing level design or vehicles etc. The determining factor of any singleplayer battle is therefore the 'single player' as the bots are designed to simulate, and hence things would most likely proceed like they did in history: PeB, etc being a hard fight for the attackers, Totalize, Sfakia etc, being as much a possible loss as it is a minor victory for the attackers etc. The tipping factor, therefore, being the human player

Each battle however needs to be somewhat balanced to allow players fill a spot on either side and be challenged by the gameplay, unless the battle truly was a total cakewalk for the side the player fights on

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #55 on: 03-12-2010, 00:12:03 »
I'm releasing today my WIP recode of aibehaviors.ai. The original contained many good ideas, but with apologies to the author(s) it also contained some severe mistakes.

I will qualify that last statement with one example. It is simple: There is no reason for a bot's Fire urgency to ever reach 81. This is coded into the current file.

EDIT: - I concede that the bots shall camp the fixed guns -


If you want to test my code, here it is: FH2 AIBehaviors Recode

« Last Edit: 03-12-2010, 05:12:32 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #56 on: 03-12-2010, 04:12:50 »
Thanks. But we let bots remain on fixed guns and AT guns to create static defenses. We noted that the number of bots on the move so outweighed the number on static guns that they were no real loss.

Besides, in rl, not all soldiers would be on the go. This helps with back-capping and maintains a solid defensive line.

I even asked remick to make bots camp deployable guns to so people can create bases of fire and arty cover while they move in.

Recommendation: please keep static guns camped. You'd get a situation where bots may or may not man positions and alot of them may be left abondoned in some games. Imagine the mareth line like this...

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.099
  • In FH Since 0.67
    • View Profile
Re: Bot Navigation Tweaks
« Reply #57 on: 03-12-2010, 04:12:48 »
Mortars in mainbases has limited range, and only provide initial support for initial breakthrough attack. So it shouldn't be camped for too long.

But as Djinn says, Mareth Line, and especially Fall of Tobruk, need bots to camp static guns. They are an element of the game itself, just notice the positioning of the static guns by the developers in Fall of Tobruk: inside a building, behind walls, etc... makes the attacking players experiencing some kind of ambush set-ups.

So yeah, for some reason camping the static guns is necessary.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #58 on: 03-12-2010, 04:12:16 »
Okay everyone. It is an easy enough fix. In a few minutes I will post a new version up with bots camping the fixed guns.

EDIT:

File updated; bots will again camp the fixed guns. Same download link:

http://www.battlefieldsingleplayer.com/void/fh2/FH2-aibehaviours-Recode.rar
« Last Edit: 03-12-2010, 04:12:33 by Void »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #59 on: 03-12-2010, 04:12:03 »
Besides that, im thoroughly excited to feel the improvement, especially tank navigation

Future note. I may be of one of 3 people who knows everything about the hows and whys of fh2 ai, who did what, when and why. If you'd like, you can use me when changing stuff so we maintain a consistent work flow i.e not needing to change stuff that had a reason to be there (thats been an issue with ai since 2.0: new ai person overhaul of ai, as many minuses as pluses, no lesson learned) PM me if you want this. I'd be happy to help