Game Development Community

Area awareness?

by Daniel Buckmaster · in Technical Issues · 01/12/2007 (11:53 am) · 1 replies

I think that for AI, area awareness is one of, if not the most important factor. The actual decision maing is important, but accurate decisions cannot be made without accurate information. So, my question is, what is an efficient way to make AI aware of its surroundings? I'm looking for a way to just drop an AI in a level and be able to have it perform with no nodes, precompiled directions, etc. Terrains wouldn't be too much of a problem, but working with complex interior structures like deathmatch levels for games such as UT present a very complex environment.

My first idea, though probably massively inefficient, was a 'true vision' sort of thing. Basically, the screen is divided up into a number of different squares, with smaller squares in the centre and larger towards the edges. Then a series of raycasts determines the average distance of each region (so the middle of the screen, which has more samples of the environment, gives more accurate data). Then some alrogithm (I was thinking a neural net) analyses the relative depth values, factors in the bearing to its location and possibly memory, and decided on a route to take.
This probably would not work...

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
01/12/2007 (12:57 pm)
I don't think any big-name game does something as elaborate as you mention. Most games have some kind of information built into the levels to guide the AI around (actually, calling whatever most games uses "AI" is giving them too much credit... but there isn't a better word). Either hand-placed stuff like nodes and way points or more elaborate preprocessed data based on level geometry.

You could use complex algorithms to precompute more CPU friendly data for bots to use, instead of doing it all in real-time. As example, for a game with lots of building-style interiors, you could build a map describing the walkable volumes as linked bounding boxes of different sizes by using some flood fill algorithm, and make it so bots can only walk inside those boxes, and pathfind through the linked boxes to reach locations outside their current box.