Bay 12 Games Forum
Dwarf Fortress => DF Suggestions => Topic started by: Burmalay on January 09, 2014, 08:25:32 am
-
So - (I choose a strength stats here for example):
1 2 3
heredity actual progeny
M 110 80 94
F 60 50 75
M3 = 25*((4*M2)/M1+F2/F1) - calculation for male hereditary strength cap.
F3 = M3*0,8 - female are a little bit weaker than male, so female inherit only 80% from a strength of male cap.
M - male
F - female
heredity - skill cap, which inherited from parents.
actual - current skill level of one of a spouse.
progeny - skill cap, which will be inherited by children.
When a child will growth his stats comes to 50 for male and 30 for female (it can be deferent numbers, depends of skill (Strength in example)).
So there can't be irreversible degradation, but the irreversible progress can't be ether.
We have 125 cap for the strength skill (numbers are just an example).
Back to the formulas -
M3 = 25*((4*M2)/M1+F2/F1)
F3 = M3*0,8
Simplistically for male: (M3=125) = ((M1=125) = (M2=125))
(M3=125) = ((M1=50) = (M2=50))
When "M1 - heredity - skill cap" equal "M2 - actual skill" then "M3 - progeny" will have a maximum (125) skill cap (It's only for male range. In the formula we have a "female influence" on result).
As result:
1 2 3
heredity actual progeny
M 125 125 109
F 80 30 88
We have a strength skill at it maximum for male (125 - 125), and female with a lowest skill level 30 in cap of 80. And a progeny inherit 109 (regress) skill cap for male and 88 cap (progress) for female.
The next gen with the same "actual" skills:
1 2 3
heredity actual progeny
M 109 109 109
F 88 30 87
So there is "no" degradation even if have only one parent with the highest skill. The progeny will have pretty high skill cap.
But dwarfs works hard, and the lowest value of skills level just can't be, so we can increase a female skill up to 50:
1 2 3
heredity actual progeny
M 109 109 114
F 88 50 91
We have a progress in skills cap.
Now about degradation:
1 2 3
heredity actual progeny
M 125 50 48
F 100 30 38
We have a spouses with the minimal "actual" skill levels. 50 - male, 30 - female.
But the next gen will have much higher level cap for progeny even if the parents doesn't use they skills ever:
1 2 3
heredity actual progeny
M 48 48 120
F 38 30 96
That's how it works.
We have not only a strength, but many other skills, so it would be OK. We can't control birthrate and can't grow an indigo in all skills.
-
I don't get it. What am i reading?
This (http://yourwhitepaper.com/whitepaperstructure.htm) might be an interesting read for you.
-
When you don't get it, then you don't need it.
-
Could you write a little outline for what you're trying to show with these formulas? From what I've gathered you're trying to give an implementation of attribute caps and how it's going to be inherited, but the explanations are kind of flowery and the forum formatting doesn't help either.
-
Sorry for that, English is not my native language, but I can try to do something.
...you're trying to give an implementation of attribute caps and how it's going to be inherited...
It is.
-
There's already some kind of attribute inheritance going on, though details are hazy.
Rainseeker: Alright here's one from LASD; 'How much natural selection is going on in Dwarf Fortress and how much is planned? Are there already some inheritable traits that make creature likely to die younger?'
Toady: There is natural selection on the genetics locally right now. It doesn't have larger population tracking, especially for wilderness creatures and stuff, but there is selection in the sense that critters die and there's some variation and so on, and some of the things would be positive as far as reproduction goes so you'd actually get evolution as well. For selection all you need is death for a reason, and that would include things like size right now; if you're a smaller creature you're pretty much more likely to die when you're fighting and so on; and that's selection against the small size because it gets passed on to the children and so on. The thing that's weird right now is that there's no downside to getting bigger and stronger and smarter and it's easier to do; having attribute variability to make a dwarf smarter, it's not like the evolutionary process has to work really hard to figure out how to make something smarter, it's just like 'Oh you're smarter. You rolled the die and you're a little smarter, you know'. So it doesn't take a long time, if you had this you could breed dogs that can write dissertations and open doors and walk around on their two legs in like two seconds, and it would be a very strange society that we'd be living in right now; because the dogs would be involved. So there's going to need to be some kind of change there, but it's in the game now although not for personalities actually, which was one of the things under question; those are all kind of random right now, but it is there for attributes, and appearance modifiers which govern size and anything else like the skin colour and hair.
Capntastic: What are the inheritable traits parents can pass on to their children. Personality, preference for certain attributes, etc. ... a curse perhaps?
Toady: Currently what we've got are the attributes ... vaguely the attributes to an extent being passed down. It's not like if the parents have two specific numbers it doesn't pick one or the other, but there's a little bit going on there. Then all of the colours, like eye colours, hair colour, I think that uses a dominant/recessive thing now where you pass on two copies and then it picks probably the colour with the lowest index; maybe there's an alphabetic bias right now on which genes are dominant, or it might be the first you listed, it could be the first one you list in the raws that's the dominant gene. I think that's it right now, just attributes and colours, the idea this time around was just to get our feet wet and get something working, and after that really it's easy to add new genes, easy to add all kinds of effects for them. I mean, I have to code it up, it's not something you can just mod in, and of course we'd have to have discussions about this; what's the extent to which personality is passed on versus it being environmental factors and so on, I'm sure we can have all kinds of wonderful arguments on the forums and so on, but right now we're just doing simple things that are pretty cut and dried like colours. Attributes ... it's not quite cut and dried there what passes along and what doesn't and so on, but I think right now that all the attributes pass along, whether or not that's accurate is another question. Also stuff like the shape of the nose and the height modifiers, basically anything called a modifier in the raws - how curly is your hair, how long is your nose, how far apart are your eyes, what colour is your skin/eyes/hair - all those pass along right now, they have genes to pass them along. As far as curses and stuff or whatever ... whatever those end up being we can link it in, but there's nothing right now of course.
-
heredity actual progeny
M 100 80 93 < male line
F 80 40 74 < female line
heredity - skill cap for one of a dwarf's spouses.
actual - actual skill level of one of a dwarf's spouses.
progeny - skill cap, which will be inherited by they children.
In example we have 93 strength skill cap for male child and 74 for female.
this generation inherits it:
heredity actual progeny
M 93 50 64 < male line
F 74 30 51 < female line
when this generation are grows up, they will have a 50 strength for male and 30 for female by default.
This is the basic skills level for strength, when the children will grows up.
then they starts working, those skills will be leveled up:
heredity actual progeny
M 93 89 117 < male line
F 74 64 94 < female line
in example we have strength skills which rised up to 89 for male and 64 for female.
if these persons will became spouses, those children will inherit 117 strength cap for male and 94 for female.
Here is a Excel file - http://rghost.ru/51521298 it's the same thing, but you can change the values and see result of changes.
-
So how is this superior to the current system? How will it enhance gameplay?
-
So how is this superior to the current system? How will it enhance gameplay?
This is just a part of what I want to suggest, but as I said, I'm not good at mathematic, so it can take a time.
For now it's just makes the difference between a man and a woman.
-
There is a problem with "averages" based hereditary - over generations, all individuals tend towards the population average and you no longer get strong or weak individuals. You need to have a digital / binary coding of the "genes" and genetic mixing so that things do not decay in that way. Reading between the lines, it seems you're suggesting what is called Lamarckian evolution? e.g. each offspring's potential is derived from how much the previous generation exercised each skill?
Well let's forget that, and let me show you how it's done:
===
Here's a better system that uses action genetic programming theory:
1. each individual gets 8 bits of "DNA" for each trait. In the first generation, these are randomized. e.g. your strength DNA could be: 00101100
2. Your Strength Gain Factor (SGF) would be equal to adding up all the bits that are 1. e.g. the DNA above gives a base SGF of 3.
3. for sexual dimorphism, you can say males get +1 on SGF. So, a female dwarf who has the above DNA has an SGF of 3, and a male dwarf has an SGF of 4.
4. SGF would be multiplied by all activities that grow strength, and increase your strength cap. Dwarves with SGF zero would have the lowest Strength cap, and Dwarves with SGF 9 would have the highest strength cap.
5. When two dwarves have a baby, the baby gets a random bit from each parent, for each loci. e.g. two dwarves with base SGF 3:
#1 = 10101000
#2 = 01001100
could give
#3 = 11101100, a dwarf with base SGF 5, but if they were unlucky, they could have a baby with base SGF 1. The average SGF of the baby would equal the average SGF of the parents.
6. The baby would get a single gene bit randomized on one location of each DNA strand. This is to prevent unrealistic eugenics where you breed every dwarf to have 11111111 on every gene, and also to allow some freaks to be stronger than their parents even when e.g. if two parents with the same Strength DNA of 11111110 still have a 1/16 chance of getting a baby with 11111111.
There ya go, a working system that encompasses DNA leading to differing growth potential for individuals and encourages selective breeding and evolution.
-
I like it.
There is a problem with "averages" based hereditary - over generations, all individuals tend towards the population average and you no longer get strong or weak individuals.
Even if we have 2 individuals with a lowest skill levels, we would have a progeny with the highest skill cap.
heredity actual progeny
M 10 10 125 < male line
F 10 10 125 < female line
So it's not.
-
Why would two parents with the weakest genes and actual strength give the maximum strength cap? That makes no sense at all and is the opposite of what should happen with a hereditary system. Plus, the idea that the progeny of the weakest couple has the highest skill cap sounds like it defeats the whole purpose of inherited characteristics, and you seem to be contradicting your own formulas there.
Also, that's just not how inheritance works. you don't get smarter kids by reading a lot of books before you have sex, or stronger kids by doing weightlifting before sex.
You could get a better idea of how your idea works in practice by writing simulation code. I recommend learning VBS for that if you're a beginner using Windows operating system.
-
Also, that's just not how inheritance works. you don't get smarter kids by reading a lot of books before you have sex, or stronger kids by doing weightlifting before sex.
It's not about smarter kids, it's about hereditary system & forecast method. Not random!
Why would two parents with the weakest genes and actual strength give the maximum strength cap?
It's like you grow in family where your parents paying much attention to a particular kind of metier. So if a parents not so good in something but have reached the limit of development own skills, but they really love this metier, those child will have interest and predisposition for this matier. Something like this.
-
Yes, maybe it's not so good for heredity, but we can use it for definition of predisposition for any kind of jobs.
-
There's already some kind of attribute inheritance going on, though details are hazy.
Rainseeker: Alright here's one from LASD; 'How much natural selection is going on in Dwarf Fortress and how much is planned? Are there already some inheritable traits that make creature likely to die younger?'
Toady: There is natural selection on the genetics locally right now. It doesn't have larger population tracking, especially for wilderness creatures and stuff, but there is selection in the sense that critters die and there's some variation and so on, and some of the things would be positive as far as reproduction goes so you'd actually get evolution as well. For selection all you need is death for a reason, and that would include things like size right now; if you're a smaller creature you're pretty much more likely to die when you're fighting and so on; and that's selection against the small size because it gets passed on to the children and so on. The thing that's weird right now is that there's no downside to getting bigger and stronger and smarter and it's easier to do; having attribute variability to make a dwarf smarter, it's not like the evolutionary process has to work really hard to figure out how to make something smarter, it's just like 'Oh you're smarter. You rolled the die and you're a little smarter, you know'. So it doesn't take a long time, if you had this you could breed dogs that can write dissertations and open doors and walk around on their two legs in like two seconds, and it would be a very strange society that we'd be living in right now; because the dogs would be involved. So there's going to need to be some kind of change there, but it's in the game now although not for personalities actually, which was one of the things under question; those are all kind of random right now, but it is there for attributes, and appearance modifiers which govern size and anything else like the skin colour and hair.
Capntastic: What are the inheritable traits parents can pass on to their children. Personality, preference for certain attributes, etc. ... a curse perhaps?
Toady: Currently what we've got are the attributes ... vaguely the attributes to an extent being passed down. It's not like if the parents have two specific numbers it doesn't pick one or the other, but there's a little bit going on there. Then all of the colours, like eye colours, hair colour, I think that uses a dominant/recessive thing now where you pass on two copies and then it picks probably the colour with the lowest index; maybe there's an alphabetic bias right now on which genes are dominant, or it might be the first you listed, it could be the first one you list in the raws that's the dominant gene. I think that's it right now, just attributes and colours, the idea this time around was just to get our feet wet and get something working, and after that really it's easy to add new genes, easy to add all kinds of effects for them. I mean, I have to code it up, it's not something you can just mod in, and of course we'd have to have discussions about this; what's the extent to which personality is passed on versus it being environmental factors and so on, I'm sure we can have all kinds of wonderful arguments on the forums and so on, but right now we're just doing simple things that are pretty cut and dried like colours. Attributes ... it's not quite cut and dried there what passes along and what doesn't and so on, but I think right now that all the attributes pass along, whether or not that's accurate is another question. Also stuff like the shape of the nose and the height modifiers, basically anything called a modifier in the raws - how curly is your hair, how long is your nose, how far apart are your eyes, what colour is your skin/eyes/hair - all those pass along right now, they have genes to pass them along. As far as curses and stuff or whatever ... whatever those end up being we can link it in, but there's nothing right now of course.
So when constantly selecting over time always the biggest of a species and butchering the smaller ones, will this lead in hundreds of years to animals of enormous size? Could one breed with this method already in the current game version e.g. cows of size of an elephant? And will they probably yield even more meat, bone and stuff as usual?
Same with war-animals. When always keeping the ones with best-stats and butchering the one with lowest, will this lead to extremely powerful animals?
-
It entirely depends on how Toady specifies the parameters.
The simplest way would be that each species has a stats range for all stats, and two parents produce offspring with a mix of genes for that stat. Note, you have to keep the genes from each parent separate, rather than store 1 gene as an average, otherwise all genomes tend towards the middle over time.
So for proper hereditary traits, each organism needs 2 genes per trait.
And each species will most likely have a min and max value for each trait that these genes represent. So no, it's unlikely cow breeding will give you elephant-sized cows.
-
Something I'd like to see added; mutators. Each generation has a chance to be a tad higher or, more likely, a tad lower in an attribute than otherwise specified. This was evolution actually occurs (albiet very, very slowly) rather than a diverse population of dwarves gradually changing to a homogenous but superficially diverse race of ubermenschdwarves.