FerBotz (new AI, XCGE release 20)

UT99.org

Re: FerBotz (new AI, release 4)

Post by UT99.org » Thu Apr 05, 2012 9:13 am

medor wrote:
Not a final release, don't modify or distribute.
Changelog in 4th public revision.
Can we distribute whith this v4 ?
Is it work on server ?

Higor
Godlike
Posts: 1775
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 4)

Post by Higor » Thu Apr 05, 2012 9:18 am

Not to be added on redirect servers, only direct download.
Package with code stripping + compression is around 150kb.

I can make that for you if you want.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

UT99.org

Re: FerBotz (new AI, release 4)

Post by UT99.org » Thu Apr 05, 2012 1:56 pm

medor wrote:No THX Take your time :tu:

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: FerBotz (new AI, release 4)

Post by MrLoathsome » Mon Apr 09, 2012 7:59 am

medor wrote:No THX Take your time :tu:
Agreed. I have been following this thread with some interest, since several of the very 1st things I tried with
Unreal Script were all bot related.

Very 1st thing I did was the update to XBots, that expanded it to 9 lists, and the 1st original thing I wrote for
UT was the AdjustoBots mutator that attempts to fix the broken autoadjust skill option for the default bots.
My 2nd attempt at making the bots less stupid was the BotOrders mutator.

And those of course were just primitive attempts to tweak the bots behavior in-game via mutator.

Haven't had time to actually try the FerBotz beta's, as I can't seem to stop writing other stuff.

Looking forward to the 1st "live" release of this.

Been impressed by a number of your recent posts here the last few months, and have learned a few things
just reading your replies to other peoples questions. :tu:
blarg

Old UT Veteran
Experienced
Posts: 102
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, release 4)

Post by Old UT Veteran » Tue Apr 10, 2012 11:34 pm

Found a couple of minor bugs with botz; most of them include the translocator.
A few of them have catched my eye and I apologize; because you may already know a few of them. But just in case I will try to help out in some way. :tu:

In CTF-Face, at spawn botz try to teleport to the top of the tower. Resulting in a continues translocation; botz shoot their translocator for the whole time. They never seem to give up on it. One of them will throw out 2-4 translocating disks which will keep on bouncing back from the wall on the tower.

Another bug seems to occur near tight spots that have limited vertical space. To make this easier, let's for example take Lava Giant. A big map :)
In the redeemer area we have that opening. You can translocate to get pass it but can not walk through it. This particular bug tends to happen on that map. The botz; taking the shorter path decide to translocate from the redeemer area to the other side. Through the opening on that map. The problem is that the aim is too high. This also results with botz translocationg for the whole time. The translocator disk keeps bouncing of the wall for the whole time. There is no way of preventing these botz from this situation. Shooting them wont even make them snap :x

If you already know these Higor than I apologize. Just making sure that these dont get left. :wink:

Higor
Godlike
Posts: 1775
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 4)

Post by Higor » Wed Apr 11, 2012 4:23 am

The translocator throwing formula has been reworked to make it work on generic throws at either short/long distance and any gravity setting.
This brings some problems when BotZ tries to use a translocator start that has been specifically tweaked for normal Bot launch (where all it does is aim and add a preset altitude on destination)

I might as well do 2 things about that:
1 - Special zone on map plugin that modifies translocator speed to make it 'fall' on the destination (hack fix)
2 - Automatic correction upon failure: If translocator hits wall, a temporary Kicker will be added at origin and next 2 or 3 BotZ translocators to appear there will be tweaked to fly like default Bot makes it fly.

Another idea is to increase cost of that destination point so that it becomes less likely to be chosen by Botz upon failure.
BotZ already has a NavigationPoint cost method that makes certain waypoints to become less likely to be used, which is used to avoid kill zones, adding an extra element to that list and make it specific to only translocator failure prevention is easy work.

