Recently I have been trying to create an npc system that is based around AbyssDragon's Parser but I ran into a snag on using parameters within parameters (its to do with the library which I haven't really looked at).
I was planning on using this system in conjunction with a sort of genetic procedure where 2 NPCs 'breed' and produce a combination of the 2 (hence the title).
Anyway has anyone tried doing this? Can they share some snippets and ideas with us all or explain some things? Especially to do with the fact that I'd need to make a small programming language that can be changed on runtime.
ID:151874
Dec 9 2008, 7:37 am
|
|
In response to Euphemism
|
|
Neither of those is what I meant at all. heh.
I was referring to programming NPC behaviour and making them more human like through a sort of evolution. |
In response to Lyndonarmitage1
|
|
Like, learning from a human?
It could be done, I'm sure. It'd just require ALOT of coding. :| Like... some variables like: isfun, isboring, isdumb and other things that it could learn. I'm sure the NPC coding would be pretty long, too. So you mean an NPC asking a series of questions and learning what the player likes and the NPC learns and acts influenced by it? |
In response to Euphemism
|
|
It's not learning, it's a mixture of characteristics between two different NPCs to influence the actions of it.
|
An easy way would be to have a list of characteristics for each npc, then somehow (probably randomly) combine them when breeding.
I don't really see why you would need a programming language for this, though. |
When in doubt with this kind of thing, follow nature. Nature randomly takes one of two traits from the parent, and then mixes the two. In complete dominance, one trait masks another. In incomplete dominance, the trait is in the middle between the two. In codomincance, the both traits are expressed.
//we will group them in twos, and give them true/false values |
In response to Nickr5
|
|
A language allows it more freedom to grow and adapt.
|
In response to Jeff8500
|
|
This has given me the idea of scrapping trying to make a language to be parsed and instead having fixed genes that can be called depending upon random traits.
.[X] = pick(set1[X],set2[X]) |
In response to Kaiochao
|
|
Technically it does 'learn' and adapt to it's environment because of environmental pressures.
|
In response to Lyndonarmitage1
|
|
In actual genetics, parents have an equal say in every gene, so yes, it is over simplified. You can do something similar to what I did up top, where you multiply X by two, and then for each number in the list, you can set one of two genes with pick() and the other (X+1) with the left over gene.
EDIT: If your really wanted to get insane, you could go down another level, into actual nucleotide sequences. That would be borderline crazy in BYOND, though. |
In response to Lyndonarmitage1
|
|
Acquired characteristics of organisms don't pass on to offspring, but the organism itself learning is completely different(it's not genetic).
|
In response to Kaiochao
|
|
The reason learn was in quote marks is because I didn't literally mean it as learn in the sense of "no don't do that!" but rather the idea of instincts and evolved characteristics.
I probably sounded a bit vague though so sorry for the confusion. |
In response to Lyndonarmitage1
|
|
Genetic memory as far as I know only exists in science fiction :)
|
In response to Jeff8500
|
|
Jeff8500 wrote:
When in doubt with this kind of thing, follow nature. Nature randomly takes one of two traits from the parent, and then mixes the two. Nothing in nature is random. There are only enough factors involved to make seemingly random events seem random. |
In response to Lyndonarmitage1
|
|
Lyndonarmitage1 wrote:
Technically it does 'learn' and adapt to it's environment because of environmental pressures. Technically, it doesn't learn. True AI has not been accomplished yet because of the fact that computers cannot efficiently learn anything yet. |
In response to CaptFalcon33035
|
|
There are only enough factors involved to make seemingly random events seem random. True, but there are so many factors that the word random is the only one that fits. |
Make a variable containing NPC text, you're making it sound so much more complicated then it really is.
Or do you mean...
Making NPCs look like the offspring of some?
That's icons. (:
I'm not sure if this is what you meant, but the idea of using variables for text in NPCs intrigues me... I'm off to go experiment! Thanks for the idea! (: