NPC AI

Started by
46 comments, last by Nazrix 22 years, 3 months ago
also, if you just cut down the graphics, sound, and house building and such, the sims is just a giant tamagotchi
"Luck is for people without skill."- Robert (I Want My Island)"Real men eat food that felt pain before it died."- Me
Advertisement
quote:Original post by Timkin

Egads! That would mean that the 27 years I spent in school and University receiving an education and the years of research I have done have been complete folly and that my PhD research is a waste of time! That sucks! Anyone got an opening for an over-educated dishwasher?


heh

well what I really meant was game AI is more an imitation of reality. Real, academic AI in which they don't have to deal so much with graphics, physics, etc draining the CPU can be much more versatile and elaborate where AI in a game (especially a real-time one) cannot. At least that's what I have gathered.

If the AI in a game can appear to do what you want, then that is what matters. Whether the Sim's AI was a well-designed series of if statements or a state machine or some such doesn't matter as long as it performs the tasks the designers are looking for. The same thing goes for physics and other such things. It doesn't have to perfectly model reality down to every molecule if it performs the way you want. If we had a AI accelerator card or some such thing as we do for 3D graphics it would be another matter entirely I believe.

Of course this is only my realitively uninformed opinion

A CRPG in development...

Need help? Well, go FAQ yourself.

Edited by - Nazrix on October 18, 2001 6:19:16 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
quote:Original post by black_mage_s
Im pretty sure that the sims AI wasnt even AI at all. If you look at the opening sim creation scene, you select your sims behavioral qualities. the game probably just runs those choices through a bunch of if ... then statements and the ambiant movement is random

I don't want to get into technicalities but IMO even Pac-Man had a game AI. It's simply the part of the game code/design that controls the computer-controlled entities.

About the Sims's AI, what I've read about it indicates that the people have desires and different things in the world send out signals of what desires they'll fulfill.

i.e. a person is hungry and a refridgerator would sent out a "food" signal. The person would go there to get food.

A CRPG in development...

Need help? Well, go FAQ yourself.

Edited by - Nazrix on October 18, 2001 6:40:31 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
quote:Original post by Timkin
Original post by Nazrix
AI is merely an imitation of reality and behaviors.


Egads! That would mean that the 27 years I spent in school and University receiving an education and the years of research I have done have been complete folly and that my PhD research is a waste of time! That sucks! Anyone got an opening for an over-educated dishwasher?


You know, Nazirix is right. No matter how sophisticated AI is, it is only an imitation of the mind, and an approximation of intelligence. Please don''t think I''m discounting your experience, Timkin - but a computer just isn''t an intelligent entity, so all AI so far is really an imitation of true thought - if such a thing can ever be defined in terms of the logic a computer uses.

quote:Original post by Nazrix
AI is merely an imitation of reality and behaviors.

quote:Original post by Timkin
Egads! That would mean that the 27 years I spent in school and University receiving an education and the years of research I have done have been complete folly and that my PhD research is a waste of time! That sucks! Anyone got an opening for an over-educated dishwasher?



You know, Nazirix is right. No matter how sophisticated AI is, it is only an imitation of the mind, and an approximation of intelligence. Please don't think I'm discounting your experience, Timkin - but a computer just isn't an intelligent entity, so all AI so far is really an imitation of true thought - if such a thing can ever be defined in terms of the logic a computer uses.

ANYWAY, back on topic...

My only other comment is that it may take effort to determine how fundamental the actions that an NPC can choose from should be. Should they be "move hand, move foot" or should they be something very high level like "do the entire quest using the following set of steps?" Of course, it should be neither; the actions need to be somewhere in-between. But where exactly in-between I don't know!

Edited by - TerranFury on October 18, 2001 8:50:38 PM
quote:Original post by TerranFury

You know, Nazirix is right. No matter how sophisticated AI is, it is only an imitation of the mind, and an approximation of intelligence. Please don't think I'm discounting your experience, Timkin - but a computer just isn't an intelligent entity, so all AI so far is really an imitation of true thought - if such a thing can ever be defined in terms of the logic a computer uses.


Yes I agree. NN's and other such things do get much closer to "real" intelligence but games do not have the time to spend on such things.

And I don't discount your knowledge either, Tim. Any and all knowledge is incredibly valuable whether its applied directly or indirectly. But that is an argument for another thread



quote:
My only other comment is that it may take effort to determine how fundamental the actions that an NPC can choose from should be. Should they be "move hand, move foot" or should they be something very high level like "do the entire quest using the following set of steps?" Of course, it should be neither; the actions need to be somewhere in-between. But where exactly in-between I don't know!


Right. There must be a medium. In my opinion, the lowest components are things like "Get", "give", "move", etc

Then higher level actions combine those lower ones. So, it's really just a big list. Not very fancy, but hopefully it will make for interesting gameplay.

But what my imagination started forming was: what if NPCs could figure out how to combine those actions to get to a goal on their own but maybe TimKin's right and that you'd need something more robust to get to that point.

I started thinking that perhaps the game could run so many iterations before the "real" game started so that NPCs could find out on their own ways to attain goals using the actions and learn their own strategies based on that by making associations between combinations of actions and attaining goals. I'm not sure how realistic of a plan that is though.

A CRPG in development...

Need help? Well, go FAQ yourself.


Edited by - Nazrix on October 18, 2001 9:20:01 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
About the AI in The Sims: according to the Official Strategy Guide or somesuch, the lower a desire bar is, the happier a Sim becomes by raising this desire bar. Every few seconds, each Sim makes a list of which actions will raise its happiness the most, and then picks one of the top four. That gives it some degree of randomness without doing stupid things like eat food when full.
So long as this aspect of the thread does not divert away from Nazrix''s original problem about utilising desires to drive planning, then I am happy to allow it to continue. Ferretman may of course choose otherwise!

