Jump to content

  • Log In with Google      Sign In   
  • Create Account

Yet Another NPC AI thread


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
29 replies to this topic

#21 Cadet Random   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 August 2000 - 01:18 PM

The subneeds of a need, the "parent need", will encompass everything that an NPC can think of to satisfy that need.

Subneeds can be derived from needing an object or world-state to perform the fulfilling action... Eg, to get food, I''ll need money, I''ll need to be near a shopkeeper, and I''ll need to have asked him for the steak, THEN I can give him my cash.

Or, as discussed above, they can be various "strategies" that are there.

The subneeds go in a big set and are ordered by the priority (which has been calculated by our little functions). So, the "get money" need would be outweighed by the "stay away from enemies" need as the NPC walked into the goblin vault

The function for f will depend on the need... I haven''t thought about the details of it yet, but I think it will be based on some kind of learning...

Sponsor:

#22 St_Shadow   Members   -  Reputation: 134

Like
Likes
Like

Posted 03 August 2000 - 09:27 PM

The magor thought that drew me to this topic and the mailing list is the idea behind what Cadet has been talking of....of allowing one to set up the basic wants of a character. For example setting the survive instinct so to speak lower and upping the make me happy with a sub of money makes me happy creating npc adventurers. What I''ld like to see is some possible way of creating the all of the villans in a rpg world with this system, but I''m not sure how indepth this needs and scheduled system will go towards making a dynamic villan for a world. Example Bob decides he is sick of having to fight drunken bar patrons and wants to take over the town and toss them out...how would he come about such wants and how could he through the schedule and needs system overthrow the realms lord and become ruler himself.

#23 dwarfsoft   Moderators   -  Reputation: 1217

Like
Likes
Like

Posted 03 August 2000 - 09:55 PM

That would be a seperate topic than scheduling wants and needs... What it would be is a quest... Randomly generated (much like the random monster genetics of another topic ). Maybe even it could be a schedule, if you had such stats as "happiness" or whatever or "lunacy" ... Anything is possible


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)

#24 Griblitz   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 August 2000 - 12:15 AM

This is my first post here ever, but I believe you have been discussing what I''ve been trying to do for about 2 weeks now, which is NPC AI. Glad I found this thread...
I''ve been reading all the ideas about schedulling (great notion) and needs-hierarchy and all those things apparently may fit well together.

Just a thought then: You defined the NPC existential goal as 1.Stay alive and 2.More Happiness, less Sadness.
This would be fine for a common NPC. What if death is in the NPC plans? May be it will take him to another plane of existence that suits his/hers plans. Would "getting killed" be inserted in the list with high priority? This is just an example, but is there a possible "needs-conflict"? I may be sounding stupid, but the ideia is to broad the horizons.
What if an NPC is defined a GOAL? or a set of principles that dictate its personality and that map its needs priorities diferently? This would allow "evil" NPCs or "chaotic" NPCs.

Another thing: How would you map actions or events? How does the NPC knows is a detemined action or event contributes (or not) to a need he may have? Ex: Bob is fighting Rex (another NPC), and he has a need : defeat opponent (Rex). Rex suddenly breaks his weapon. Bob would then charge more fiercly to end the fight quickly. How would he know that this would be the "better" course of action?

I don''t know if you have already discussed this, but I''ve only found your thread a short while ago, so if I''m picking on a over-discussed topic, I apologise...

Keep that Brainstorming flowing...

See ya

Griblitz



#25 dwarfsoft   Moderators   -  Reputation: 1217

Like
Likes
Like

Posted 04 August 2000 - 12:27 AM

Welcome... First off though, you have to be careful with that death priority, otherwise everyone turns into lemmings and is dead in 5 seconds anyway

If you are terming death as in the Warhammer Dwarven Slayers, then they still have a "stay alive" part to their priorities. They want to kill the biggest baddest demon that they can find... They don''t care about getting killed, but they will still try to avoid it

Evil or chaotic NPC''s just have different scripted priority lists, Needs and sub-needs. They need to "take over the world" by they still need to eat right? Handled in exactly the same way, just with a different setting

If you base the system on the "learning system" that we have discussed elsewhere, Bob would know what is more likely. If he had hardly hurt anyone then his weapon breaking would give him the priority "RUNNAWAY!" and if he had the upper hand, then he could evaluate how much damage he does vs. how much damage his opponent does and which is likely to die first (if there is a hit each time ). Simple eh?

Be not afraid to pick at any thread... for it may unravel into a nice ball of silk ... That sounds like a cool quote.. I just made it up then . Seriously, any of these speculative topics continuously need new input and new discussion... Thankyou for reviving it (otherwise I would have been waiting another 10 minutes for someone else to post something ).


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)