EDIT: About the waypoint cost feature, might as well expand that list and block by kill radius, maps using wide pathing methods might not have the desired effect on current means (2 ways, one is costed, but one on it's side is still available)
The purpose of this is to make bots avoid sniper/camper fire and not depend on AlternatePaths on CTF games.

The block by kill waypoint list is 12 element long and will update points and extra cost on each death.
Plan to make it 32 + 1 + 1 element long for death radius, (1) translocator fail, (1) for avoid during flag run (last flag death).

I'm thinking of enumerating JumpSpots, TranslocDests and other special waypoints into a shared array to prevent iterating the entire navigation point list on each pathfinding routine.
Now why is this? These special points were hardcoded to work on normal Bots, so making them work on Botz requires to find them, disable their 'SpecialCost' event, set their cost to 0 and then do the FindPathToward call, then run the check again and enable those events and set cost back to original value.

... yeah.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: FerBotz (new AI, release 4)

Post by MrLoathsome » Wed Apr 11, 2012 7:19 am

I'm thinking of enumerating JumpSpots, TranslocDests and other special waypoints into a shared array to prevent iterating the entire navigation point list on each pathfinding routine.
Now why is this? These special points were hardcoded to work on normal Bots, so making them work on Botz requires to find them, disable their 'SpecialCost' event, set their cost to 0 and then do the FindPathToward call, then run the check again and enable those events and set cost back to original value.

... yeah.
I think that is a good idea, just from a performance standpoint. Been using a similar method to load a list of locations into an array at PostBeginPlay, eliminating
the need for those iterators later on. It ran noticeably quicker after that.

Just had a thought, that probably wont work for your application, but thought I would mention it.

Would it be possible for you to make custom JumpSpotsZ, TranslocDestZ etc classes, then spawn them at those locations when you build the initial list?
blarg

Higor
Godlike
Posts: 1775
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 4)

Post by Higor » Wed Apr 11, 2012 1:56 pm

Adding new navigation points during runtime is impossible.
The path network already has it's preset list of NavigationPoint and reachspecs.

It's really too bad the game doesn't actually have the editor's map rebuilding routines, something like that would have made rpg or rts mods with random map generators possible don't you think?

EDIT:
Linked chains are great in terms of emulating dynamic arrays and adding elements in the middle but the fact of having to write a variable n times on a n element list, makes it a really slow approach over static arrays (that have a ceiling index).

I always build stuff with arrays and ceilings, with these I reduce iteration count and make locating certain elements far easier.
A good example of it is a team balancer I made, might as well release it just for educational reasons, it contains a very good example of mirroring specific data of bigger arrays, and some other logic functions.
It has a 64 element struct arrays with 2 ceilings.

Code: Select all

PlayerInfo PInfo[64];
int ActiveCount; //Active players (in game)
int InactiveCount; //Inactive players (disconnected), first inactive player is PInfo[ ActiveCount]
I could make the Path array be separated in sections like:
NavigationPoint SpecialPoints[127]; //Not 128, so I don't need a function to access outside of class
int LiftCenterCount;
int LiftExitCount;
int TranslocDestCount;
int TranslocStartCount;

With these I can easily locate specific points depending on the BotZ capabilities to navigate and run the checks without even performing class checks, because I would already know what kind of points these are.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

Higor
Godlike
Posts: 1775
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 4)

Post by Higor » Thu Apr 12, 2012 11:56 pm

Goodness, the routines regarding path hacking are so unoptimized it hurts my own eyes.
Cosidering I wrote these specific functions 5 years ago it's not surprising at all.

Transforming one routine into another >

Original:
Iterates through all navigation points, perform (in order of possibility)
> IsA check > JumpZ + Gravity check > bCanTranslocate boolean
else > IsA check > bCanTranslocate boolean
> boolean check
Set bSpecialCost.
Enable/Disable SpecialHandling function.
All these for every single navigation point.

Now:
(Map start)
Go through all navigation points, put relevant ones in indexed, ordered element blocks inside a common array. (can be expanded for custom Paths)
(During pathfinding)
Cost/Uncost all LiftExit+LiftCenter+TranslocStarts, only iterate through these. (only SpecialHandling - faster)
> JumpZ or GravityCheck > bCanTranslocate check > Cost/Uncost JumpSpots (both Specialhandling and bSpecialCost)
> bCanTranslocate boolean > Cost/Uncost TranslocDests (same as JumpSpots)
All previous Cost/Uncost functions have the bCost boolean check outside iterators (so iterators are defined twice, with no boolean checks)

Comparison:
Estimated Iterations per pathfinding: 500-1500 > 0-100 (array is 256 element long, takes into account botz capabilities)
Estimated if checks: 1000-5000 > 3-10 (iterators defined twice, inside if checks, with each corresponding actions)
Checks ran twice, one to disable one to enable so duplicate the overhead.

To think I bothered a lot on optimizing Tick function by making some checks run once every X ticks and didn't take a look at this.

Next:
Define a new BUG_SLAYER actor (used in map plugins to solve various issues) to fix translocators in a preset fashion.
Optimize another 2 stupid NavigationPoint list loops (yeah, with these ones make it 4 entire nav list loops on pathfinding).
Rework path costing by death to make it more effective, and allow me to...
Try to work-around translocator mishandling in a generic way on runtime.

That would make it a nice milestone for a Sunday release.
PD: If your BotZ teammate gets stuck, you can force him to respawn by doing this:
team say: BOTZ_NAME revive
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

PSL-500
Novice
Posts: 20
Joined: Sun Feb 26, 2012 1:54 pm
Location: India

Re: FerBotz (new AI, release 4)

Post by PSL-500 » Fri Apr 13, 2012 8:05 am

oooh..i love BotZ..my favourite thing is their telefragging capabillities..
i use the Arena mutator to make it a translocator arena and then its all about telefragging :rock:
never had so much fun in playing against bots

Awesumn Work

Higor
Godlike
Posts: 1775
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 5)

Post by Higor » Fri Apr 13, 2012 9:19 pm

Updated first post

- Changelog in 5th revision.

Further code optimization during pathfinding.
Translocator throwing perfected, a global formula is used now for all throwing modes.
BotzFunctionManager can now be used to calculate non-flying projectile angles at fixed speeds.
Botz won't attempt flag runs on dangerous spots.
Botz avoiding camper killzones and other dangerous zones fully functional now.
Fixed bug causing BotZ getting stuck at chain translocation mode.
Fixed rare log warnings floods ( BotzTTarget ).
Added quick guide to set up preset BotZ, useful for adding a preset team with one command.


Most of it was bugfixing, now I'm trying to find a proper way to implement factions, either preset (with .int files?) or generic (skin based).
There were a total of 6 NavigationPoint list loops on each path finding, perhaps some more BotZ can be added without as much overhead as before.

I highly recommend modding the list of preset BotZ, instead of adding generic ones, I simply add all of them into my team at once and know their capabilities to place them where they become more effective (NegroVictor sniping in Face and Lavagiant for example).
My list contains a lot of custom skins and voices, if you don't feel like making a new one, simply change the player classes, skins and faces.
The way they're added doesn't trigger team balancing so if you intend to fill your team (or enemy team), add them all first, then freely fill the other teams with BotZ or Bots.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

Old UT Veteran
Experienced
Posts: 102
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, release 5)

Post by Old UT Veteran » Sat Apr 14, 2012 8:40 pm

Ahhh, another post yet another problem. I hope that most of you are well familiar with a mod called Jailbreak. Me playing ofline; as always, decided to check how well will Higor's botz do in this particular gametype. Sadly, that question became unanswered because I am not able to play with them. Higor, if you can back me up on the latest intel, would you consider answering my question:

Will Botz ever be compatible with UT Jailbreak? There seem to be lots of problems when I tried playing with them. I am able to spawn botz but unable to play with them. They just dont appear on the map at all. :( When I looked at the JB scoreboard I was some funky stuff happening.
I think that there may be a problem with the team balancer in this particular gametype. If you are planning on adding a simple Botz Config toolbar, before starting a match than it may be a fix. Ahhh my worthlessness in this scripting field. I would have been more use I knew more about this than mapping.

I think that you mentioned something similar to this in you previous post, like being an highly attractive idea. :noidea

Higor
Godlike
Posts: 1775
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 5)

Post by Higor » Sun Apr 15, 2012 1:34 am

Unfortunately, I've never played jailbreak, for UT or any other game.
I would have to become familiar with it first...
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

Old UT Veteran
Experienced
Posts: 102
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, release 5)

Post by Old UT Veteran » Sun Apr 15, 2012 2:58 am

Oh, if you ever wanted to try it out you can find it here. Maybe you will like it. :)
http://www.moddb.com/mods/ut-jailbreak

User avatar
comoestas
Average
Posts: 36
Joined: Tue Jan 04, 2011 12:33 am

Re: FerBotz (new AI, release 5)

Post by comoestas » Sun Apr 15, 2012 8:16 pm

Unfortunately, Jailbreak depends on its own bot type JBBot, and so is incompatible with Botz. Making it compatible would require a rewrite of Jailbreak.

Post Reply