Bay 12 Games Forum

Please login or register.

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

Author Topic: New SCIENCE in breeding: Domestic Sterility Bug  (Read 28239 times)

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #30 on: August 13, 2014, 07:33:28 am »

Celem,

I'll dig around and find where the blasted tags are so I can have a proper look.

The tags aren't in the default raws (if they aren't present the game uses hard-coded default values), you have to add them to each caste (the following is an example, no guarantee that it actually works).
[CREATURE:DWARF]
<creature-defining stuff>
   [CASTE:MALE]
   <caste specific stuff>
      [ORIENTATION:MALE:5:5:90] (default is 75:20:5)
      [ORIENTATION:FEMALE:90:5:5] (default is 5:20:75)
   [CASTE:FEMALE]
   <caste specific stuff>
      [ORIENTATION:FEMALE:5:5:90] (default is 75:20:5)
      [ORIENTATION:MALE:90:5:5] (default is 5:20:75)
<more stuff to finish creature entry>

-Dame de la Licorne
« Last Edit: August 13, 2014, 07:36:31 am by Dame de la Licorne »
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

celem

  • Bay Watcher
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #31 on: August 13, 2014, 07:44:14 am »

Gotcha, that was the issue.  My first step with something like this is always to find the vanilla occurances.
Logged
Marksdwarf Pillboxes
I wish I had something cool to say about this.  Because it's really cool.

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #32 on: August 13, 2014, 07:50:15 am »

celem,

Gotcha, that was the issue.  My first step with something like this is always to find the vanilla occurances.

I do the same thing, and it took me a few days to figure out where to "find" the ORIENTATION tags (I was getting a bit frustrated about it), especially given that ToadyOne almost never leaves a new tag out with a hard-coded default the way he did for this one.  Glad to help clarify.  :)

-Dame de la Licorne
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #33 on: August 13, 2014, 08:55:00 am »

This is based on ToadyOne saying that the tag works as follows: [ORIENTATION:<caste>:<probability uninterested in stated caste>:<probability interested in lovers but not marriage with stated caste>:<probability interested in lovers-then-marriage with stated caste>] (paraphrased) according to his posts here and here.
One very significant correction: ORIENTATION is based on gender, NOT caste - the second token can only be "MALE" or "FEMALE", so it's not possible to restrict units to forming romantic relationships with specific other castes.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #34 on: August 13, 2014, 10:00:18 am »

Experiement 2 Results:
Setup:
Essentially the same as the first test.  10k Embark points to purchase animals and a wagon full of food, booze, and nest boxes.  I swapped some of the dorf skills around too, but that's unimportant.
In addition to all the settings from the first test, Dwarves were locked at a population of 7 to prevent migration waves from brining any extra animals to throw off my tests (Thanks to Greycat for suggesting capping at 7).

4 populations of animals were tested: Dogs, Cats, Pigs, and Peafoul.  All groups were brought with 8 femals and 4 males.  Females were individually penned behind closed and fobidden doors and assigned a number.  In addition, Peahens were each provided a single nest box and were let sit for a month before locking the doors to assure that at least one clutch of eggs was collected priror.  Further, after chick hatches the door were left unlocked for a few weeks to achieve the same end (Thanks to m-logik for peafoul suggestions).

After each birth, the producing female's number was recorded as a positive fertile, the offspring were collected into a nearby cage, and then analyzed for health at the neary butcher science lab.  This was to prevent their numbers from impacting the fertility rate (Thanks to both Gigaz and Solon64 for suggestings pertaining to child population control).

The experiment was allowed to run for 2 years.

Results:
The results of this experiment were pretty clear.  The dog, cat, and peafoul populations each had one sterile female and the pig population had 2 sterile females.  Each of the mammal groups had 4 sets of births each, and in all cases the sterile animals repeatedly failed to produce while all other females produced viable offspring.  The Peahens produced 3 hatches, and in all cases each viable pehen produced chicks with the sterile member not producing any offspring.

This is an observed rate of female sterility of just under 17% for all females.

Also of interest, it was noticed that all animal groups produced offsprin within a few seconds of each other without variation, suggesting that gestation is a set time and that impregnation happened almost simultaneously across all females in a group.  In this case, gestation of all animals was exactly 6 months.  This was repeatable in that all mamal births happened in 4 sets all spaced 6 months apart from each other.  Peachick hatches also happened 6 months after the doors were locked, with a smidge more varience due to the time it takes for the hens to lay the eggs.  This varience was still small,consisting of only a minute or two.

