FerBotz (new AI, XCGE release 20)

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

Re: FerBotz (new AI, XCGE release 20)

Post by Higor »

In BotzDefault.ini

Code: Select all

[FerBotz.Botz]
bSuperAim=True
Change bSuperAim to false and botz's will actually turn instead of snapping.
User avatar
UTNerd24
Adept
Posts: 325
Joined: Sat Oct 22, 2011 6:06 am
Personal rank: Professional Camper

Re: FerBotz (new AI, XCGE release 20)

Post by UTNerd24 »

Loving it so far! I hope one day you'll find a way to replace the botlist so that It could be possible to customize them from the in-game menus rather than having to summon them through the console.
I've been playing UT for so long it's practically tradition.
Old UT Veteran
Skilled
Posts: 169
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, XCGE release 20)

Post by Old UT Veteran »

I hope as well; I mean hes already played around with HUDs and what not by now.
UTNerd24 wrote:I hope one day you'll find a way to replace the botlist so that It could be possible to customize them from the in-game menus rather than having to summon them through the console.
I sort of like sektor's way of doing that, where you just pick the mbot class (m male commando) in the botlist to have that specific type of bot join matches regularly without activating any mutators or commands. You can easily play with two different types - mbots and bots - if you care, that is.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA

Re: FerBotz (new AI, XCGE release 20)

Post by Chamberly »

UTNerd24 wrote:Loving it so far! I hope one day you'll find a way to replace the botlist so that It could be possible to customize them from the in-game menus rather than having to summon them through the console.
You can also customize it in the botz ini as well, if you didn't check.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
papercoffee
Godlike
Posts: 10510
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: FerBotz (new AI, XCGE release 20)

Post by papercoffee »

Chamberly wrote:
UTNerd24 wrote:Loving it so far! I hope one day you'll find a way to replace the botlist so that It could be possible to customize them from the in-game menus rather than having to summon them through the console.
You can also customize it in the botz ini as well, if you didn't check.
That's all cool, but some of us like to see the bots/botz skins and here the voices before we enable them for a bot game.
Like EvilGrins I customize my bots very heavily and give them personality ...so you can really hate them. :mrgreen:
To set them up in the ini feels somehow impersonal. :wink:
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, XCGE release 20)

Post by Higor »

So I decided to rearrange the processing order of navigation points during network mapping, putting 'already checked' navigation points on highest priority.
This means that nodes that have been queried during current mapping will be re-queried ASAP if another node is also connected to it.
This basically makes the route mapper expand 'circularly' instead of a 'amorphously' when calculating (sort of).

The timing (in QueryPerformanceCounter cycles) for MH-LostInTime were... interesting:

Old
Spoiler
Log: Execing routestest.txt
ScriptLog: Single mapping test: 161018
ScriptLog: Multi mapping test: 928420
ScriptLog: Single mapping test: 120287
ScriptLog: Multi mapping test: 890584
ScriptLog: Single mapping test: 159587
ScriptLog: Multi mapping test: 811491
ScriptLog: Single mapping test: 139318
ScriptLog: Multi mapping test: 986390
ScriptLog: Single mapping test: 144925
ScriptLog: Multi mapping test: 716283
ScriptLog: Single mapping test: 102488
ScriptLog: Multi mapping test: 598817
ScriptLog: Single mapping test: 157867
ScriptLog: Multi mapping test: 705820
ScriptLog: Single mapping test: 112214
ScriptLog: Multi mapping test: 728518
ScriptLog: Single mapping test: 172611
ScriptLog: Multi mapping test: 790090
ScriptLog: Single mapping test: 105768
ScriptLog: Multi mapping test: 509183
ScriptLog: Single mapping test: 75247
ScriptLog: Multi mapping test: 418101
ScriptLog: Single mapping test: 62302
ScriptLog: Multi mapping test: 358674
ScriptLog: Single mapping test: 59186
ScriptLog: Multi mapping test: 323364
ScriptLog: Single mapping test: 53303
ScriptLog: Multi mapping test: 292086
ScriptLog: Single mapping test: 45850
ScriptLog: Multi mapping test: 417325
ScriptLog: Single mapping test: 68217
ScriptLog: Multi mapping test: 381629
ScriptLog: Single mapping test: 63712
ScriptLog: Multi mapping test: 431441
ScriptLog: Single mapping test: 177232
ScriptLog: Multi mapping test: 812450
ScriptLog: Single mapping test: 160706
ScriptLog: Multi mapping test: 985483
ScriptLog: Single mapping test: 154586
ScriptLog: Multi mapping test: 843149
ScriptLog: Single mapping test: 110612
ScriptLog: Multi mapping test: 883181
ScriptLog: Single mapping test: 131078
ScriptLog: Multi mapping test: 873135
ScriptLog: Single mapping test: 161790
ScriptLog: Multi mapping test: 819132
ScriptLog: Single mapping test: 130813
ScriptLog: Multi mapping test: 862032
ScriptLog: Single mapping test: 173148
ScriptLog: Multi mapping test: 1053391
ScriptLog: Single mapping test: 174795
ScriptLog: Multi mapping test: 725566
ScriptLog: Single mapping test: 162255
ScriptLog: Multi mapping test: 802391
ScriptLog: Single mapping test: 158383
ScriptLog: Multi mapping test: 813634
ScriptLog: Single mapping test: 157039
ScriptLog: Multi mapping test: 823411
ScriptLog: Single mapping test: 179661
ScriptLog: Multi mapping test: 864736
ScriptLog: Single mapping test: 181915
ScriptLog: Multi mapping test: 1021477
ScriptLog: Single mapping test: 161002
ScriptLog: Multi mapping test: 937544
New
Spoiler
Log: Execing routestest.txt
ScriptLog: Single mapping test: 8597
ScriptLog: Multi mapping test: 34901
ScriptLog: Single mapping test: 9211
ScriptLog: Multi mapping test: 36720
ScriptLog: Single mapping test: 9114
ScriptLog: Multi mapping test: 68305
ScriptLog: Single mapping test: 11715
ScriptLog: Multi mapping test: 51036
ScriptLog: Single mapping test: 7242
ScriptLog: Multi mapping test: 34356
ScriptLog: Single mapping test: 9124
ScriptLog: Multi mapping test: 49828
ScriptLog: Single mapping test: 8597
ScriptLog: Multi mapping test: 55228
ScriptLog: Single mapping test: 10194
ScriptLog: Multi mapping test: 36119
ScriptLog: Single mapping test: 7697
ScriptLog: Multi mapping test: 37286
ScriptLog: Single mapping test: 8427
ScriptLog: Multi mapping test: 32922
ScriptLog: Single mapping test: 6451
ScriptLog: Multi mapping test: 31371
ScriptLog: Single mapping test: 5882
ScriptLog: Multi mapping test: 42007
ScriptLog: Single mapping test: 7071
ScriptLog: Multi mapping test: 50734
ScriptLog: Single mapping test: 10001
ScriptLog: Multi mapping test: 45633
ScriptLog: Single mapping test: 10489
ScriptLog: Multi mapping test: 57888
ScriptLog: Single mapping test: 7262
ScriptLog: Multi mapping test: 40072
ScriptLog: Single mapping test: 7601
ScriptLog: Multi mapping test: 46095
ScriptLog: Single mapping test: 6468
ScriptLog: Multi mapping test: 49586
ScriptLog: Single mapping test: 7463
ScriptLog: Multi mapping test: 45376
ScriptLog: Single mapping test: 8523
ScriptLog: Multi mapping test: 48329
ScriptLog: Single mapping test: 10170
ScriptLog: Multi mapping test: 45285
ScriptLog: Single mapping test: 7610
ScriptLog: Multi mapping test: 39979
ScriptLog: Single mapping test: 7220
ScriptLog: Multi mapping test: 34071
ScriptLog: Single mapping test: 5962
ScriptLog: Multi mapping test: 30814
ScriptLog: Single mapping test: 6775
ScriptLog: Multi mapping test: 25889
ScriptLog: Single mapping test: 4724
ScriptLog: Multi mapping test: 31055
ScriptLog: Single mapping test: 6272
ScriptLog: Multi mapping test: 33974
ScriptLog: Single mapping test: 4593
ScriptLog: Multi mapping test: 28936
ScriptLog: Single mapping test: 5969
ScriptLog: Multi mapping test: 21373
ScriptLog: Single mapping test: 3973
ScriptLog: Multi mapping test: 20929
ScriptLog: Single mapping test: 4400
ScriptLog: Multi mapping test: 21457
ScriptLog: Single mapping test: 6441
ScriptLog: Multi mapping test: 30632

Also ported the route cache builder to native code.
The path node limit for a linear route should be 15000.
Next challenge will be to write a unrealscript version of FindBestInventoryPath using this route mapper.

The goodies of this is that bots may be able to assess when items could be picked up along the route without altering the 'current' route, or even 'weighing' the route in a way that an item inbetween is picked up.

Let's brainstorm:
Bot needs to recover flag after respawning.

Stage one, select objective:
- Map entire network from EFC's perspective.
- Build route between EFC and enemy flag.
- Select as endpoint a path 'X' distance ahead of EFC.
Stage two, find nearest weapons:
- Re-map entire network from Bot's perspective (remap is less expensive, Cost not assigned to paths because already assigned during EFC mapping)
- Measure [VisitedWeight - WeaponWeight*Constant] to InventorySpot paths marking weapons.
- Cache a list of nearest 8 [Weapon+Weight] based on this.
Stage three, get best weapon+route to EFC's endpoint.
- Re-map entire network from each weapon and measure endpoint's VisitedWeight.
- Sum in each case: WeaponWeight + endpoint's VisitedWeight from that weapon.
- Pick weapon where said sum is the lowest.

Additionally I could make it so that Botz's translocation chain directly targets items if the next path is an InventorySpot actor holding an item, so bot can pick up the item during translocation chain.
I was thinking with making a 'reverse' MapRoute function where the weight of all paths INTO a node is calculated if each of these paths were the starting point, that'll simplify stage three tremendously.
It'll be bugged because UpstreamPaths list in NavigationPoint can only hold 16 connections, and it's possible to have more incoming paths than just 16.

In cases like Assault/MH it could be possible to direct a bot to select a few items as his 'kit' before attacking, by already reviewing each of the nearby items in the path network, instead of randomly telling him to find inventory in the middle of attacking.
Network mapping makes coding Bot ai a lot more fun.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: FerBotz (new AI, XCGE release 20)

Post by sektor2111 »

I would like to know for which reason/s a map is developing areas with 0 navigation - LostInTime is one of maps where I have tested paths sequentially. I really don't get what is wrong there (geometry, number of actors). Area from outside is bugged as hell. very rarely I could see small routes navigable but entire network looks divided in pieces un-linked each other and... I couldn't get it operational. probably I will try someday a full path-Net reconfiguration with Nodes at 1000-1500 distances linked with XC_PathBuilder - for me is the only solution at this moment. I'm not so convinced that I can move Bot there...
User avatar
UTNerd24
Adept
Posts: 325
Joined: Sat Oct 22, 2011 6:06 am
Personal rank: Professional Camper

Re: FerBotz (new AI, XCGE release 20)

Post by UTNerd24 »

To further elaborate my previous suggestion, you should make Ferbotz a Player Class like M_Bots.
Other than that, Im not too sure how else you could improve such an awesome mod.
I've been playing UT for so long it's practically tradition.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: FerBotz (new AI, XCGE release 20)

Post by sektor2111 »

MBot is a Bot child not a Player, btw...
Else last version released if I well recall contains a more enhanced INT file allowing some BOT access in "Preferences" which UT doesn't have in default config.
User avatar
UTNerd24
Adept
Posts: 325
Joined: Sat Oct 22, 2011 6:06 am
Personal rank: Professional Camper