#26 Griblitz   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 August 2000 - 12:50 AM

I would like to take a look at that "learning system" you referred to. Can you point me?
My main problem right now it to make the NPC decide what his next action will be. He has a present state (needs and scheduling) and something happens that changes that. What will he do next? (May be that "learning system" will help). The idea is to map the highest priority need into actions, right?
If need is "eat", then how does he knows he has to find food or go to a tavern or hunt or something that will fulfill his need?

I had an idea of giving weights to events or actions. There would be 3 kinds of weights: 1.positive, 2.negative and 3.neutral.
These would tell the NPC if the event/action contributed to his need and that would help assess his next move.

Griblitz





#27 dwarfsoft   Moderators   -  Reputation: 1217

Like
Likes
Like

Posted 04 August 2000 - 01:10 AM

OK... here is the list of threads that it could be in:
NPC AI in RPG''s - not likely, but this is where it all started
NPC AI in RPGs (2) - Most likely
Yet another NPC AI thread - this one.. so no way!
Artificial Intuition - doesn''t have it, but is most likely to be of interest to you
A new outlook on RPGs - well... this is a shameless plug

Anyways... About the learning system: Simple definition... As the NPC goes around, she sees another NPC eating a berry... This gets logged in a DB or Dynamic Script file and woohay! Just check if any NPC''s are in range and there you go... using this kind of learning, you tend to leave your NPC''s alone learning the game environment amongst themselves and come back to a smarter lot of NPC''s. This is how you don''t have to specifically tell each NPC what they should be eating. They should have a default food, and learn new ones from there...

The other type of learning is NPC interaction. If somebody does something bad to that NPC, then they need to remember it. This goes hand in hand with Artificial Intuition .

To find the nearest source of food, the script/database loads up all food references (this comes back to NPCese - languages for NPC''s... From our Emailing list; NPCAI) and then decides what is the closest source of food. (A* maybe...). If you define all food sources in groups on your map, then it should be easy for an NPC to find its way around. Also, at the beginning of the game, there could be an initialisation that sets up rally points for food... It then becomes A* (or Dijkstra''s) to find how far away each is. This would also have something to do with the priority... the furthur away they are, the more likely they are to want to go start looking for food.

She knows that she needs to eat because that need has a priority, that priority increases over time. When that priority gets a high enough rating, then it takes over and it *becomes* the task.

Is that all you needed to understand?


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)

#28 Griblitz   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 August 2000 - 04:49 AM

I think I got the picture.
Anyway, I''ve joined the NPCAI list and I''ve been reading the messages so far (right now I''m on 168-of-214..ouch...) and I''ll be posting things to the list as soon I as finish reading all the messages (which might take a few hours). For now I''ve read some very interesting stuff.

By the way, I''m Nuno Flores on the list.

See ya there then

Thanks

Griblitz (Nuno Flores in R.L.)


#29 Eck   Crossbones+   -  Reputation: 3356

Like
Likes
Like

Posted 04 August 2000 - 10:25 AM

I have thought of something similar to this not too long ago when I was thinking of my super-mega-everything-in-one game that will never get finished. But enough of my whining. I wanted to add a little something to what you have said to give each of the npc's a little more individuality.

Each NPC could have a morale value or code of ethics that he/she follows. Certain solutions to priorites would not be on the list for some NPC's but would be for others. Simple example: Let's say Bob is a relatively good guy. Bob could go buy food, look for food, or go home to get some food he has there. On the other hand Fred who is known for being evil could do everything bob could do, or steal food from someone. Each solution could have a morale value assigned to it and based on an NPC's morale value, he has a percentage chance to pick that action. Let's say bob just got hungry but does not have any money to buy food. He could hold on for a while maybe try to earn some cash or try to make it home, but if his hunger got above a certain point, he might steal food. But since fred is so horribly evil it might be his first choice. I hope this helps other people make tons of cool games cause mine is an epic project that will never get completed.

Later,
Eck


Edited by - Eck on August 4, 2000 5:29:00 PM

#30 dwarfsoft   Moderators   -  Reputation: 1217

Like
Likes
Like

Posted 04 August 2000 - 02:45 PM

That still fits into the scheme (at least, my interpretation of it ). Basically you script the individual needs for each NPC, but general ones come from a predefined script. It is really quite simple to add a lot of power to it. Just have conditions of when to put that need in the queue, have a script to actually decide what its priority is based on the surrounding environment and also have timeout for the need (if it is not a requirement, then it could go away.. ie, a meeting ).

Over in the Goblin Game Developers forum (on www.ezboard.com) they have come up with an XML definition/scripting language that could be useful for using in NPCAI


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS