Solved

Hunting mode in real-time games?

Posted on 2002-04-01
15
322 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
ID: 6920100
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
ID: 6934875
do you need more information?

ASPGuru
0
 
LVL 11

Expert Comment

by:ASPGuru
ID: 6939667
techpage, still there?

ASPGuru
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 3

Author Comment

by:techpage
ID: 6942476
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
ID: 6942673
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
ID: 6945877
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
ID: 6945978
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
 
LVL 3

Author Comment

by:techpage
ID: 6947060
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
ID: 6947155
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
ID: 6952885
still there?

ASPGuru
0
 
LVL 3

Author Comment

by:techpage
ID: 6957288
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
ID: 6957448
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
ID: 6971512
still there?
have more specific Qs?

ASPGuru
0
 
LVL 11

Expert Comment

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

ASPGuru
0
 
LVL 3

Author Comment

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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

808 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