Sunday, November 13, 2011

On Creaturely Inbreeding

Most of us understand and accept that inbreeding is just part of nornish society. Creatures can't generally tell their parents from their children, their siblings from their cousins, and so on. A young, healthy breeding female is just as happy to have a romantic escapade with her grandfather as she is to push the cute little fallow you had lined up for her. It's strange, but biologically, there's no reason for creatures to act otherwise. There are no genetic pitfalls to inbreeding for norns like there are for us, and creatures do not live in structured family groups, nor do they have any sort of social stigma that comes with inbreeding. Overall, it's a little silly to expect such primitive alife to conform to our social code that we have developed over thousands of years when they really have no reason to.

But when it comes down to it, no matter how normal and understandable it is, as humans trying to raise a colony of creatures, it still comes off as just a little irksome when your first second generation norn chooses his mother as a mate. It sort of ruins the cute little ideals we have about raising creatures to be reminded that they really are nothing like the personalities we project onto them.

In nurturing worlds, it really would just be nice if creatures avoided inbreeding.

So forget everything I just said for a moment; now we're going to look at this gene:

This might be a little overwhelming; explaining genetics often is, but try to bear with me here.

This is a chemical emitter. Creatures have tons of them. Essentially their purpose is to emit, or inject, a certain chemical into a norn periodically if certain conditions are met. The Emitter Attachment box indicates the source of input, and the Chemical information box indicates the output.

This is an emitter that I'm pretty sure is common to most creatures capable of breeding, so it makes a good example.

Let's get the Chemical Information box out of the way first. This particular gene is set up to emit the chemical, "Opposite Sex Pheromone." The Smpl rate indicates how often the chemical will be emitted, from every tick to every 255 ticks. The Gain indicates just how much of the chemical is emitted, from 0 to 1. And the threshold indicates how high the input has to be before the emitter kicks in and starts emitting at all, also from 0 to 1.

The center box controls how the input is handled; Analogue means the higher the input is above the threshold, the more of the chemical is emitted. Digital means that it will emit the gain amount of chemical as long as the input is above the threshold, regardless of how high it is.

So what we have here is a an emitter that emits a small amount of Opposite Sex Pheromone as long as the input is above the threshold, which is currently set to 0.

But what the heck is the input? The brain, honestly, can be a scary thing to play in. It baffles even me, but this bit is actually pretty straightforward if you can follow me.

Most of what goes on in a creature's brain is controlled by the engine. This can be a little frustrating to developers trying to change something only to find it hard-coded, but that's another story. In this case though, we are dealing with a certain lobe of the creature's brain, specifically, "situ" or the Situation Lobe.

This lobe contains 16 neurons, most of which are unused. The value set in these neurons is controlled by the engine (though it can also be affected by caos). The neurons are labeled as follows:

0 "I am this old"
1 "I am inside a vehicle"
2 "I am carrying something"
3 "I am being carried"
4 "I am falling"
5 "I am near a creature of the opposite sex and my genus"
6 "I am musically at this mood"
7 "I am musically at this threat level"
8 "I am the selected norn"
9-15 -- undefined

If you're playing close attention, you'll notice that Neuron 5, the one used in the gene we're studying, is tied to "I am near a creature of the opposite sex and my genus". Makes sense now, right? When that neuron's value is greater than 0, the Opposite Sex Pheromone is emitted.

(As for the state, if you're fiddling in the genetics kit, you'll notice you can choose from 0 to 3. That's another discussion altogether, but most of the time, 0 is the state you want; we'll leave it at that for now.)

Now, you should have a basic understanding of how these sorts of emitter genes work. It's a bit funny if you graph this one in action via the Biochemistry Set-- all you have to do is hold a mature norn in the same room as a creature of the opposite sex, and watch the Opposite Sex Pheromone line go up. Move the creature out of view, and it goes down again.

You could, in theory, use this knowledge to create an emitter that triggers on neuron 4, emitting something like fear when falling, or something to increase comfort levels when neuron 8 is triggered.

Or, you could take a look at another lobe, the detl, or Detail Lobe.

This lobe also contains 16 neurons, and they apply to the object that the creature is currently looking at:

0 "It is being carried by me"
1 "It is being carried by someone else"
2 "It is this close to me"
3 "It is a creature"
4 "It is my sibling"
5 "It is my parent"
6 "It is my child"
7 "It is of opposite sex and my genus"
8 "It is of this size"
9 "It is smelling this much"
10 "It is stopped"
11-15 undefined

You might be able to see where I'm going with this.

