Home

Previous Entry | Next Entry

More About Artificial Intelligence In Games

  • Sep. 10th, 2007 at 12:06 AM
tezuka - lonely flower - default
More About Artificial Intelligence In Games
Eep. Did not realize a game AI website had picked up my post on AI. ^_^; I got an e-mail today about it from someone who was interested in the concept and had a question!

The e-mail I received:
Hey Ai,

Sorry, I don't have livejournal, and I read your post on Of Artificial Intelligence In Games, and twas quite interesting (I got the link from AI Game Dev).

I was quickly wondering; and this would have gone in a comment; but I just want to understand where you think the engine would be best applied. Would it be in an RPG where not everyone has to fight (like Oblivion given its a 3D large world), so these responses would actually work quite well, or would it be applicable to all those FPS games? or what game were you thinking of when you thought of the design?

I Just think the idea is quite neat, and if I get around to programming some AI in a 3d game sooner or later, I might implement something likeit to try it out - certainly it would require a lot of game-environment knowledge to act properly, but sounds like it might be worth trying -although the growing up part would be as hard as nails without a master PHD in whateverology which is needed, and nevermind trying to apply it sensibly to non-humans in exactly the same way :-)

Thanks for making my head think for a while at least,

name withheld


My answer:

Hello,

Thanks for writing to me!  I think this engine would be great in any sort of game where you would need some sort of AI in background characters, actually.  My original idea was to have some sort of a standard engine (you know, like how there is a Quake or Unreal engine) and then have that be a sort of plug-in module for developers to pick up and use for their random people scattered about, be it an RPG like Oblivion, or a shooter/FPS like Counterstrike.  (With an RPG more programming would be involved, especially if you want to do things like conversation and dialogue.  Though they could certainly be programmed into a pool of preset responses ...) 

(Re FPS: the engine might be more useful if you really needed man-off-the-street types, so for example, random civilians in an urban/village setting.  Though then again, if you were playing something like Battlefield 1942, I don't see why a military footsoldier-AI couldn't be made in the same way.)

The entire discussion came about in the first place because Rolf wanted a more realistic experience for his RPGs.  Eg, if you kill someone in a church, people run away, but why isn't there some random idiot who decides to come back with a sword to kill you?  Or for example, if you aggravate the barmaid by turning chairs and tables over, why is it no one tosses you out of the bar and kicks your butt should you try to return?  Or if you use magic in a world where magic is forbidden--and in the middle of the magic-hunters guild no less--why don't people all turn around and squish you like a bug?  So ... that sort of thing.

Re: the growing up (of code), I wonder if it would actually be somewhat easy (in a sense).  I remember reading about computer algorithms that can genetically evolve themselves so that they fulfill a certain sort of goal.  Why not make many copies of this engine, put them all into a DNA-based genetic programming algorithm (or whatever they call that sort of thing), perform a set number of iterations (or whatever you want to pass for time), and use some sort of survival test (eg a fake world with monsters etc, or with real people playing threats/danger, or random seeds), and weed out the good ones?  Then cross-breed, repeat. Until you're satisfied with the results, or until your playtesters can no longer really distinguish the bots/engine from the real players. 

In fact, didn't the makers of the LOTR movies do something similar with the battle for ... er, what was the name again?  That orcs vs humans war.  They actually made some very simplistic AI and then stuck it into the CG dolls.  Then they filmed.  Saved a lot of time/trouble doing the motions by hand or copying/pasting, and the end result was a heck of a lot more realistic.  This would just be that, on a much larger scale. 

Asking a game company to do this sort of thing would be somewhat silly/strange, I suppose, but if someone set up a company to do this, think of the licensing revenue you could generate.  Second Life alone might net you a very large sum (for example, people to wander about in your hotel in Second Life as staff or cleaners or whatever you want to call it). Then there are the game developers.  And how about simulators? SimCity, The Sims, etc.  And the sports games--audience simulation--hoodlums?  Fights?  Rioting?  ^_^;  Well, okay, not that, but I hope you know what I mean. 

And real-world applications!  The engine could be basically a portable brain (though perhaps somewhat slow on the uptake).  Basic things like cleaning robots, maid robots, etc etc ... I could definitely see this being the basis of a functioning low-level AI.  Not something on par with humans, but good enough to fake it for a little while.

Note, however, that I use the word "basis".  It's not a take-it-and-run-with-it-perfectly sort of thing; more of a good framework (only the basics) that one can tweak any way one sees fit. We're talking instincts or at least logical behavior--something a very young child would do.  Everything else needs to be programmed in on a case-by-case basis to make this AI anything of a useful simulator. 

This would make an amazing PhD project, I think, or some sort of university research lab's investigation.  It's a pity I have zero computer training--I'm an English teacher who majored in political science with a minor in cryptology/number theory, and I've forgotten most of what I did in college.  Also, I'm not sure if I'm making any sense at the moment.  If I've left out anything, let me know--I can clarify it for you.  ^_^

Best,
my name


I wonder if anything will eventually come of this?

ETA: Forgot to mention that the whole discussion came about because we were talking about fiction and writing, and Rolf said something about how writing seems to be the last thing some games think about. Can we have more Grim Fandango please? That was a really funny and REALLY COOL script. Heck, Planescape: Torment would be nice. Ah, it's nice to be going home--I'm going to get my old games and start re-playing them. I forsee fic output dropping in the future.

ETA2: In other news, my DS owns my soul. *sighs* I really should be in bed.

Tags:

Comments

grain_king wrote:
Sep. 9th, 2007 08:22 pm (UTC)
*points to both Planescape: Torment and Grim Fandango on his shelf*
Those are two of my favoritest games. No lie.

I'm not buying a DS since they remade FF 4 and FF: Tactics. If they made a Chrono Trigger re-release and I owned a DS, I'd be done for.
[info]aiwritingfic wrote:
Sep. 9th, 2007 10:35 pm (UTC)
Ah, it's too late for me. T_T They made a Tenipuri game for it, and I bought the game.
[info]lestatlinc wrote:
Sep. 15th, 2007 07:29 pm (UTC)
To me, a system like this has two critical flaws to be able to deliver realistic/human AI.

Firstly, it's purely reactive. It's only based on receiving an input and providing the appropriate output. That won't cover cases where you start doing something with a goal in mind, but not directly related to a specific input or something you have in front of you. We would never study for years at the university, or do any planning otherwise.

Secondly, it doesn't take into account complex human elements like beliefs or social relationships. Granted, all can be boiled down to a few internal numbers in simple examples, but appropriately modeling these concepts is a lot more involved.

That said, this system can be useful to create AI for a simple animal. I'd bet the AI behind Nintendogs uses something very similar to this. The Sims does, as well, and it makes it obvious to the player. However, on top of the large amount of work required in tuning a system like this (even if you use automated learning first to get a workable version) we have to create a presentation layer, that will translate the output "I'm depressed" into something like a sad-looking dog. This is where things start getting really expensive.
[info]aiwritingfic wrote:
Sep. 15th, 2007 11:19 pm (UTC)
This system is not meant for main characters, or characters where you expect any sort of more active involvement. It really is meant for animals or "random NPC"s. Passivity is alright in that case--the focus should be on other things and main characters; it's also alright for things to be simplistic.

If you want anything to be more active/aggressive, yes, you're right, this won't work. But in games, that's not required for what are essentially background people who are just required to react to our game characters in essentially human ways.
[info]aiwritingfic wrote:
Sep. 15th, 2007 11:21 pm (UTC)
Ah--also, yes, presentation layer is important. But it's already required in current game development to a certain extent--you already have to script and develop actions for background characters anyway.