I used this knowledge to re-analyse my first experiment and found some interesting data there.  By grouping all births within a 6 month window, I found that  Infertility rates in my inital experiment were actually higher than originally reported.  In the known female population of 20 animals there were 2 infertile cats, 1 infertile pig, 1 infertiile peahen, and 1 infertile rabbit.  Also of note, there was a 3 month lag between the cat's first birth and the first pig birth.  This coincides exactly with the first migration wave brining the grown stray boar, so the embarkation boar was actually sterile, making 3 out of the six embarked males sterile.

Thus, the overall sterility of the first experiment was roughly 30.7%.

Averaging across both experiments gives us an average sterility rate of 22%.

Analysis:
The observed sterility rate of 22% comes very close to the 25% sterility predicted by the ORIENTATION tag hypothesis.  While not a confirmation, it certainly suggests more work should be done with ORIENTATION tags on animals as we gain more understanding of the tag's workings.

There is also a possibility that there is a cap on the number of pregnant animals allowed at once.  If this is the case, that number is 7 because that's the most animals of any group that produced at any one time.

Also of note: The precise 6 month gestation time for all animals turns out to be a very useful piece of knowledge.  While I'm sure this is not new information, I did not see it on any of the wiki pages pertaining to breeding or the meat industry, so it should be considered fror inclusion on both.  This knowledge would be of great utility for determining best efficiency for breeding when running a meat industry.

There were several things not covered  by this experiment that will be the focus of future work.  Specifically, are children of domestic embarkation animals susceptible to the sterility bug, or is it only the embarked domestics?  Are traded domestics also susceptable (there is evidence that they are)  Further, are wild animals effected?

Further Work:
The next step will be testing the children.  Since I have easy access to several child animals, and the current dorfs are happy enough, I will be running the next experiment as an extension of the current.

The first step of the next experiment will be to allow one final breeding cycle to allow the collection of viable child offspring.

Proceeding this collection, all fertile females will be euthenized, leaving only the sterile females.  These remaining females will be given one full year (the time it takes for the offspring to reach sexual maturity) as a test for the possibility of a pregnancy cap.  If any of the sterile females produces during this year, then the pregnancy cap theory can be accepted, otherwise continuted sterility of the remaining females will indicate that the cap either does not exist, or at least was not causing the sterility.

Following all child populations reaching sexual maturity, the remaining embark population will be euthenized entirely.  The original experiment (8 females, 4 males of each species) will then be set up and run with the offspring of the first experiment.  Any sterility observed will be recorded.

Future work:
Testing of wild animals and traded animals will need to be done at some point in the future.  As will testing of the effects of the ORIENTATION tag once we figure out how it works.

A Takehome Note:
Currently, with the sterility bug effecting roughly 25% of all embarked animals (and possibly all animals), adjusting embark and capture strategies is required to produce successful meat industries.

Specifically, prior strategies revolved around bringing a 1 male and 1 or more females at embark and breeding the rest of the population.  This now is a bit of a gamble.  With 1 male and 1 female at embark, you have only a 56.25% chance of ending up with a viable pairing.  As you increase the number of females, this chance gradually increases to 75% as the number of females tends toward infinity.  Not great odds either way.  Bringing 2 males and 2 females provides an 87.8% chance of producing a viable pairing, which is much better and doesn't require you to have infinite female animals.  If you bring three of each, you get a 96.9% chance of having a viable pair.  2 and 2 represents a pretty good mix of value and reasonable odds, so I would reccomend this as the minumum embarkation population if you want to get breeding going right away in a new embark.  If you really need to make sure you have breeding animals, 3 and 3 or higher is recommended.

It's also reccomended that you isolate animals used for breeding purposes so you can identify sterile animals and have them removed from the population.  Male isolation is more difficult, but with a decent caging strategy, and careful monitorin of the 6 month gestation time, males can be tested for fertility and sterile ones removed.  Whether this is worth the effort is debatable.
« Last Edit: August 13, 2014, 10:53:26 am by Tacomagic »
Logged

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #35 on: August 13, 2014, 10:03:41 am »

