Best way of defining NPC behaviour

Started by
41 comments, last by C-Junkie 19 years, 7 months ago
Weird.
Advertisement
Since I saw no reason for those posts, I have deleted them.
Quote:Original post by Mushu
I agree competely with you. That's why I suggested genetic algorithms . I just use scripts because they're faster to write (and no training is required!)

Yes, genetic algorithms can "help". But they require a lot of work to evolve them to the point where they actually become useful. Scripts also have their use, especially for driving the story.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

I think there are really several problems to solve with this NPC AI system.

First, there's no real reason that needs and goals are seperate. They're pretty much the same. The only thing you really need to tack onto this kind of an idea is the ability to pursue several tasks simulaneously. If an NPC decides to go on a quest (another problem: what sort of desire spawns THAT?) and walks out and gets hungry, he shouldn't walk back in to town and eat at a tavern. He'd never get anywhere. Ideally, he'd plan (another problem: HTF do you plan?) and bring some food, but I guess it'd also be acceptable to hunt.

The point is to be able to pursue Priority Number One while not hurting Priority Number Two.

The thing is, you have to do that sometimes. Going off to slay the dragon means your store gets boarded up, or something. So, and obvious goal is provide some kind of rich, contextual relationship between goal/need/want/desires, and use a priority system ontop of that.

This way, ShopKeep and SlayDragon can be defined as mutually exclusive. Then, the priority system knows that when SlayDragon gets important, it's time to stop ShopKeep.

Depending on the magnitude of the priority inversion, different results would be possible as well. Completely drop everything and run off, board the place up and run off, train apprentice for a few months and then meander off. (another problem: how can you enumerate the possible methods of performing some action (in this case, termination of the task ShopKeep))

I've also heard it mentioned about keeping innate qualities and memory seperate. I'm not convinced. Keeping them seperate means you'd have to have some method of changing innate qualities outside of new information. How do you keep an NPC from believing in Ra after he sees SG-1 walk down the street and blast Ra's palace out of existance...

I think this AI system might be far FAR more memory intensive than CPU... By a few orders of magnitude.

oh yes, and end goblin genocide.

This topic is closed to new replies.

Advertisement