Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Making more diverse genetics  (Read 12258 times)

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Making more diverse genetics
« on: February 17, 2011, 03:31:52 pm »

Currently, genetics in populations like the dwarves tends to produce a pretty silly uniformity of genetic traits.  Every single one of my dwarves in the last embark had burnt umber hair, amethyst eyes, and peach skin.  It's like some eugenics program went wild around the year 100.  It makes the whole system a little off and weird when everyone is exactly identical based upon the genetic dominance of any color that happens to get lucky in being picked from a random pool.

Instead, I think there's a fairly simple solution to this fairly minor problem:  Copy from real life, and give each character two "genes" for any genetic trait they have.  One dominant, and one recessive.  Hide the recessive one.  Then, flip a coin when that character breeds, and passes their genes on, passing either their dominant or recessive gene onto the child, mixing with the other parent's gene they are passing on. 

The two genes from both parents then compete for which one gets to be the dominant, and this could either take the form of making certain genes have dominance, having another coin toss, or having a "weight" on certain traits.  For example, if burnt umber hair color has a weight of 5 in the raws, while sandy taupe has a weight of 2, then burnt umber has a 2.5 times greater chance of becoming dominant.

Doing this, we shouldn't have the almost-certain total domination of one single lucky hair color that got a virtually unbeatable early advantage in worldgen.  It also shoulnd't affect much except the amount of time spent in worldgen, which is kind of long already, but shouldn't have a terrible impact on one-time world generation length.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

QuakeIV

  • Bay Watcher
  • Cant resist... must edit post.
    • View Profile
Re: Making more diverse genetics
« Reply #1 on: February 17, 2011, 03:55:44 pm »

The thing is I don't think hair color is entirely genetically inherited.

Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.

Presumably theres some kind of mutation going on here.

So far as i know thats where diversity comes from at the moment in reality.
Logged
GENERATION 9: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
I wish my grass was emo, then it would cut itself.
Quote from: Jesus
Quote from: The Big Fat Carp
Jesus, you broke the site!
Sorry, Bro.
link to quote

agatharchides

  • Bay Watcher
    • View Profile
Re: Making more diverse genetics
« Reply #2 on: February 17, 2011, 04:01:05 pm »

See :recessive genes.
Logged
Memento Mori

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Making more diverse genetics
« Reply #3 on: February 17, 2011, 04:05:59 pm »

The thing is I don't think hair color is entirely genetically inherited.

Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.

Presumably theres some kind of mutation going on here.

So far as i know thats where diversity comes from at the moment in reality.

Well, http://en.wikipedia.org/wiki/Red_hair

The thing about recessive genes is that recessive genes can be passed on for generations without ever becoming apparent until two parents who have one color hair with a different hair color as a recessive gene come together to have a small probability of having children with those recessive traits shine through.

It also means that it's much harder to make certain traits die off unless there is some sort of evolutionary pressure (I.E. people with those traits are more likely to survive long enough to give birth or otherwise have a better chance at breeding) that makes those traits die off.

Current hair descriptions have nothing to do with evolutionary pressures, so they should all have an equal representation at the end of worldgen as they do at the start of worldgen.

Real-life hair colors or skin colors being regional come about because of the way that pigments affect the collection of Vitamin D from sunlight, and how other pigments can act as a natural sunblock.  (People who have lived for tens of thousands of years in areas with less direct sunlight gaining paler skin with less "sunblock" properties, but more "absorb Vitamin D" properties to make better use of more limited sun than people in more equatorial regions, who have an evolutionary advantage to having more "sunblock" to prevent their skin from burning in the sun.)

Mutation is possible, however.  A one-in-a-million chance of just adding in a completely random new color or genetic trait is always fun.
« Last Edit: February 17, 2011, 09:44:45 pm by NW_Kohaku »
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Jayce

  • Bay Watcher
    • View Profile
Re: Making more diverse genetics
« Reply #4 on: February 17, 2011, 04:49:07 pm »

Minor qibbles,in fantasy works dwarfs all look bronzed and have scottish accents.
Logged

Demicus

  • Bay Watcher
  • The formless enigma
    • View Profile
Re: Making more diverse genetics
« Reply #5 on: February 17, 2011, 04:57:27 pm »

I thought there was already a very basic genetic system for descriptors in the game, added in about the same time as physical descriptions for the dwarves. I recall talk about eugenics projects and breeding programs for dwarves and livestock. the sameness of dwarves might be cropping up due to quirks in how the system determines which traits get inherited.

If such a system doesn't exist, then it should be added so we can attempt to breed the perfect livestock. And even if a basic genetic system exists, it could probably be improved, since I think the current genetic system is basically, 'randomly pick traits from the parents and that's it.
Logged
All shall embrace the unquenchable flame
Dwarf Fortress: The weak shall be culled, so the strong can have nicer socks.

StephanReiken

  • Bay Watcher
    • View Profile
Re: Making more diverse genetics
« Reply #6 on: February 17, 2011, 08:00:13 pm »

I'm pretty sure current mechanics are just weighted random choices for such things as hair/eye color.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Making more diverse genetics
« Reply #7 on: February 17, 2011, 09:55:33 pm »

I thought there was already a very basic genetic system for descriptors in the game, added in about the same time as physical descriptions for the dwarves. I recall talk about eugenics projects and breeding programs for dwarves and livestock. the sameness of dwarves might be cropping up due to quirks in how the system determines which traits get inherited.

If such a system doesn't exist, then it should be added so we can attempt to breed the perfect livestock. And even if a basic genetic system exists, it could probably be improved, since I think the current genetic system is basically, 'randomly pick traits from the parents and that's it.
I'm pretty sure current mechanics are just weighted random choices for such things as hair/eye color.

No, they have a clear "genetic" factor in the color selection.

Generate any world at 1050, and when you embark, look at the physical descriptions of your dwarves.  Most times, I see every single one of them has the same hair, eye, and skin color.

The way that genetics works now is that there is no "recessive" gene - one gene dominates, and eventually, through interbreeding of a small enough initial population and enough coinflips that determine one single lucky color time and time again, its competitors get eliminated because they are not passed on as recessive traits.

Think of it this way - imagine a gambling game where a coin is flipped, and the loser pays the winner $1.  If you start the game where the heads player has $30, and the tails player has $2, then odds are pretty good that the tails player will go completely bankrupt before 201 flips are over.  (201 being an assumption on dwarven generations lasting 50 years for 1050 years.)  In fact, if you start the game where one player has $16 and the other has $16, then over 201 flips, odds are one or the other is going bankrupt, as well. 

Every time a genetic winner color occurs, it prevents the color of the other parent from getting a chance to carry itself on, while the winner color is now more numerous.  Eventually, some color will win significantly more than the others and get a lead that makes it improbable that any other colors are going to be capable of surviving, much less dominating the culture.  In long enough worldgens, there is a good probability one color will completely render all other colors extinct.

It's because there is no "recessive" gene.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Tiefblau

  • Escaped Lunatic
    • View Profile
Re: Making more diverse genetics
« Reply #8 on: February 18, 2011, 12:30:41 am »

Actually shouldn't the same civilization of dwarves have similar traits since they are the same race and all? Especially things like hair/eye/skin color. I can see how facial features such as big nose, small eyes or hairstyles maybe different.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Making more diverse genetics
« Reply #9 on: February 18, 2011, 12:41:01 am »

Actually shouldn't the same civilization of dwarves have similar traits since they are the same race and all? Especially things like hair/eye/skin color. I can see how facial features such as big nose, small eyes or hairstyles maybe different.

Similar? Yes. Exactly identical for every single member of their civilization? No.

If you start with only about 10 individuals, then at most, you're going to see 10 different possible colors in an entire civilization, with a good chance that some of those lines go largely extinct, and some colors getting an early "being fruitful and multiplying" lead having a dominance much later on down the road.  It just won't mean that you have a race of blond haired, blue-eyed aryan superdwarves most of the time.

Using dominant and recessive "genes" will give you a pretty much exact replica of how genetics work in real life, since that literally is how things work in real life.  It only really requires a small expansion of memory and a couple extra coin flips when making a new character.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Making more diverse genetics
« Reply #10 on: February 18, 2011, 10:01:09 am »

Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.

What color was the mailman's hair?
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

ZioAnthros

  • Bay Watcher
    • View Profile
Re: Making more diverse genetics
« Reply #11 on: February 18, 2011, 02:28:07 pm »

Ha ha ha ha ha ha ha ha ha!
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Making more diverse genetics
« Reply #12 on: February 18, 2011, 02:29:13 pm »

What color was the mailman's hair?

Even then, the mother would have had to have had a recessive red hair gene for it to work...
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Making more diverse genetics
« Reply #13 on: February 18, 2011, 02:48:40 pm »

If you mod dwarves to have mixed hair, eye, and skin genes instead of dominant genes they'll have a better variety.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

sockless

  • Bay Watcher
    • View Profile
Re: Making more diverse genetics
« Reply #14 on: February 19, 2011, 01:10:00 am »

Genetics would be rather easy to add into the game. We could quite happily emulate chromosomes and genotypes made from 2 alleles. Since reproduction doesn't happen that often, it wouldn't take much of a toll at all on performance.
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?
Pages: [1] 2 3