Link to home
Start Free TrialLog in
Avatar of techpage
techpage

asked on

Hunting mode in real-time games?

i'm making a game that requires the bot to search for the enemy and kill it. The bot needs to walk through a map full of obstacle (mostly convex) and when it finds enemy, it stops searching. how do i do this? i'm considering it not to be based on simple random movements but rather involving more decision-making such as using influence map, but i don't know what to do... please expertssss!!!

thanks
Avatar of ASPGuru
ASPGuru

you need to use pathfinding algorithms here...
there are a bunch of it

http://www.gameai.com/pathfinding.html
http://www.cpcug.org/user/scifair/Preygel/Preygel.html

ASPGuru
do you need more information?

ASPGuru
techpage, still there?

ASPGuru
Avatar of techpage

ASKER

hi, thanks aspguru, originally i'm using the combination of pathfinding and steering behaviour with the use of influence map for hunting mode, but do you have better approach to this?
that sounds absolutely acceptable for me...
or do you have a specific problem with this approach

is your Q answered?

ASPGuru
i mean, do you have more robust technique? such as using NN or any other more simplistic algorithms (if compared to NN)... ???
what is NN?

actually every algorithm that works is ok, but here are some thoughts i had...

well, you don't want to cheat, but the needs to search the enemy...

why use influence mapping then? what do you use it for?
if you use it, so the bot finds the enemy easier, then it's cheating, but if you allow cheating, then you actually don't need an influence map... simple path finding(A*) will do the trick, so what's the influence map for?

and what exactly is the steering behaviour for? if the hunter is a human, then he can change direction any time, so why are you using steering for? i only would use steering if i would not use path finding method(but you do!), or if i wanted to simulate a plane or something that cannot change it's direction as fast as it wants...


ASPGuru
um, actually the autonomous agent i'm building in the game is kind of a ship that can rotate (16 directions) as it moves. it's not exactly an RTS but rather deriving the play style of action games in that the human player uses keyboard to move, and the computer player relies on pathfinding for its movement. the AI i'm building on is not about unit AI but player-level AI. so we, as humans, are able to move our game unit (using keyboard) smoothly, so i needed the computer agent to behave like human player in which its game unit also move in smooth manner rather than precisely following the path that has been found using A* algorithm. for that case, i use path following (steering behaviour) so the agent, instead of behaving in move-stop-turn manner, can behave in continuous flexible manner in following the path.

as for influence map, i'm using it to mark which areas in the map are frequently explored and which are not. to avoid cheating, i put constraints to the game agent so as to only access memory from legal information disposed in its own short-term memory, which deteriorates as time progresses, and thus, the influence map is generated by obtaining information only from the memory. it's not that i created the influence map by accessing in-game variables, but rather, i implemented the game agent AI in such ways so that it can only grab information legally and imperfectly (through the use of fuzzy logic to simulate behaviour and emotions).

ummm, am i making sense? although the game was already finished and presented, but somehow i'm still not satified with my own results, so i'm still wondering, how can i create the illusion of a game agent hunting for enemies in more realistic manner? because in my game presently, i use "exploration" influence map to define which area to go best by comparing the visitation frequency of each area in the map, and find the most desirable area. as the exploration grows, the memory about the map also grows and becomes more accurate (this is easily done because my map consists only 68x60 tiles).
ok, i see...
... but i still not understand what the you're using the influence map for...

if the hunter does A* all the time and knows where the enemy is, then what does the hunter uses the influence map for?
and does the influence map contain data from the enemy or from the hunter?

what part of the behaviour exactly dissatisfies you? what's not realistic enough at the moment?

one posibility to make it more realistic would be to don't do A* if the hunter didn't saw the enemy...
so you're using A* only to find the way(avoiding obstacles) to the enemy, when the hunter actually sees the enemy.
if he doesn't sees the enemy anymore, the hunter can try to search around the place he saw the enemy the last time...
you can also use a influence map of the positions the enemy walked over, but this would be cheating unless you declare the influence map as a scent or heat map....


ASPGuru
still there?

ASPGuru
i used the influence map only for helping A* generating path that avoids obstacles and closer to the average centre of the open spaces. it's also used for exploration (see which areas are less frequently explored). the influence map gains its information from the hunter's vision. it assumes no illegal information obtainable from in-game variables, i.e. directly from the enemy.

i have no dissatisfaction, actually... i was just tring to find a better approaches to deal with this, i mean, how the hell they handle AI in games like starcraft, command & conquer, or perhaps quake and unreal? the game agents seem so smart in the game.... you know what i mean?
ASKER CERTIFIED SOLUTION
Avatar of ASPGuru
ASPGuru

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
still there?
have more specific Qs?

ASPGuru
if your Q is answered, would you please grade the answer?

ASPGuru
thanks for the articles... they are highly technical... but i'm learning on it somehow!! thanksss!!!