Re: FerBotz (new AI, XCGE release 20)

Post by UTNerd24 »

sektor2111 wrote:MBot is a Bot child not a Player, btw...
Else last version released if I well recall contains a more enhanced INT file allowing some BOT access in "Preferences" which UT doesn't have in default config.
Child Bot. That's what I meant. Thanks for the correction.
I've been playing UT for so long it's practically tradition.
demoix
Novice
Posts: 6
Joined: Mon Nov 24, 2008 12:22 pm

Re: FerBotz (new AI, XCGE release 20)

Post by demoix »

Hi, I'm really impressed with this AI mod. I remember I played 3 years ago. Now, I came back and noticed an update so I install it again. But now it doesn't work. Install instructions is not clear. Could you explain what should I do with ''Classes'' folder and other ones? Like inc, src, XBotzQuery.u ? Also even I follow instructions right after I put ''ActivatorBotz'' mutator in my list console commands for bots doesn't work. I noticed that I need a custom engine called XC_Engine v19. But I tried to find it over all internet but can't find it. Could anyone provide me download link for this ''XC_Engine''?
User avatar
OjitroC
Godlike
Posts: 3746
Joined: Sat Sep 12, 2015 8:46 pm

Re: FerBotz (new AI, XCGE release 20)

Post by OjitroC »

It's in a thread on this forum - viewtopic.php?f=34&t=5624&hilit=xc+engine
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: FerBotz (new AI, XCGE release 20)

Post by sektor2111 »

demoix wrote:I noticed that I need a custom engine called XC_Engine v19. But I tried to find it over all internet but can't find it.
:what:
VERY False
You did not even search it. Look how do looks a G00gle search:
[attachment=0]A_G_Search_Tute.PNG[/attachment]
It shows even which version is being currently released.

Maybe your Internet ISP is a fagitron or... you have forgot to plug those cables properly :lol2: .
You do not have the required permissions to view the files attached to this post.
demoix
Novice
Posts: 6
Joined: Mon Nov 24, 2008 12:22 pm

Re: FerBotz (new AI, XCGE release 20)

Post by demoix »

Thanks it works now!
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, XCGE release 20)

Post by Higor »

I've noticed that during the transition to XC_Engine dependancy and the new route mapper a few things in AI and navigation got seriously broken.
Been doing some serious changes to movement and AI code because of that.

Unifying the movement code into a single system to prevent weird AI state switches, detecting when a path has been 'reached' gets a lot better.
Botz aggresion values have an actual effect into how they push or not.
With the new route mapper botz can do pathfinding while mid-air so they can traverse zones with negative/null gravity.
And the most important change goes to the default gametype profile, it's been structured in a way modders can VERY easily alter the bot behaviour.

First, we can defer attraction from one objective into something else, ForceTarget means that all PathFinding is skipped and the bot will go straight to this point.

Code: Select all

//Change where the bot is attracted to based on objective (good for Defering to navigation points)
function Actor ModifyAttraction( Botz Seeker, Actor PathTarget, out byte ForceTarget)
{
	return PathTarget;
}
This can be used to alter the cost of individual navigation points during pathfinding, just to customize even more.

Code: Select all

function ModifyPathCosts( Botz Seeker); //Called during route-mapping, allows modification of 'Cost' in order to modify route weights

The SuggestAttack method doesn't necessarily need to be redefined in a subclass anymore, this format works quite fine with ANY gametype if properly coded.
The path network is pre-mapped before validation/objective seeking allowing the modder to even double-check if a hypothetical objective is reachable (or which one is the nearest).

Code: Select all