I'm working on dwarves with 1:1:99/99:1:1 atm, will report when it's been going long enough for results. Currently in the winter of my first year. Nothing beyond friendship in the fort yet, though.
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #36 on: August 13, 2014, 10:45:26 am »

Button,

If you take a look at this bug report, note Quietust's comment about romance versus marriage.  It implies that successful marriages will only occur with the following settings [ORIENTATION:<same gender>:100:0:0] and [ORIENTATION:<opposite gender>:0:100:0].  I have temporary access to a DF-capable computer, and am currently genning a pocket world to test this in.

-Dame de la Licorne
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #37 on: August 13, 2014, 11:09:31 am »

I think I'll start a side-project on my laptop while I'm away from my DF rig.  Run a pocket world with [ORIENTATION:<same gender>:100:0:0] and [ORIENTATION:<opposite gender>:0:100:0] on dogs, embark with like 10 females and 1 male and see what kind of reproduction rate they have.  Should find out in 6 months whether it helps.

This will have the side benefit of producing a quick test on the existence of a pregnany cap if they actually do breed.
« Last Edit: August 13, 2014, 11:21:28 am by Tacomagic »
Logged

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #38 on: August 13, 2014, 11:21:16 am »

Tacomagic,

I'm running the same setup on dwarves for ~2 in-game years.  Results should be informative, at the very least.

-Dame de la Licorne
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #39 on: August 13, 2014, 12:48:07 pm »

Bad news.  Putting the Orientation tags on dogs with SAME:100:0:0 OPPOSITE:0:100:0 produced a completely sterile population of dogs.

Going to give 100:0:0 0:0:100 a shot, just in case non-sentient creatures ignore the lovers category.
Logged

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #40 on: August 13, 2014, 12:51:25 pm »

Tacomagic,

Did you in fact use SAME and OPPOSITE, or did you use MALE and FEMALE (your post is unclear)?

-Dame de la Licorne
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #41 on: August 13, 2014, 12:57:56 pm »

I used MALE and FEMALE, using SAME and OPPOSITE is just conveinient shorthand.
Logged

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #42 on: August 13, 2014, 01:58:57 pm »

I'll say that setting G_fps to 20, disabling FPS_CAP, using a pocket world, and a 2x2 embark makes testing way less tedious.

Anyway, my first complete test with Opposite 0:0:100 and Same:100:0:0 is encouraging.  10 females, 3 males at embark, 100% fertility in the females.

Also, with that, I know that there either is no pregnancy cap, or at least it's more than 10 animals.

Going to reset, add the tags to cats and pigs, and bring all 3 animals in 10:1 groups.  If all 30 females produce, then we'll have near definitive confirmation that both the orientation tag is the cause, and that we have a viable work-around.

Another thing to note: Orientation seems to be burned into the creature when it's created and cannot be changed after the fact.  Unlike other tags, you can't change it just by editing the raws in the regional save, but have to start a new embark (or get new animals).  In my initial test with changing the orientation tags, I changed them and used my first set of animals, which remained sterile.  Second embark with it had the 100% fertility rate.

It's also possible that the order of the tags might be important.  My first test with the 0:100:0 set I had SAME listed first for each cache. When I changed them, I put OPPOSITE first.  It is within the realm of possibility that if it rolls on SAME and comes up with something, it does not actually bother rolling on the second set.  More checking of that is required.

Still needs a smidge more testing, but it looks like I may be on the right track.

I'll still need to test children and wilds, but at least we're narrowing down here.  Behold the power of SCIENCE!
« Last Edit: August 13, 2014, 02:03:06 pm by Tacomagic »
Logged

greycat

  • Bay Watcher
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #43 on: August 13, 2014, 02:44:41 pm »

If you take a look at this bug report

Toady has marked this one as "fixed next version", so he must have found at least one thing to fix.
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: New SCIENCE in breeding: Domestic Sterility Bug
« Reply #44 on: August 13, 2014, 02:49:56 pm »

If you take a look at this bug report

Toady has marked this one as "fixed next version", so he must have found at least one thing to fix.

Will be interesting to see if this has any effect on Animal breeding.  The problem is somewhat different for civilized species (They still breed, but don't marry), and the bug specifically for animals is still showing up as NEW.  07651

That said, sometimes you fix one thing and it cascade fixes and beaks a whole slew of others  ;).
Logged
Pages: 1 2 [3] 4 5