Bay 12 Games Forum

Please login or register.

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

Author Topic: Heredity Science  (Read 8938 times)

expwnent

  • Bay Watcher
    • View Profile
Heredity Science
« on: June 16, 2012, 02:04:03 pm »

I plan on carefully measuring dwarven personality and physical traits to see which ones are hereditary. I cheat mercilessly to make this more efficient. To start with, I'm going to have dwarves that grow up instantly, and I will give them all NO_EAT, NO_DRINK, NO_EMOTION, etc. I will turn off invaders and migrants.

I will carefully record all information about my dwarves in a simple text file, then write a simple program to analyze it and do some basic statistics. For quantitative traits, I will measure the correlation of the trait of the child and the trait of each parent. For "boolean" traits, like eye color or habits, I will measure the probability of a child having that trait given that each parent has it, and so on. To test for dominant and recessive traits, I will also consider the traits of each granparent. I will post a link to the raw data so that others can do more advanced analysis later in case they think of something interesting that I did not.

1. To minimize the amount of work I have to do. I'd like a program that can export as much information as possible about a dwarf. Dwarf Therapist can list all of that data, but doesn't do so in a plain text format. It also doesn't list physical traits, habits, or getting used to tragedy-ness. Without such a program, I seriously doubt I can get statistically significant data.

2. Has any previous research been done? I did a brief search and didn't find anything.

I will post results as they come in, and edit and summarize them in this post.

edit 2012/6/19: I've written an lua script to export dwarf data. For those of you who would like to contribute, here's how to do it:

0. Get dfhack working with your version of DF.
1. copy+paste http://pastebin.com/3Z1EzHJH into printDwarfLua.lua in the main df directory.
2. Generate a fort with no mods, other than giving NO_EAT, NO_SLEEP, NO_DRINK, and NOEMOTION to dwarves, or maybe removing MULTIPLE_LITTER_RARE. Don't change any personality stuff, of course.
3. Important: rename your save folder to something unique. Put your username_fort1 is fine. It just can't be the same as anyone else's. No region1.
4. To make it go faster, use dfusion to start with 50-100 dwarves at the start.
5. Shortly after embark, and every few years or so after, select a dwarf with "k", then in the dfhack console type "lua printDwarfData.lua". This will output your data to a text file in your DF directory which you can post. The filename of the file doesn't really matter, so it's safe to copy+paste. It's also safe to copy+paste them as one big file, as long as you don't mess with the brackets in each file.
6. Post results.

For now, just let your dwarves mate randomly. It would be too much effort to do otherwise. It is preferable to have wide, but not deep family trees. If the parents are chosen uniformly at random, that'll give the best data. When you start recombining child DNA, things start being less independent and it's slightly worse data, but I'll take what I can get and it's only a minor difference.

I tried to go on the side of storing too much data. I'm going to completely automate all the calculations, so it shouldn't be a problem.

I've written a parser, which took surprisingly long. It should be fairly straightforward to start computing probabilities now. Significant progress.

--------

edit 2012/6/26:

The first results are in, though not very readably: http://pastebin.com/mibNtwxf

It looks like some appearance modifiers are hereditary, and personality traits (except for adventurousness) are hereditary, and I'm not sure about preferences. The naive data shows that they aren't hereditary, but that just means that parents and children are not likely to have the same preferences in the same order.

I did not find a notable difference between how much a dwarf's mother and father contribute to traits.

When I find the time, I'll look more into appearance and preferences.

edit 2:

Fixed the problem measuring correlation. It looks like personality is NOT hereditary after all, and there's notable evidence that appearance IS hereditary in most ways.

New pastebin: http://pastebin.com/x0yYTnxe

Code: [Select]
appearance.genes.colors.8
    mother: 0.565686
    father: 0.184738
appearance.genes.colors.9
    mother: 0.246785
    father: 0.561069

This implies that there's some color you're likely to get from your mother, and another color you're likely to get from your father. Not sure what appearance.genes.colors.8 or 9 actually mean, though.

---

edit 3: The following measures the probability that whatever attribute is equal to that of the dwarf's mother, father, and a random dwarf: http://pastebin.com/LtgZmB0e

A low probability does NOT mean that it is not hereditary: it could mean that the attribute takes on many values, and so it's unlikely to be exactly equal to that of a parent. A high probability of being the same as a parent with a low probability of being the same as a random person indicates heredity.
« Last Edit: June 27, 2012, 12:21:18 am by expwnent »
Logged

NedeN

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #1 on: June 16, 2012, 02:29:30 pm »

