FerBotz (new AI, XCGE release 20)

Old UT Veteran
Skilled
Posts: 163
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, release 8)

Post by Old UT Veteran »

Got bored and found a cool read about the UT^2 Botprize. Its a contest where groups of people basically try to 'trick' the judges by making their bots act as realistically as possible. The bot with the highest "humanness" wins! One interesting idea that I got from reading those articles and PDFs was that the bot controller would record human navigation behavior so that it could then use it to play back relevant segments. That way the bot would be able to solve certain navigation problems.

So, if it was possible to somehow teach the bot to learn from human movement and navigation, would this solve the issue of maps having no bot support?
I thought about it and since no one brought it up before (I think) then would it be possible to do so? Botz could be able to reach hard places, camping spots, defense positions, etc. Where before bots are restricted to the area only covered by a path node. They would perfect the timing of jumps or even perhaps be able to lift jump. Maybe even BT? :lol2:

Well, I think that its something worth considering or even bringing on the spotlight. Crazy idea but I think that bots gaining the ability to learn human movement may be possible.

There is tons of interesting stuff on the website considering bot AI. You can download the PDFs and even the bots themselves. They only work for UT2k4 and UT2k3 though.
This may come up to be quite useful.

Link:

http://nn.cs.utexas.edu/?botprize
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 8)

Post by Higor »

Decided to do some native code on Botz...
Now all I need is somebody to give me a clue on safe file handling in the engine.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: FerBotz (new AI, release 8)

Post by Wises »

Higor wrote:Decided to do some native code on Botz...
Now all I need is somebody to give me a clue on safe file handling in the engine.
if youre a member over at oldunreal.com : http://oldunreal.com/cgi-bin/yabb2/YaBB.pl

then you will find some adepts over there who will be more then willing to help Higor.

they helped Tim to solve the crashing server problem and seem to have some advanced unrealed coders there.

hope this helps./
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 8)

Post by Higor »

Gonna divide Ferbotz into 2 branches.
Native and normal.

This is the first function i'm trying to implement:

Code: Select all

native final function iterator PawnActors( class<Pawn> PawnClass, out pawn P, optional float Distance, optional vector VOrigin, optional bool bHasPRI);
Should be a nice replacement of pawnlist iterators.
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 8)

Post by MrLoathsome »

Very interesting. Any chance you will release a set of these enhanced functions
separate from FerBotz ?
blarg
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 8)

Post by Higor »

The DLL has a native iterator and a simple native function that returns objects...
No crashes or anything.

As soon as I add some more natives and diversify the code a bit, I'll release both branches and if asked to do so, i'll also post the PawnActors iterator snippet.

EDIT:
I wonder if it's possible to edit the Navigation network in runtime like 227i does.
I that is possible, I could even hook non-static pathnodes into the map!!
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 8)

Post by MrLoathsome »

That, would be even more interesting.... :rock:

If I could spawn playerstarts with a mutator, that might be useful. :agree1:

Edit: Attempting to make my own playerstart class is on my list, but I havent
tried it yet because I am not sure if that would work or not.
I know my previous attempt to spawn a playerstart failed miserably. :loool:
blarg
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 8)

Post by Higor »

Actions and requirements:

Spawning non-static PlayerStarts: uScript and PlayerStart subclass with bStatic and bNoDelete set to False in it's default.

Hooking a spawned PlayerStart into the level's navigation point list: compiling with a hacked Engine.u, allowing us to edit Const values. (UTPure was compiled like this)

Extending navigation network: DLL package for creation of reachspecs and referencing them in the navigation points. (highly possible, the public headers contain the ReachSpec definitions)


In your case, just backup Engine.u and remove the 'Const' modifiers on NavigationPointList (levelinfo) and NextNavigationPoint (NavigationPoint), might work.

EDIT----------------------------------------by papercoffee

This is called from a custom navigation point, returns the reachspec index that has this path as start point and actor Dest as Endpoint.
//************************ExistingPath - returns index of reachspec if already exists, -1 for no reachspec
native final function int ExistingPath( actor Dest);

Code: Select all

void ABotz_NavigBase::execExistingPath(FFrame &Stack, RESULT_DECL)
{
	guard(ABotz_NavigBase::execExistingPath);
	P_GET_ACTOR(A);
	P_FINISH;

	INT B = -1;
	For ( INT i = 0; i<32 && this->Paths[i] >= 0 ; i++ )
	{
		if ( XLevel->ReachSpecs( this->Paths[i] )->End == A )
		{
			B = Paths[i];
			break;
		}
	}
	
	*(INT**)Result = B;
	unguard;
}
User avatar
papercoffee
Godlike
Posts: 10453
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: FerBotz (new AI, release 8)

Post by papercoffee »

*cough* double-post *cough*
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 9)

Post by Higor »

Above code buggy.

The BotZ can now iterate on the NavigationPoint list using a native iterator.

This new NavigationPoint subclass can:
//********************LockActor - Safely sets bNoDelete and hooks to navigation point list
native final function LockActor( bool bLock);

//************************CreateReachSpec - Inserts a reachspec into memory, returns it's index
//native final function int CreateReachSpec( actor Start, actor End);
Not implemented yet.

//********************PathCandidates - Runs an automatic path build routine in runtime, make sure all paths exist first
//native final function PathCandidates();
Not implemented yet.

//************************ExistingPath - returns index of reachspec if already exists, -1 for no reachspec
native final function int ExistingPath( actor Dest);

//*************************EditReachSpec - Runtime setting of a reachspec, useful for placeable teleporters (siege)
native final function bool EditReachSpec( int ReachSpec, actor Start, actor End);

//************************UnusedReachSpec - Returns a reachspec with no start and end (dynamic reachspec), -1 for failure
native final function int UnusedReachSpec();

//************************************ConnectedDests - returns linked paths and corresponding reachspecs
native static final function iterator ConnectedDests( NavigationPoint Start, out Actor End, out int ReachSpecIdx);
Start can only be skipped if NOT called as static function. (start defaults to the NavigationPoint that calls this)


//** This event describes how a custom navig-base should connect
event EPathMode IsCandidateTo( Botz_NavigBase Other);

//** This event describes how non-navigbase paths connect to this
event EPathMode OtherIsCandidate( NavigationPoint Nav);
^^ Above quoted code outdated as well on R9

======= Merged with previous post

Updated first post

- Changes from R9:
Removed air speed hack and perfectioned air control and kicker usage.
Increased the list size for LiftCenter-LiftExit combos to work on more complex maps.
Long range enemy detection based on abilities.
Sniper suppression when teammates are killed.
Weapons marked as sniper are more eligible for long range shooting.
Snipers and campers will not tend to put the sniper weapon away now.
Siege hack to make the BotZ use a sgPRI instead if possible.
Native branch with faster iterators and ability to edit c++ path system.
Old UT Veteran
Skilled
Posts: 163
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, release 9)

Post by Old UT Veteran »

Was about to try release 9 when this happened:

Image

http://postimg.org/image/lkzdl5b5f/

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

Re: FerBotz (new AI, release 9)

Post by Higor »

- If you're trying to use the normal FerBotz:
Remove Ferbotz.dll from the entire UT directory.

- If you're trying to use the Native branch:
Use both U and DLL file from the Native Branch folder.
I've only tested it on version 436, so I can't predict what behaviour it will have on 440 or 451.
I'm using 436 due to being able to kick bots on it (UTPG... seriously?).

EDIT:
Assault is currently broken (for defender botz).
I'll deal with that soon.
Old UT Veteran
Skilled
Posts: 163
Joined: Sat Mar 24, 2012 1:37 am

Re: FerBotz (new AI, release 9)

Post by Old UT Veteran »

Thanks for the help!

Got my hands on it and as always I'm impressed. The far distance sniping is a bit buggy, but really effective on large maps like CTF-Face. It would be good if they weren't stationary while sniping, because they are easy to snipe.
Higor wrote:Weapons marked as sniper are more eligible for long range shooting.
Would it be possible to assign weapon profiles to custom weapons? It would allow for flexibility. :)
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: FerBotz (new AI, release 9)

Post by Higor »

Open Ferbotz.int

[MasterGasterFer]
SniperWeaponsSTR[0]=BotPack.SniperRifle
SniperWeaponsSTR[1]=Unreali.Rifle
SniperWeaponsSTR[2]=NYACovertSniper.NYACovertSniper
SniperWeaponsSTR[3]=SpecialRifleF.SRF_Rifle

Just add new entries with the custom weapons you want the bots to consider for sniping and they'll camp better with it.
You can even add the shock rifle and force snipe-shock mode lol
SniperWeaponsSTR[4]=Botpack.SuperShockRifle
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: FerBotz (new AI, release 9)

Post by Wises »

so.. with all the native stuff above.. are you building a totally new bot system to cater for seige gameplay and other gametypes independant from the std ut bot-code?
.. tbh it's 10,000 feet above my head.. but sounds very interesting..

with normal bots and newnet / global unreal.. they tend to either fire off 100 shots at you randomly (assume because of high TR 100) and or fire nothing at all.. and just run back and forwards and kiss you kinda-thing..

wonder how ferbotz would react to newnet weapons etc.

i had to remove all but 1 bot from the servers due to these issues.. i like to have max 4 bots running around usually to keep players occupied until she fills up a bit.. and dont really care anymore about the cabages that moan about vots/server/ping/weather.. and want to have some skillful yet not too skillful ai on servers.
Post Reply