function Actor SuggestAttack( Botz CheckFor, optional bool bOnlyTest)
{
	local bool bJustSpawned;

	//This is set to a low value everytime the bot respawns, used to detect respawns
	if ( CheckFor.RespawnTime < 5 )
	{
		CheckFor.RespawnTime = Level.TimeSeconds;
		bJustSpawned = true;
	}

	//********* Attempt to map the path network - ModifyPathCosts called during MapRoutes
	if ( !CheckFor.LocateStartAnchor() )
		return None;
	CheckFor.MapRoutes( CheckFor.StartAnchor, CheckFor.CollisionRadius, CheckFor.CollisionHeight, 0, 'GlobalModifyCost');

	//********* Validate this objective - can be modified here (kept if True)
	//********* If primary objective isn't valid, attempt to use ALT objective if there is one
	while ( CheckFor.GameTarget != None )
	{
		if ( ValidateObjective( CheckFor) )
			return CheckFor.GameTarget;
		CheckFor.GameTarget = CheckFor.GameTargetAlt;
		CheckFor.GameTargetAlt = None;
	}
		
	//********* Find new objectives
	return SelectObjective( CheckFor, bJustSpawned);
}

Objective validation is a step that verifies that a bot's objective can continue to be followed.
If an indifivual validation function returns false, the validation fails and the bot will seek a new objective.

Code: Select all

function bool ValidateObjective( Botz CheckFor)
{
	local Inventory Inv;
	local NavigationPoint N;
	local Pawn P;
	
	if ( CheckFor.GameTarget == None || CheckFor.bDeleteMe )
		return false;

	if ( Inventory(CheckFor.GameTarget) != None )		return ValidateObjInventory( CheckFor, Inventory(CheckFor.GameTarget) );
	if ( NavigationPoint(CheckFor.GameTarget) != None )	return ValidateObjNavigation( CheckFor, NavigationPoint(CheckFor.GameTarget) );
	if ( Pawn(CheckFor.GameTarget) != None )			return ValidateObjPawn( CheckFor, Pawn(CheckFor.GameTarget) );

	return false; //Don't validate other objectives
}

Objective selector, notice the 'OR' operator.
You may subclass the individual objective selectors to make them fail based on % chance too.
The OR operator is a good substitution to big chunks of IF-ELSEIF checks and since it's a SKIP operator there's no unnecesary processing.
As you can see there's a lot of premade utilitary objective seekers in the base profile.

Code: Select all

/* Precaucion: the higher this is the more likely the bot is to take detours to find items
 - 1.0 is normal-ish behaviour
 - 0.0 means the bot will almost ignore all items 
 - 2.0 or above mean the bot will try to reach the objective with armor and more than one weapon
  */
function Actor SelectObjective( Botz CheckFor, bool bJustSpawned)
{
	local Actor Result;
	
	if ( bJustSpawned )
	{
		CheckFor.Precaucion = 1 - CheckFor.Aggresiveness * FRand();
		Result = FindNearbyWeapon( CheckFor, 1500);
		if ( Result != None )
			return Result;
	}
	
	//'Or' is a skip operator, if parameter 1 exists, paramater 2 code isn't executed so don't worry about execution speed
	if ( CheckFor.Orders == 'Attack' )
	{
		CheckFor.Precaucion = 0.6 + FRand() * 0.3;
		Result = FindNewItem(CheckFor) Or FindRandomDest(CheckFor);
	}
	else if ( CheckFor.Orders == 'Defend' )
	{
		CheckFor.Precaucion = 1.0 + FRand() - int(CheckFor.Weapon != None && CheckFor.Weapon.AiRating > 0.5);
		if ( (CheckFor.ArmaFavorita != None) && (FRand() < 0.1) && (CheckFor.FindInventoryType(CheckFor.ArmaFavorita) == None) )
			Result = FindNearestItemFamily( CheckFor, CheckFor.ArmaFavorita, 5000);
		Result = Result Or FindAmbushPoint(CheckFor) Or FindNearbyWeapon(CheckFor) Or FindNewItem(CheckFor);
	}
	else
	{
		CheckFor.Precaucion = 1.0 + FRand();
		Result = FindNewItem(CheckFor) Or FindAmbushPoint(CheckFor) Or FindRandomDest(CheckFor); 
	}
	
	return Result;
}