What's the best route to industry-standardized AI?
Marik_Steele
To rule in hell... Join Date: 2002-11-20 Member: 9466Members
in Discussions
<div class="IPBDescription">formerly"Would HWai-Accel. be good thing</div> Quake. Quake is the single biggest reason we got consumer-level 3D accelerators. Starting with 3DFX, soon enough plenty of companies were making top-quality 3D accelerators for top-quality games with top-quality graphics. If it wasn't for 3D accelerators, we may very well be still using voxels (in simplified terms, pixels with depth to them; I beleive the first couple Delta Force games and some helicopter sims used voxels). Either probably would have looked fine, but for better or worse the industry "chose" 3DFX's Glide instead of voxels, and we've progressed from there.
Sound. These days no serious gamer is without an A3D or EAX capable sound card and his or her favorite set of heaphones or speakers. After a bit of progress with both, A3D seems to have become less popular. EAX support is included in the vast majority of top-name commercial games today.
Why not a card for AI? Human psychology can be broken down into less than half a dozen very basic emotions (Happiness, Love), their polar opposites (Sadness, Anger/Hatred). Mixing the things in the spectrums between like a color pallette can produce every other emotion imaginable; example: jealousy can be describes as a mixture of anger and fear (of some inferiority).
We've already got AI good enough to be able to "look," "hear," or in the case of HL even "smell." Let's take it one step further.
Yesterday's AI: enemy observes player character. Enemy shoots at player character. Ignore friendlies in line of fire.
Today's AI: enemy observes player character. Enemy decides where is the best place from which to react to player character, where "react" is defined as calling for backup or using whichever weapon will be most effective (grenade vs. gun choice based on chance-to-hit percentage estimate). If "best place from which to react" is nearby cover, move. If no such place close enough by to be worth moving to, just react in place.
How AI *should* be: enemy observes player character. Enemy sees or hears player character moving suspiciously, and has a %-based increase of fear and anger towards suspicious activity. Enemy observes player character is armed, and has a %-based increase of fear towards any dangerous object not in the posession of a friend. Enemy tries to "solve" fear by either removing threatening object, removing threatening object's user, or performing any action that willl put him further out of threat range (not just running or hiding; could be having backup arrive ASAP in hopes that the player character will have the same fear-of-enemies as the AI and will run out of threat range himself. But thats a bit more advanced.)
So why aren't we seeing any hope of something this advanced in the near future?
Sound. These days no serious gamer is without an A3D or EAX capable sound card and his or her favorite set of heaphones or speakers. After a bit of progress with both, A3D seems to have become less popular. EAX support is included in the vast majority of top-name commercial games today.
Why not a card for AI? Human psychology can be broken down into less than half a dozen very basic emotions (Happiness, Love), their polar opposites (Sadness, Anger/Hatred). Mixing the things in the spectrums between like a color pallette can produce every other emotion imaginable; example: jealousy can be describes as a mixture of anger and fear (of some inferiority).
We've already got AI good enough to be able to "look," "hear," or in the case of HL even "smell." Let's take it one step further.
Yesterday's AI: enemy observes player character. Enemy shoots at player character. Ignore friendlies in line of fire.
Today's AI: enemy observes player character. Enemy decides where is the best place from which to react to player character, where "react" is defined as calling for backup or using whichever weapon will be most effective (grenade vs. gun choice based on chance-to-hit percentage estimate). If "best place from which to react" is nearby cover, move. If no such place close enough by to be worth moving to, just react in place.
How AI *should* be: enemy observes player character. Enemy sees or hears player character moving suspiciously, and has a %-based increase of fear and anger towards suspicious activity. Enemy observes player character is armed, and has a %-based increase of fear towards any dangerous object not in the posession of a friend. Enemy tries to "solve" fear by either removing threatening object, removing threatening object's user, or performing any action that willl put him further out of threat range (not just running or hiding; could be having backup arrive ASAP in hopes that the player character will have the same fear-of-enemies as the AI and will run out of threat range himself. But thats a bit more advanced.)
So why aren't we seeing any hope of something this advanced in the near future?
Comments
I've actually given a fair bit of thought to some sort of a.i. hardware accelerator/card.
The problem though, unlike graphics and sound, is that a.i. does not really lend itself well to be broken down into a sequence of well defined operations. You'd probably be better off with simply adding more processors to your machine.
How you use a.i. is very game/application specific... so I'm not sure if you could really come up with something general purpose enough to be useful. I'd be interested to know if anyone has ideas though.
I think a.i. will get more attention now that the average desktop is getting reasonably powerful in terms of processing power. For most games a.i. is but an afterthought still.
Just read game reviews. How many even mention the AI, yet alone try to analyze its quality? For the majority of customers, screenshots are still the number 1 factor deciding which game they buy, so that's where the majority of the dollars flow.
Furthermore, the calculations done by a GPU are applicable to a wide variety of games. AI techniques as you mentioned them are very specialized. Your AI card might help FPS bots, but would it help Warcraft? Age of Wonders? Chess? Those games also use something called "AI", but it works completely differently.
In the end an "AI-accelerator" would have to be just another general CPU, and you can already employ dual processors.
Just read game reviews. How many even mention the AI, yet alone try to analyze its quality? For the majority of customers, screenshots are still the number 1 factor deciding which game they buy, so that's where the majority of the dollars flow.
Furthermore, the calculations done by a GPU are applicable to a wide variety of games. AI techniques as you mentioned them are very specialized. Your AI card might help FPS bots, but would it help Warcraft? Age of Wonders? Chess? Those games also use something called "AI", but it works completely differently.
In the end an "AI-accelerator" would have to be just another general CPU, and you can already employ dual processors. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
We think alike <!--emo&:D--><img src='http://www.natural-selection.org/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
Actually, most gamers care about gameplay alot. I'm playing NS for the gameplay and strategy... not the graphics (gorgeous for HL) or the sounds(very well done)... Its all the gameplay that makes NS superb imo. Most of my other favorite games have great gameplay, but quite frequently little to no graphics or sound effects. Gameplay is where its at <!--emo&:D--><img src='http://www.natural-selection.org/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
Actually, most gamers care about gameplay alot. I'm playing NS for the gameplay and strategy... not the graphics (gorgeous for HL) or the sounds(very well done)... Its all the gameplay that makes NS superb imo. Most of my other favorite games have great gameplay, but quite frequently little to no graphics or sound effects. Gameplay is where its at <!--emo&:D--><img src='http://www.natural-selection.org/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
This reminds me of an old debate I had with some of my friends. Which is the better game - Quake or DukeNukem3d ?
They argued "but look at the fantastic engine that powers quake". I admit that the Quake engine was impressive but the Quake _game_ was really little more than its engine. You ran around a bunch of dark/abstract levels with a character that had pretty much no personality at all. You were very limited in how you could interact with the environment.
Duke3d on the other hand:
Allowed you run around in real-world locations. Nothing like a fight at a strip-bar !
Use innovative tactics like shooting a shrink-ray and getting the beam to bounce of a mirror to hit someone.
Interesting wise-cracking character to get you into the spirit of things.
Allowed you to interact with environment majorly...shooting out glass... singing into microphones etc.
Had cool end-of-level bosses. Nice cut-scenes ! Who can forget duke reading a newspaper and ....
Zoom around with a jetpack ! C'mon, that was cool.
So basically I argued that while the quake engine was the way of the future, the quake game was by comparison rather poor in terms of gameplay.
1. My current idea only takes into account emotions. It needs to take into account wants and needs.
Easiest thing I can think of is taking the status bar concept of The Sims (bladder, comfort, social activity, etc.) have them hidden, and apply emotions to each thing. Fear of embarassing self in public by not getting to a restroom in time. Fear of darkness. Pride (mix of happiness + love for self) for successfully completing some action.
2. Even in most FPS games, love would be a surprisingly often-used and calculated variable. Love for self for most NPCs would be the primary driving force for self-preservation. In the few cases where an NPC has greater love for his friends or family, that's where you'd see attempts at heroic actions like sacrificing one's life for another.
3. Simple %-based add-and-subtract calculations with coefficients aren't enough for accurate representation. There needs to be some compensation for emotional instability and extremities like life-and-death scenarios or depression. I'm thinking the farther towards one end of the spectrum someone is, the more drastically the same scenario will affect them. It's almost like a simple physics calculation, where the same added weight will tilt a beam more if placed at the end than close to the center. I seriously think that if a good-enough analogy system can be made between human psychology and simple physics, you can practically slap the AI in HL2 by scripting certain actions or events to the positions of "markers" placed in empty space of the map outside of a player's view, and use the built-in physics to do half the math for you.
[edit]Thread name changed to better reflect what I'm trying to get out of this thread.[/edit]
There is some general AI theory being used, such as how war games AI assesses which areas are worth more than others. This is stemming from Chess games. In 3d-action games, a very different kind of AI is needed.
The AI is very much part of what makes games fun to play. A well made AI that fits its game makes it great, where as we all know that "stupid AI" makes a game frustrating or exploitable and thus dull.
Sound and graphics are part of the plasticity. In the movie industry you see lots of formalised way of making props cheap. You have libraries of sound effects etc. But the scripts, how ever much they suck and how samey they might appear, are still written by at least one person (but often diluted into typical bland Hollywood drivel by committee and focus groups). That what you'd get from a standard AI:
Much to predictable games.
When you play a game you see the creative talent of graphical artists, designers of levels, inventor of rules and of course, programmers of AI. A part of a game's soul is indeed how the AI is used. Besides, games differ sufficiently to that one AI might not work very well in another game, even if they run off the same engine. AI is often a mix of clever algorithms and really profound code mixed with dirty little scripts and hacks to make it do what you want it in special situations. Besides most AI is perfectly well calculated in the CPU - its made for this. Im not sure you need more specialized hardware for AI than an 32-bit processor.
Even EA who are the kings of making avalanches games I cant tell apart, actually spend a lot of work on their AI in each game. FIFAs, however many and samey, actually has changes in AI for each revision. Im not sure it's even viable to reuse AI for anything but "followups".
So even if it would sound cool, it's one of those processes I hope game designers still make the effort and try to "reinvent the genre" each time.
In any case, human emotion is a very complex thing created by innumerable little things interacting with each other. Untill the day you make cognizant computers, AI will always be easy to spot and probably also to pattern down. We humans are masters at spotting patterns. Also when they arent there <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
(2) In the end an "AI-accelerator" would have to be just another general CPU, and you can already employ dual processors. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
(1) I've seen many games that look very pretty get marked down severely for having poor AI. Also, I think graphics capabilities of desktop computers are advancing to the point where it's not really feasable to do much more to make games pretty, which means that games' AI will be the deciding factor in whether it's worth having or not. Gone are the days when people would buy pretty-but-shallow games to show off their computers.
Too many games aren't beaten by thinking like a real person, but instead by learning how to exploit holes in the enemy AI.
(2) I have to disagree with this - I think that farming out the AI code to a second processor, while the main processor concentrates on the core game code, could be a good way to do things. It wouldn't have to be as powerful as the main CPU which would make it more affordable, and could presumably be optimised to handle things a certain way (which I suppose is what happened in the end with A3D/EAX - manufacturers generaly favouring one way to do things and working to perfect it).
I think it's a bad idea for the reason that AI calculation is just plain old CPU work. It's checking registers and making branching choices depending on variables, the CPU was made for it! You must remember that AI is just a way to determine how the program makes choices on what data or branches of the code to proces based on input, either from the player or values that are being constantly changed and monitored.
The CPU is the best thing around for that job. To have a separate processor doing that would just be to make things inflexible. We're talking parallel computing, and the beauty of it is that you can have separate tasks made simultaneously. The programmers have the choise of doing AI calculations or other data processing in each pass. But why limit yourself to an AI calculator? Thats just making things inflexible. You saw how much hassle developers had in getting to know the PS2 really well (and it's quaint parallel processing nature). In the end it's more costly in time and optimization. So let the many CPU take care of things.
To draw 3d graphics and render sound is something that requires lots of power for some very specific tasks, in these cases specialized hardware has shown the most efficient. DSP's are cheap compared to CPUs. GPUs are very specialized pieces of hardware that cost the same as CPUs. There HAS to be some work left over for the CPU <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Now there's arguably advantages in making PPU computers instead of with CPU's, I think that programmers would really like to have the flexibility to decide what each processor calculates.
..."not yet."
See, we went a long time before GPU's came along. Graphics improved, and improved... and eventually became too much for the CPU alone.
A.I. on the other hand has been moving along relatively slowly. I would say maybe after HL3 comes out this idea will be out on the table, but for now, A.I. has a ways to go in games. Then there's the whole standardization of it. A.I. is incredibly vast in how it is used. From RPGs to FPSs, Simcity to GTA, mariokart to Barney. Graphics on the other hand became standardized quickley. Sprites... voxels... polygons. Compared to a.i. routines which seem like they should be simple to the average gamer, are incredibly difficult to make efficient and diverse. This would be a mega project.
The best route? Work on an A.I. engine (much like the Havok physics engine used in DE:IW and HL2) first. Add to it... and let it expand naturally over the years until finally the extra processer is needed. This way what is needed will eventually be known. Eventually SOME games will be so complex, they will need more hardware.