Turns out, the engine is already coded to trigger certain neurons when a creature is looking at a family member, as detailed in neurons 4, 5, and 6. This makes the job of discouraging inbreeding just a matter of adding in a few receptors, like so:

A creature's fertility works something like this: Opposite Sex Pheromone is emitted by the emitter we were just studying when potential mates are around. Then, when the creature is fertile, Arousal Potential is emitted. When Opposite Sex Pheromone and Arousal Potential are both present in a creature, they convert into Sex Drive, thus making the creature want to mate.

Libido Lowerer effectively cancels out Arousal Potential. So with the addition of these three genes, a creature essentially will have no desire to mate when he or she is paying attention to a family member.

This graph a little further down illustrates the effect of these genes. Sadly the creature at the time was not especially fertile, so you can't see how the Libido Lowerer cancels arousal potential, but you can see that at point A, the creature is alone; at point B, he enters an area where potential mates are milling around, and at point C, he turns his attention to his sibling, spiking Libido Lowerer.

Now, these genes aren't by any means foolproof when it comes to preventing inbreeding. They will prevent creatures from naturally lusting after immediate family, but all bets are off if a creature is artificially made fertile with an agent or script that pumps their fertility so high they don't know what they're pushing!

The other pitfall to this is that it only checks immediate family members; Creatures may still end up attracted to their cousins, nieces, grandchildren, or what have you. But this is something that may be overcome in the future as well; more on that later.

An amusing side effect to these genes is that if a creature is snogging his beloved and happens to catch a glance of his mother walking by, he's likely to lose interest in the act altogether. So these creatures prefer privacy when it comes to romance!

These modifications certainly aren't anything new, Vampess' CFE Family Norns comes to mind as an example that's been around a while (as a disclaimer, I haven't gone poking around in the genomes myself to confirm this, but from the information given about them they seem to operate the same way).

It's exciting to consider what more can be done with these sorts of emitters, and possibly with unused neurons. I mentioned before that these neurons can be affected with caos, meaning a script could run to send a signal to a norn's brain when say, he was looking at a potential mate that was more than an hour older or younger than him. That could trigger similar emitter genes that would prevent creatures from breeding with grandparents or nephews. Another example: a signal could be sent to a creature's brain if he was looking at someone he had previously mated with, which could be linked to emitters to encourage monogamy or diversity.

Branching off from breeding behaviors, a world might be scripted to define certain creatures as being in certain tribes or clans, and creatures might become more angry when encountering creatures in enemy tribes.

Unfortunately I haven't actually tested these waters, and I am inclined to think that a bunch of scripts constantly firing neurons in creatures' heads might quickly slow down the game, but still, I think there's a lot to potentially explore here. I've been poking around a lot in the norn brain in some painfully grueling attempt to understand exactly how it works and open new doors in Creature development; I just hope I can make sense of it all and help it make sense to others, too.


  1. Excellent topic! I've been meaning to look into this, as well, since I usually like to limit inbreeding just to keep the genetic diversity reasonably high. In my C1 world, this is controlled by only having one generation present at once, so the worst case is siblings breeding together.

    C3/DS opens up a lot more possibilities, though, since it has so many more chemicals and abilities. I would be very interested in following along with this discussion down the line: Especially the concepts of monogamy and tribes/clans.

  2. Awesome development. I'd love to see the possibilities available by digging into some of these mostly untapped neurons. I'd really like to play with them in regards to setting up tribes, and breeding (or not breeding) between them.

  3. I tried to create tribal norns once, and it failed. the closest i got was female norns that stuck together like glue, male norns that never ventured any where near the rest of the group, unless "rest of the group" meant one female norn, and they werent that good at breeding. Now I'm not saying that someone who knew more about the nornish psyche couldn't do it, bvut i think even then it would be difficult.

  4. I knew other people must've tried their own ways in the past!
    When I projected the family instincts, I opted to work with the chemicals already present. Since chemical reactions of sex drive reward the Norn for decreasing it, I figured that a Norn should be able to satisfy their parental / reproductive instincts by either, well, reproducing, or by having their children around. So I opted for Sex Drive Decreases rather than creating another substance which would kill arousal potential.

    In Creatures 2, the problem with removing siblings from the pool is that A: You can no longer start Norn populations from a very small number (I am used to 3-5), and B : ALL Norns that come from virgin births or 1st generation Norns of the same visual breed are treated by the game as siblings.So, this would've made breaking through the 1st generation tricky or even impossible with breeds whose eggs were created by 'virgin birth'.

  5. Alas, many of these neurons aren't actually hooked up. Like the "musically" ones don't actually seem to do anything. Still, it's worth a shot.