Advertisement

why make scheduling so strict?

Started by August 03, 2000 11:45 AM
14 comments, last by C-Junkie 24 years, 3 months ago
Scheduling does not have to be a strict "time-action" sort of thing. Times could be associated with actions in the NPC''s memory. Then Priority lists can be built off of basic needs and memory and superficial needs(you know...that super computer you always wanted...) Consider this: -NPC1 and NPC2 are in the same bread store. -after a reation test, they greet each other (old friends). -NPC1 invites NPC2 to come to a party she is having. -NPC2 checks his memory for anything going on at that time, and accepts. -NPC2 gets that time/date associated with NPC1''s Party in his memory (start time, end time, place)) -NPC1 get NPC2 associated with her party. then later (borrowing the idea of a drunken brawl): -NPC2 is unintentionally caught in a fight with a couple of drunks -NPC2 at the moment doesn''t care so much about sny party than surviving -as soon as he escapes the fight, he realizes that he''s late for NPC1''s party -NPC1 also wondering why 2 is late -upon 2''s arrival, he''s greeted and asked for an explanation -NPC2 feeds out the story according to his own memory... did I go on a bit long there? anyway, the priorities during the fight would be something along the line of: (F=fixed, V=variable) 500F Self-Perservation (don''t let the drunks kill him) 253V Maintain Self (sub of above, overridden for schedule) 100F track associations known (goto party) "Maintain Self" would be food, and it was overriden by the party because: Memory association, (party=food&people) I''m going to stop now for the sake of space, but basically the idea is to have a list of priorities kept in check by memory. Hope I covered everything I wanted to...
Why not use layered schedules? Base priorities are on the bottom (self-preservation, etc.), then you have a standard schedule with wake up, eat, work, eat, work, play, eat, sleep in it (with various priorities), then have the dynamic schedule on top of that. The top layer takes interaction, memory, etc. into account and can override lower schedules up to a point. So if you have a party scheduled, dinner is overridden, because the party provides that, but if it turns out you''re being sacrificed to pagan gods at the party, self-preservation suddenly jumps to the top and you run away.


Pax
p
Advertisement
To add something I just thought of, what about situation mood? This isn''t really NPC AI based, but if we can determine a mood of a situation relative to the character, this would help quite a bit in ordering priorities.

Using the same example, the party would normally have a jovial and satisfied mood, making it a high priority in conjunction to "pursuit of happiness," but if you''re going to be a sacrifice, the mood suddenly changes to threatening, and self-preservation moves up.


Pax
p
My primary gripe about schedules is that they are too fixed.
I was thinking more along the lines of 5 cooperative controllers for the NPC, rather than one.

Instincts, Memory, Personality, Emotion, and Logic.

All of which would have an equal say in what the NPC does...
Each has the ability to override or refine decisions of the others. Sort of like the US government, but I''m not getting into any details there.
Example situation:

1 The Instincts determines that the NPC has to eat soon.
2 Memory determines a List of places to eat.
3 Personality changes the list based on how much the NPC is willing to spend on food, and the quality the NPC expects from his/her food.
4 Emotion does not really take an active role here
5 Logic determines if now is a good time to eat (no more eating during a fight) and the closest place, or (in the case of my first post) that the current flow of events is likely to result in fulfilling the directive.

That example really doesn''t include Emotion, though...
OK, I just realized that Logic should be higher on the List and "Emotion" has little effect on activities...
My revised List:
Instinct - Memory (and skills) - Logic - Personality

OK, now take the classic hungry guy fighting...

The Instinct for self-preservation is more important than Eating, UNLESS not eating is more likely to kill NPC than fighting. And at that point the NPC is not just hungry, he/she is STARVING.
IF during combat, Eating becomes more important, Memory, Logic, and Personality are still there to find a way to temporarily(?) eliminate the threat of attack, while at the same time allowing the NPC to eat.

For instance, in the NPC has a "Magic Potion of Invisibility", he/she might drink that and find a spot out of the way to quickly consume some rations, or run away altogether and stop at a store some distance away.

However, of all the algorithms I''ve come up with for AI, Eating during a fight has never been a problem. Why? Well, the fight would have to be a EXTREMELY long time, or the NPC would have to be starving already, in which case, he/she COULDN''T eat during the fight because there isn''t any food available.

Back to the Topic at hand...
Schedules can be implemented in memory because, as long as the NPC''s well being is assured, Memory is the next action taker.
So unless the NPC is fighting, the Memory check will show that he has to be somewhere soon, and will start heading there.
This is what I meant about having floor and ceiling values for each. This would allow certain priorities to overlap. Just a note though, no battle should last long enough for an NPC to die of starvation... They should have eaten a loooong time ago... And they should be tired by then ... Just an objective observation


-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 :)
Advertisement
Why would emotion not take a significant role? Emotion is an incredible driving force in what we do. I leave work at 5 because I want to see my family. That''s emotional. I''m willing to kill to protect them. That''s emotional. To say emotion does not influence our actions is to say we are heartless zombies only acting in our own best interest.


Pax
p
And you are saying that your emotions cant be put into this system? I am sure they can . Why was he fighting? That was emotion, just stimulated through a different priority. It doesn''t need to have an emotion priority, but you could add one if you wanted... Mmmm... flexibility


-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 :)
I apologize, I didn''t complete my thought.
Emotional needs has too little effect on the pipeline to be considered it''s own Layer. I should have said that it is inside the "Personality" layer.
I''m not eliminating emotion here. How the NPC feels toward each other can be represented in the Memory layer. How that effects actions would be in combination of Personality and Memory.

dwarfsoft: your right. Fighting to stay alive is emotion. It just occured to me that there needs to be a driving force that motivates the NPC to stay alive...hmmm, now how could an NPC become depressed...?
Depression: If they couldn''t complete x ammounts of tasks scheduled due to arising circumstances (ie, Bob would miss his meeting ).

Also, we talked somewhere about using values for hormones running through the NPC, these kind of stimulae actually could account for anything that the NPC does, but it is all up to your implementation as to how well either works


-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 :)

This topic is closed to new replies.

Advertisement