Do bots have memory?

Discussions about Coding and Scripting
Post Reply
User avatar
MEAT
Adept
Posts: 299
Joined: Tue Apr 22, 2008 4:14 am
Personal rank: better then you...
Contact:

Do bots have memory?

Post by MEAT »

Reason why I ask is...on a few occasions I've been in a couple different maps (playing sniper redeemer) and have killed bots at a long range only to have them spawn back into the game and immediately fire back at me.
And the weird part is...in addition to being a great distance away I was also in a somewhat hidden spot within the map.
So how does the bot know where I am? :?
Image
User avatar
EvilGrins
Godlike
Posts: 9668
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Do bots have memory?

Post by EvilGrins »

MEAT wrote:So how does the bot know where I am?
Image
Do you bathe regularly?
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Do bots have memory?

Post by papercoffee »

MEAT wrote:Reason why I ask is...on a few occasions I've been in a couple different maps (playing sniper redeemer) and have killed bots at a long range only to have them spawn back into the game and immediately fire back at me.
And the weird part is...in addition to being a great distance away I was also in a somewhat hidden spot within the map.
So how does the bot know where I am? :?
From my rudimentary knowledge:
Because bots cheat and can see you all the time but they are coded not to care as long as you can't see them. If you can see them kicks another code routine in and they react according to their settings, alertnesses, fight style, movement etc...

But Sektor and Higor can explain this much better and in detail.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Do bots have memory?

Post by sektor2111 »

Creatures (and not only them) have a variable/slot called "enemy" which is not always removed post killed due to Unreal Engine timings.
Aside Bot is a script not a live person, for my DM I wrote a few lines dedicated to ScriptedPawn making it to play DM because It won't forget enemy so soon as Bot does. Yes, after some time they forget/quit tracking enemy. But I told at the monster a secret:

Code: Select all

LastSeenPos=Enemy.Location;
GoToState('Attacking');
After this sequence you don't wanna Skaarj with Insta tracking you. Bot is more enhanced - usually is busy with items but it might hang on a combat state post killed, code telling based on internal timers to fire weapon into enemy direction getting over killed occurrence (without checking if do still has weapon).
In heavy loaded maps and a slower CPU, Bot might be ghosting exactly like monster - returning to roaming and forgetting to respawn post death, or because an external code was dropping it into a state without checking Health - if any of you is checking wrappers added by me at MBot you'll say that I'm mad, but I had reasons to slap those things. More you play with them, the more you'll want them replaced - is what I did after all.

Edit: In other order of ideas for me this is not a problem, Bot is generally stupid (even utterly idiot) and at least a bit of aggressiveness makes things more challenging than being an easy target. I wrote some lines on purpose when Bot has a direct line with any Pawn from any angle to manage situation as a threat so it will react accordingly. I'm tired randomly to see the same reaction on combat running to some health around and if you have a heavy weapon you can fire at Inventory and Bot will find health and death in the spot because the loser always needs a load unable to understand that in such tactical situation is better to chicken out rather than running useless in a spot that can be aimed by enemy and delivering a successful frag.
User avatar
MEAT
Adept
Posts: 299
Joined: Tue Apr 22, 2008 4:14 am
Personal rank: better then you...
Contact:

Re: Do bots have memory?

Post by MEAT »

Pretty cool...thank you for the input.
Now I need to study up on the Mbot.
Image
Post Reply