I've done VERY little !!science!! on this. Such as comparing a few traits from mother/father to children. It seems that the children of dwarf 1 and dwarf 2 have a higher chance of acquiring the same traits as their parents. Such as "She is mighty, tough but is weak". Although as you will no doubt encounter in your studies that sometimes traits like these are not always passed down to the children. I'm going to take a brief look at some of the dwarves in my current fort (if I have enough surviving family members, had a nasty siege not long ago) and I will at least try and throw in my two cents.
Logged
I watched a zombie dwarf tear off a girls dress and hit her with it so hard it became lodged in her skull.

Ghoulz - 15 minutes could save you 15% or more on carp insurance.

Friendstrange

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #2 on: June 16, 2012, 02:31:59 pm »

May want to do that after next update since critter phycology seems to be getting more fleshed out.
Logged

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: Heredity Science
« Reply #3 on: June 16, 2012, 02:44:11 pm »

From a fort of mine in .31:

  • Skin colour, eye colour - all hereditary.
  • Body size and such is suggested to be hereditary, suggested by animal husbandry existing in DF, but when I repeated this with Dwarves I could have babies born from walking slabs of muscle being skinny, and I never really continued enough to confirm either really.
  • Physical traits are all hereditary, albeit numbed a bit. For example, a mighty Dwarf would give birth to a very strong baby, and a very weak Dwarf would give birth to a weak Dwarf.
  • Mental traits are completely random.
  • Preference for beard designs appears to be random.

Maklak

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #4 on: June 16, 2012, 03:04:39 pm »

dfhack has a tool that dumps stats to xml.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

expwnent

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #5 on: June 16, 2012, 03:08:27 pm »

Thanks! I'll look in to that.
Logged

NedeN

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #6 on: June 16, 2012, 09:24:58 pm »

I've done VERY little !!science!! on this. Such as comparing a few traits from mother/father to children. It seems that the children of dwarf 1 and dwarf 2 have a higher chance of acquiring the same traits as their parents. Such as "She is mighty, tough but is weak". Although as you will no doubt encounter in your studies that sometimes traits like these are not always passed down to the children. I'm going to take a brief look at some of the dwarves in my current fort (if I have enough surviving family members, had a nasty siege not long ago) and I will at least try and throw in my two cents.

Well I did a little research for you, only three babies are still alive. The only problem I really had was all of the fathers had been killed in the recent siege. So traits such as facial features may not be 100% valid in my case, but a lot of the traits from the mothers have been passed to the children like eye colors and obviously skin. I noticed they all had dark peach skin but it seems all of my dwarves have dark peach skin and cobalt eyes, thats odd.

Spoiler (click to show/hide)
Logged
I watched a zombie dwarf tear off a girls dress and hit her with it so hard it became lodged in her skull.

Ghoulz - 15 minutes could save you 15% or more on carp insurance.

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: Heredity Science
« Reply #7 on: June 16, 2012, 09:28:29 pm »

all of my dwarves have dark peach skin and cobalt eyes, thats odd.
All Dwarves of one civ come in one race and that race alone. It's often overlooked.

Hobbie

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #8 on: June 17, 2012, 11:03:50 am »

I don't know if this counts as heredity but all of the migrants my fort has been getting for three or four waves are pretty much all marksdwarves. ._.
Logged

slink

  • Bay Watcher
  • Crazy Cat Dwarf
    • View Profile
    • Slink's Burrow Online
Re: Heredity Science
« Reply #9 on: June 17, 2012, 12:10:58 pm »

all of my dwarves have dark peach skin and cobalt eyes, thats odd.
All Dwarves of one civ come in one race and that race alone. It's often overlooked.
All of mine in my current fortress have the same color skin, but not eyes.  I haven't sorted through the largest clan because it is quite large, but the eye colors all of the others with children are listed here.  They mostly seem to take after one parent or the other, but there are exceptions.
Spoiler (click to show/hide)
Logged
There is only one cat, and all cats are that cat.
Almost losing is sometimes fun.

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: Heredity Science
« Reply #10 on: June 17, 2012, 12:14:56 pm »

Peculiar. I've also begun a census that will record everything of note about every Dwarf in my fort, and will post any confirmations/anomalies I find if they exist.
Could you post pics of the families with the different eye colours?

Also I think hair colour is genetically inherited as well. All of my Dwarves and their offspring have charcoal hair (tinted with grey for the oldies), emerald eyes and cinnamon skin.

slink

  • Bay Watcher
  • Crazy Cat Dwarf
    • View Profile
    • Slink's Burrow Online
