Solved

Hunting mode in real-time games?

Posted on 2002-04-01
15
319 Views
Last Modified: 2013-12-26
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
0
Comment
Question by:techpage
  • 10
  • 5
15 Comments
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
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
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
do you need more information?

ASPGuru
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
techpage, still there?

ASPGuru
0
 
LVL 3

Author Comment

by:techpage
Comment Utility
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?
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
that sounds absolutely acceptable for me...
or do you have a specific problem with this approach

is your Q answered?

ASPGuru
0
 
LVL 3

Author Comment

by:techpage
Comment Utility
i mean, do you have more robust technique? such as using NN or any other more simplistic algorithms (if compared to NN)... ???
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
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
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Author Comment

by:techpage
Comment Utility
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).
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
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
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
still there?

ASPGuru
0
 
LVL 3

Author Comment

by:techpage
Comment Utility
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?
0
 
LVL 11

Accepted Solution

by:
ASPGuru earned 50 total points
Comment Utility
well, the agents in those games actually do not just hunt...
they also plan in a bigger scale and they analyze what you do and adapt.

download "SC AI Edit" from this page:
http://www.infoceptor.com/files/starcraft.shtml
you can have a look at starcrafts AI scripts with this program.

also, as i understood you actually didn't tried to make your hunter loooking more intelligent... you just implemented hunting like a reflex of the hunter...
he cannot decide not to hunt you at the moment, because he wan't to do something more important...
if it should look more intelligent, don't rely on thinking, that simple "find the best path" algorithms will do that. such algorithms just find the best path!
To some extend it's also true, that complex enviroments make complex behaviour...
The hunters word is probably way to simple to support complex behaviour...
some of the intelligent looking behavour in the games you mentioned come from acting in groups...

here are some more things to read for you:

http://www-leav.army.mil/nsc/warsim/reason/assess/section2/section2.htm

there are also some really great AI articles on http://www.gamasutra.com/, but you have to register to read them - go for it.


ASPGuru
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
still there?
have more specific Qs?

ASPGuru
0
 
LVL 11

Expert Comment

by:ASPGuru
Comment Utility
if your Q is answered, would you please grade the answer?

ASPGuru
0
 
LVL 3

Author Comment

by:techpage
Comment Utility
thanks for the articles... they are highly technical... but i'm learning on it somehow!! thanksss!!!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now