View Single Post
Re: Real Physical Inputs for Bots
Old
  (#9)
DrEvil
Member
 
DrEvil's Avatar
 
Status: Offline
Posts: 142
Join Date: Jan 2004
Location: Los Angeles, CA
Default Re: Real Physical Inputs for Bots - 04-06-2006

Don't get me wrong, I think some of the academic side of AI research is very interesting, but it's just not very useful in most games. You won't find much in the form of genetic algorithms or neural nets in FPS AI, though those concepts are useful in specific circumstances, such as racing games, and in games that have specific need for learning algorithms, such as black and whites usage of perceptrons and such.

A while back I was thinking about how interesting it might be to attempt some more realistic perception models for an AI, just for fun mainly, as I knew it wouldn't really have a practical use in a game.

I had thought about attempting to give a bot AI a real set of eyes, and render the scene from the bots point of view, as cheaply as possible. Likely a flat shaded rendering of the scene to save the cost of texturing and such. Ideally lighting information would be rendered as well, giving the eyes a much more accurate picture of what a human would see from the same location. The point of this process would be to result in a relatively low resolution rendering of what the bot would see, I figured a 320x240 buffer would probably do fine. Various entities might then have lower resolution versions of themselves rendered to the same buffer in specific colors, perhaps the color would have an identifier for the entity encoded into the alpha channel of each, so that in the next step when the image is examined by a post process all pixels belonging to a particular entity could be accumulated into a overall level of visibility for an entity. I figured by having an accurately rendered frame from the bots perspective, complete with depth buffer information there might be some interesting perceptual things available. For example, this would truely mean when a target is hiding behind alpha geometry that the bot won't be able to see as much. This is a weakness in many games, bots commonly are able to see and shoot you through foilage and alpha geometry even though the player has the disadvantage of truely not being able to see the AI. Additionally, if the game was such that lighting didn't play a large part, the rendering could be done with only Z write enabled, then the targets rendered with color write enabled. This would likely save tons of fill rate and better support multiple bots running. If one were to visualize the resulting rendering in this case, it would likely simply look black(or the clear color), with colored areas where targets are visible.

Ultimately, even if it got that far it wouldn't be terribly useful. Doing a few ray casts to the target would essentially do the same thing at much less cost, even though it suffers from the problem of potentially being able to see the AI and him not see you, because the perception checks are relatively coarse. Consider that this would be an enormous cost just to give the bot a more human like vision. It could probably be done in a much faster and more efficient way. This is why games don't go crazy with these things, but individuals for proof of concepts or in robotics might, because they aren't usually on such budgets of time and processing cost.

There's a ton of ways to make something operate with more human-like functionality, but in the end, for gaming applications it is almost always overkill. Real robots often have the processing power of an entire computer at their disposal. Games are often budgeted to <= 20% cpu time for AI, due to the requirements to maintain specific framerates on target hardware. Not only that but many AI have to be functioning efficiently within that budget. That doesn't give alot of room to do advanced processing. For a researching minded person though I'm sure there is plenty of stuff that can be experimented with. I'm not trying to diss anyones desire to do interesting stuff like this, just throwing out some opinions and stuff.


Omni-bot AI framework
http://www.omni-bot.com

Foxbot - for Team Fortress Classic
http://www.foxbot.net


  
Reply With Quote