Re: Heredity Science
« Reply #11 on: June 17, 2012, 12:16:56 pm »

Sure, and I will add hair color also.  It may take me a bit.  It's almost time to eat, here.  :)

Edit:  I've done jpg files of the descriptions of two of the families.  Let me know if any of the others interest you especially.  It's rather a grind making these files.   ;)

Edit#2: Four more done.  Going to rest before tackling McBooze.  :)

Edit#3: Ta-da!  I did not do the ones that had no surprises in eye color, nor, obviously, any McAdams.

McFood
Mother:aquamarine, grey hair with flecks of black
Father:bronze, grey hair with some pale chestnut
Daughter:ochre, clean-shaven hair with no color given
Daughter:aquamarine, black hair
Son:ochre, clean-shaven hair with no color given

jpg file at http://dffd.wimbli.com/file.php?id=6510

McGrub
Mother:cobalt, clean-shaven hair with no color given
Father:cobalt, grey hair with a touch of buff
Daughter:cobalt, clean-shaven hair with no color given
Daughter:rust, hair taupe
Daughter:cobalt, clean-shaven hair with no color given

jpg file at http://dffd.wimbli.com/file.php?id=6512

McHooch
Mother:aquamarine, clean-shaven hair with no color given
Father:bronze, clean-shaven hair with no color given
Son:bronze, clean-shaven hair with no color given
Son:emerald, clean-shaven hair with no color given
Daughter:aquamarine, clean-shaven hair with no color given

jpg file at http://dffd.wimbli.com/file.php?id=6514

McLiquor
Mother:emerald, clean-shaven hair with no color given
Father:aquamarine, hair grey mixed with ecru
Son:cobalt, hair goldenrod
Daughter:cobalt, hair goldenrod

jpg file at http://dffd.wimbli.com/file.php?id=6515

McQuiche
Mother:bronze, clean-shaven hair with no color given
Father:amethyst, hair pumpkin
Daughter: heliotrope, clean-shaven hair with no color given

jpg file at http://dffd.wimbli.com/file.php?id=6516

McChow
Mother:emerald, clean-shaven hair with no color given
Father:cobalt, clean-shaven hair with no color given
Daughter:cobalt, hair burnt sienna
   married
   Husband:brass, clean-shaven hair with no color given
   Son:brass, hair russet
   Son:brass, clean-shaven hair with no color given
   Son:copper, hair mahogany
   Daughter:brass, hair russet
Son:cobalt, clean-shaven hair with no color given
Son:cobalt, clean-shaven hair with no color given

jpg file at http://dffd.wimbli.com/file.php?id=6517

McBooze
Mother:aquamarine, hair grey with flecks of chestnut
Father:cobalt, clean-shaven hair with no color given
Daughter:aquamarine, hair mahogany
   married
   Husband:brass, clean-shaven hair with no color given
   Son:cobalt, hair buff
   Son:cobalt, clean-shaven hair with no color given
   Daughter:aquamarine, hair buff
Son:cobalt, hair mahogany
   married
   Wife:aquamarine (father's eyes were copper), clean-shaven hair with no color given (father's hair mahogany)
   Daughter:aquamarine, hair amber
Son:raw umber, clean-shaven hair with no color given
Daughter:cobalt, hair gold

jpg file at http://dffd.wimbli.com/file.php?id=6518
« Last Edit: June 17, 2012, 08:46:40 pm by slink »
Logged
There is only one cat, and all cats are that cat.
Almost losing is sometimes fun.

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: Heredity Science
« Reply #12 on: June 17, 2012, 04:36:36 pm »

It's hard to tell, but your selection of Dwarves seems to be one of the only ways we can determine how it selects genetic traits to be carried onto the next generations.

*sigh*

I think I'm going to take  a break for now.

slink

  • Bay Watcher
  • Crazy Cat Dwarf
    • View Profile
    • Slink's Burrow Online
Re: Heredity Science
« Reply #13 on: June 17, 2012, 08:48:02 pm »

I finished the families that have a child with eye color that doesn't match the parents, except I did not check any McAdams.
Logged
There is only one cat, and all cats are that cat.
Almost losing is sometimes fun.

expwnent

  • Bay Watcher
    • View Profile
Re: Heredity Science
« Reply #14 on: June 17, 2012, 09:31:02 pm »

I'm trying to modify the dwarfexport plugin to DFHack to also write preference and family data. Or maybe I'll do something with lua? Either way, it'll make it much easier to collaborate and collect data.

For now, if people could keep their saves that would be ideal. That way I won't have to manually type up everyone's screenshots.
Logged
Pages: [1] 2 3