Sounds good. Certain types of things (like the locations of non-moving places on a map, or information about other characters) need not be stored once for each NPC. Each NPC can store a pointer to this information.
You don''t neccesarily need to use a timer for short term memory either. Instead you could use a stack. Every time the NPC encounters something new it gets pushed on to their short-term memory stack. The last thing on the stack gets discarded. You could make NPC''s more or less ''intelligent'' by altering the size of their short-term memory stack.
that is an excellent solution, anyway, if you were looking for something very very realistic, to have 60 secs of memory wouldnt be that... humans have more... However, to reset the non-important memory is necesary, what if... the character doesnt get any new info for the past 2 days, or week... (game time, not real time, unless the game uses real time =P) erm, he is lost in he woods... or locked in a jail, alone... i dont know... Since this is supposed to be an RPG game, the user might want not to make a single move, thus his memory should be deleted... maybe to have a timer, so the character loses his last or the last (insert a number) memories..., just to make it simple... The timer starts as soon as you get your first memory, and it stops acting as soon as you have zero memories (so a new memory wouldnt get deleted 3 seconds after getting it), to start again when you get a new first memory... Using this and the Max Amount of memories would work fine...
This way, the NPCs wouldnt lose memory..., (and if you make the timer global, it wouldnt work the 'right' way), they could survive just with the maximum amount of memories code though, since they wont stay still for long times...
It's amazing how the same discussions and same solutions keep cropping up in this forum. We had this discussion a few years back here on GD.net. The solutions mentioned here are basically the same as those mentioned previously, although I think the previous discussion was more detailed and considered more of the issues that arise in information transfer systems. You might then want to look back through the archives from about 1.5-2 years ago for communication in RPGs.
Cheers,
Timkin
[edited by - Timkin on October 7, 2003 10:27:19 PM]
there is also the sims method for satisfying needs. instead of having your charachters remember where thngs they need are, things (on the map) broadcast the needs and wants they are capable of satisfying. in this way, if your charachter is hungry and walks by a food stand, he stops and gets some food, because the food stand says "i can satisfy hunger." in the case of a flaming building the fire may broadcast an "i can satisfy bravery need" while a spot outside the building says "i can satisfy safety need." in this way, you build the intelligence into your world, and the charachters can actually be pretty dumb.
just a thought
btw Anonymous Poster #1, that is a very interesting sounding project, if you publish it online, you should post a link on this site.
The project slowed down cause I have the GUI due for the OS I am heloping to make. :|
I am thinking to use the stack method of memory WITH a timer. But, the memory will last 2 minutes in real time. If an organism focuses on using that memory, the remember time is expanded.
In other words. If I am in the game, and I remember that the way out the forest is west. Now, if I keep *using* (reading the struct), then the struct will last longer. Now, if the struct is used maybe like 10 times, the organism acquires an extra memory block, good?
do you mean 4 mins instead 2? you can do it by having an integer value block. if the memory gets a new block, then block++; if the timer runs out then block--; and start the timer again, and if the block was equal to zero... then the memory is deleted instead block--;
hmmm, that is a good idea to use a global timer but still be able to handle the memories of different characters, including the NPCs... You can make some memories to start with a higher block value meaning that type of memory is too important to forget about it quickly.
now, if each memory will have its timer, you could assign each new memory the "timer number" (which is the number the "timer" is right now, from 1 to 120 -> 2 minutes), then having a "timer" that will return 0 then 1 then 2... then 120, then 0 again would do as a timer for each entity, but it would still be a global timer. If the memory.timer_number == return(timer); then block--;
if you use a timer for each memory, then you have "n" memory.timer, if memory.timer = 0 block--;
if you use one global "timer" "1" timer, if memory.timer_number=timer block--;
There is something i dont know, i hope you can make it clear. If there is a global ''timer'', there will be 1 sentence each second (timer++) 1 evaluation each second (timer==120?), then each memory will have to evaluate each second (N sentences, memory.timervalue==timer?), and be deleted/reduce block if the result is true. If each memory has a timer, then there will be N timers, there will be a timer++ each second (thus N sentences), then each memory will have to evaluate its timer to see if it is zero (?, N sentences more?, does they evaluate each second, or do the memories just dissapear when the timer is zero without having to evaluate each second?) If they evaluate each second, then the first solution is better...
Well you''re trying to make the AI act like a human right? You''ve answered your own question.
If I want to look for a horse, I''ll *LOOK* for a horse. So just do a quick search for any horses in the near area and you''re done. If there aren''t any horses "near", then either expand the search out a bit, or move to a new location.
quote:Original post by Timkin It's amazing how the same discussions and same solutions keep cropping up in this forum. We had this discussion a few years back here on GD.net. ... You might then want to look back through the archives from about 1.5-2 years ago for communication in RPGs.