I think it is important to recognise the distinction between Game-AI and artificial intelligence. Most people programming bots or sims or units in a game do not claim to be building an artificial intelligence. On the other hand the little agents running around in the Creatures series of games were artificially intelligent agents and their architecture utilised desires very effectively. In general - because this is a game AI forum - we should not need to clarify that we are talking about Game-AI or AI in general, however at times it may be necessary so that certain comments are not misconstrued.

As to the comment about AI being an imitation of the mind... well that is probably a discussion best left to those on comp.ai.philosophy. I will say though that yes, there are aspects of AI that concentrate on mimicking human behaviour. This is certainly what we are discussing in this thread. There are however, aspects of AI that are concerned with discovering just what intelligence is and what it means and this does not require that it be a ''poor copy'' of human intellect. In fact it has little to do with ''human intellect'' at all.

quote:Original post by Nazrix
Yes I agree. NN''s and other such things do get much closer to "real" intelligence but games do not have the time to spend on such things.


Given the extremely cheap cost of processors I think we can expect to see some greater increases in CPU cycles being devoted to Game-AI in the future. This is simply because more and more of the graphics workload is being handled by dedicated hardware. Given more clock cycles, Game-AI will finally be able to make extensive use of the real body of knowledge that exists in the AI community today and not just a few ''buzz-word'' tools like Genetic Algorithm and Neural Network!

quote:Original post by Nazrix
Right. There must be a medium. In my opinion, the lowest components are things like "Get", "give", "move", etc


This is why I mentioned the STRIPS planning language. You can specificy all of the actions possible by your agent as operators that can be applied to a knowledge base (in this case a list of predicates) to infer which actions will result in successfully achieving a goal. As I said, the STRIPS language has problems with it, however it should suffice for your domain.

quote:Original post by Nazrix
Then higher level actions combine those lower ones. So, it''s really just a big list. Not very fancy, but hopefully it will make for interesting gameplay.


This would be hierarchical planning. First plan at a high, abstract level: Buy Food + Eat Food => hunger satisfied. Then break each action down into simpler actions: Get Money + Go Supermarket + Get Food + Pay Cashier = Buy Food. You can see where this is going. Good hierarchical planners can interleave the lowest level of actions to perform the most efficient combination of actions that achieve the high level plan.


quote:Original post by Nazrix
I started thinking that perhaps the game could run so many iterations before the "real" game started so that NPCs could find out on their own ways to attain goals using the actions and learn their own strategies based on that by making associations between combinations of actions and attaining goals. I''m not sure how realistic of a plan that is though.


You would want most planning to be done online as one would expect that the players interaction with the game world would affect the outcomes of plans. If the player is not interacting with an agent, then we dont really care if the agent found the plan online during game time or it was hardcoded before release.

So perhaps consider two methodologies. For those agents going about their daily lives that are not interacting with the agent, give them scripted behaviours. For those that the agent could interact with, allow them to plan our there actions.

Just an idea.

Cheers,

Timkin
quote:Original post by Timkin
I think it is important to recognise the distinction between Game-AI and artificial intelligence. Most people programming bots or sims or units in a game do not claim to be building an artificial intelligence. On the other hand the little agents running around in the Creatures series of games were artificially intelligent agents and their architecture utilised desires very effectively. In general - because this is a game AI forum - we should not need to clarify that we are talking about Game-AI or AI in general, however at times it may be necessary so that certain comments are not misconstrued.


I aggree

quote:
Given the extremely cheap cost of processors I think we can expect to see some greater increases in CPU cycles being devoted to Game-AI in the future. This is simply because more and more of the graphics workload is being handled by dedicated hardware. Given more clock cycles, Game-AI will finally be able to make extensive use of the real body of knowledge that exists in the AI community today and not just a few 'buzz-word' tools like Genetic Algorithm and Neural Network!


That is good to hear and is probably accurate since people are starting to appreciate AI in games as much as good graphics since games such as Half-Life and Thief.

quote:
This is why I mentioned the STRIPS planning language. You can specificy all of the actions possible by your agent as operators that can be applied to a knowledge base (in this case a list of predicates) to infer which actions will result in successfully achieving a goal. As I said, the STRIPS language has problems with it, however it should suffice for your domain.


yes, I'll look into STRIPS...


quote:
This would be hierarchical planning. First plan at a high, abstract level: Buy Food + Eat Food => hunger satisfied. Then break each action down into simpler actions: Get Money + Go Supermarket + Get Food + Pay Cashier = Buy Food. You can see where this is going. Good hierarchical planners can interleave the lowest level of actions to perform the most efficient combination of actions that achieve the high level plan.


Yeah, that's precicely what I've done thus far. I've already begun implementing that concept. Then I started thinking how mechanical it is to have to create combinations of actions as a designer. I started thinking whether the NPCs could learn or figure out how to combine those actions themselves due to learning by trial and error or by other means.

Executing the higher-level plans is not what worries me. I just wondered if there's an alternative to pre-computing all of those higher-level commands which are combinations of the lower-level plans (such as "move", "get", etc)

Edited by - Nazrix on October 19, 2001 3:02:40 AM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Naz, I suggest you do some reading on planning methods. It will certainly help with what you are currently doing and will give you some more depth to help implement your other ideas. Russell & Norvig''s book (Artificial Intelligence: A Modern Approach) is a good starting point. It also contains references to more specific work in the planning field.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement