Creatures Community Chat

Wednesday, October 30, 2013

Gene Manipulation - Perfecio

Haha, and I thought I understood genetics. For those out there who enjoy the genetics part of Creatures, you really gotta try making your own Norns. I've learned so much from this little exercise.

Anyway, I think I've just about solved all the problems I set out to tackle, specifically sleeping, digestion and an improved immune system. Here's what we've got so far.

DRIVE RAISERS

The first thing I need to talk about is the Drive Raiser genes. In the past I've often said how I didn't like that the default Norns could receive punishment from basically any drive that rose (eg. HungerIncrease, tirednessIncrease, etc.), as quite often you'd expect a drive to rise under given circumstances and the Norns shouldn't be punished for some of these.
Since going through the genome a few more times I've revised my opinion on that. I believe these genes are not only good, but necessary. What could be changed in many circumstances is the way some drives increase.

The system basically works like this. The Norns have a bunch of drives that we're all pretty familiar with; pain, hunger, tiredness, etc. These will rise and fall under different circumstances and depending on their levels the Norns will be inclined to perform certain tasks in an attempt to lower said drives.
In terms of learning, the drives themselves really don't do anything though. It's the chemicals driveIncrease and driveDecrease that enable the learning. When the Norns drive decreases they are rewarded, when it increases they are punished.
This is all probably nothing new to people, but the part I didn't understand was that you can bypass the increase/decrease system and just inject the chemical straight into the Norn, thereby increasing the drive without having to worry about the learning system.

There are circumstances where this is very useful, such as in the digestion system. When a Norn eats they receive HungerDecrease, which rewards them. However when Glycogen converts back to Glucose they receive Hunger, not HungerIncrease. This increases their hunger, but doesn't punish them for something they don't understand and have no control over.

SLEEPING

As I said in my last post, most of the genes here just needed some tweaking to streamline just how much sleepiness they received vs how much reward. I also discovered I needed to add some extra boredom back in as these Norns weren't terribly active.
I also experimented with taking out the Reward and replacing it with NFPdecrease, which proved quite effective, but not as effective as I'd like.
There's not a lot more to add here. Basically all the Norns needed was more reward, less punishment and some subtle tweaking of how quickly sleepiness increased while resting. All these Norns sleep quite well now and all it required was to reward them for sleeping.

DIGESTION

Believe it or not but of all the changes I've made this one proved to be the most difficult. I tried a whole range of tweaks and adjustments, even to the point of creating entirely new genes to try and get the Glucose, Glycogen and Hunger to increase and decrease in tune with each other.

To reiterate, the problem was that a Norn could have the maximum level of both Glycogen and Glucose, but would still end up starving. As well as this, their Hunger drive would increase far too quickly, meaning they practically had to eat like cattle; constantly grazing, despite having good energy stores.
After failing time and time again to get the results I wanted I sat down and tried to theorize exactly how I wanted the digestive system to work. After some time I worked out this basic formula:

if Glucose > X
then Convert Glucose to Glycogen.

if Glucose < Y
then Convert Glycogen to Glucose.

The idea was to keep a certain amount of Glucose in the system for exercise, then store the rest of it for later use.
Armed with this basic but considerably thought out idea I set about trying to code it genetically, only to discover there are no genes that allow this kind of manipulation. But how then had Glucose been converting to Glycogen when the genes read:

1*Glucose => 3*Glycogen
3*Glycogen => 1*Glucose

It was a perfect conversion system that should have resulted in both chemicals remaining stagnant as one converted to the other and back again. The answer was time.
It turns out that Glucose converts to Glycogen twice as fast as Glycogen converts back to Glucose. This means that Glycogen will build up in the system as it takes much longer to convert back to Glucose.

Thus did this lead me to my solution, which has turned out to be incredibly simple. I made it take longer to convert Glycogen back to Glucose. This now takes roughly three times as long, rather than twice as long. Since HungerIncrease occurs when Glycogen converts back to Glucose, this now means Norns get hungry about one third slower.
As well as this I increased the amount of Hexokinase that is produced while exercising. This chemical combines with Glucose to form CO2 and Activase, both of which are essentially waste chemicals.
I also added a new gene that combines Glucose with Hexokinase and produces HungerIncrease.
Finally I tweaked the Glucose/Glycogen conversion rate to be 1=>2, not 1=>3 as I found the Norns glycogen levels didn't drop fast enough to induce proper starvation

This has all balanced out quite nicely and I think I'm pretty happy with it all. After so much back and forth I'm surprised that the original formulas were correct, they just needed some slight tweaking. Really I shouldn't be surprised though, considering this is Steve Grand's handiwork.

The final point worth mentioning is that a healthy Norn should now have a life-force somewhere between 90-98%, up from ~77%, which I think is pretty cool.

IMMUNE SYSTEM

What I really wanted to achieve with this new system was to have Antibodies actually fight Antigens. Unfortunately I don't think it's possible to have a completely realistic system due to how infections work.
From what I can tell, when a Norn is infected they temporarily get injected over and over again with specific toxins (a combination of antigens, toxins and histamines). These toxins will keep being injected until the correct antibody reaches the same value as its antigen counterpart, at which point all toxins will start to decrease until they leave the system.
This appears to be hardcoded, not driven genetics so I don't think I can change it. This prevents us from building a system where the body creates Antibodies, which kill off the Antigens. The Antibodies must reach a specific value before they can start curing the Norn.
This really sucks. I hope I'm wrong and that this can be changed genetically. But until then I've built a compromise.

When infected, similar to before, the Norn's body will start producing Antibodies in exchange for a little Glucose.
The amount of Antibodies produced has been increase. This is due to a bunch of new genes that make the Antibody combine with the Antigen to produce Hotness, thus killing the Antigen.
As I said, the infection will continue to produce Antigens, even while the Antibodies kill them off. To truly defeat the infection the Antibodies need to reach that specific value. So now Antibodies will both fight off the infection in a more realistic fashion, and will also increase until they reach the specified value, enabling them to kill off the infection.
I've also added some new genes that allow Antibodies to fight off the other toxins like HistamineA, Fever Toxin and Glycotoxin.
Finally, I lowered the Half-Lives of all the Antibodies. This is pretty unrealistic, however we've limited in how bacteria and germs can evolve in the game, and I wanted a system that could simulate this. So the lowering of the Antibodies is meant to account for bacteria evolution.
Not to worry, the Antibodies still deplete very slowly (it should take about 5 hours to completely disappear) so your Norns will still have a pretty strong immunity should they be attacked by the same illness twice.

Just to give you the heads up, this new system has made the Norns more susceptible to disease. This is mostly because they now use Glucose to fight off both Antigens and Toxins, whereas before the other Toxins didn't need to be fought directly. I've balanced it so a Norn should be able to successfully fight off 4-5 Antigens and/or Toxins at once, but should they be infected with a massive number of Toxins all at once it's possible they may not be able to build up enough Antibodies to recover. The only way to cure them would be to inject them with the correct Antibodies. Currently there is no way to do this by default. You'll need some COBs to get around this.

There's a handful of other small changes I've made, but they're small and frankly this post is long enough. Once I release the new breed I'll do a full write up and break down every single change I've made and why. But that will be a long list and some dry reading, and will really only be for the geneticists out there.

I'll be releasing a Beta for these guys soon, so stay tuned.

Saturday, October 26, 2013

Gene Manipulation - Perficia

My goodness I think I've done it. I mean I screwed up a whole heap of things and there's definitely some parameters that need tweaking, but I think I've finally created a Norn who sleeps extremely well.
...
Actually, maybe a little too well.
...
Okay, so I think I've inadvertently created a narcoleptic Norn.


I'd like you to meet Perfecia, the first Norn of the Perfecio breed. Perficio is Latin for perfection, which unlike our modern interpretation means "without fault", perfecio originally means "to finish" or "to bring to an end". I'm hoping Grandroids will be released relatively soon (relatively being within a year or so) and that this will be the only breed I ever create, thus I thought the double meaning to the name was suitable.

But anyway, back to the narcoleptic. There's a great deal of interesting things to discuss about her, all of which will influence the tweaks I'll make to her descendant, but let's start with the most interesting aspect; her sleepiness.

As I said in my last post, there's quite a number of genes that relate to sleeping. Let's go through the ones I've changed.

305: Receptor.Creature.Sensorimoter.InvoluntryAction5(Sleep), chemical=sleepiness, threshold=230
305: Receptor.Creature.Sensorimoter.InvoluntryAction5(Sleep), chemical=sleepiness, threshold=191

These receptors control a range on involuntary actions like sneezing, coughing, egg laying and sleeping. Basically this gene forces a Norn to sleep when the sleepiness chemical reaches said threshold. I lowered the threshold dramatically and Perfecia does indeed fall asleep much quicker than most Norns would.
Considering the other tweaks I've made I think I'll revert this one back to it's original, as Perfecia sleeps a little too hastily.

130: Emitter.Creature.Sensorimotor.I'm Asleep, chemical=Boredom, threshold=0
130: Emitter.Creature.Sensorimotor.I'm Asleep, chemical=Reward, threshold=0

These emitters release certain chemicals when certain actions are performed and the threshold is reached. Previously Norns would become bored when asleep. I theorized this would result in their being punished and wake them up prematurely, so I changed the chemical to Reward. This seems to have done wonders, as Perfecia sleeps soundly every time and completely drops her sleepiness and tiredness levels to zero before waking up. I may lower the amount of Reward being released, but I think I'll keep this one.

136: Emitter.Creature.Sensorimotor.I'm Asleep, chemical=NFP, threshold=0
136: Emitter.Creature.Sensorimotor.I'm Asleep, chemical=NFPdecrease, threshold=0

 This gene is almost identical to the previous one. In this case NFP (Need for pleasure) is released, again possibly waking the Norn prematurely. I changed this so sleeping will in fact lower NFP. This also seems to be helping.

312: Emitter.Creature.Sensorimotor.I'm Asleep, chemical=Boredom, threshold=0
312: Emitter.Creature.Sensorimotor.I'm Asleep, chemical=Reward, threshold=0

At first glance you'd think this was a duplicated gene, but in fact this gene switches on at Youth, while 130 switches on at the Embryo stage. This gene overwrites 130 when the Norn reaches Youth.

108: I am Resting = 50*TirednessDecrease + 16*SleepinessIncrease + 16*BoredomIncrease + NONE
108: I am Resting = 50*TirednessDecrease + 16*SleepinessIncrease + 16*Reward + NONE

109: I am Sleeping = 66*TirednessDecrease + 77*SleepinessDecrease+ 16*BoredomIncrease + 16*ColdnessIncrease
109: I am Sleeping = 66*TirednessDecrease + 77*SleepinessDecrease + 16*Reward + NONE

These two stimuli genes dictate what happens when the Norn rests and sleeps. To clarify, resting is when the Norn lays down and relaxes, and sleeping is what usually follows with the little 'Zzzz's.
Both these actions would previously bore the Norn, making them less likely to fall asleep, and when asleep, more likely to wake up. I've changed the BoredomIncrease to reward, and Perfecia seems to enjoying lounging about and sleeping.

 135:Instinct. If Drive=Tiredness and I rest = 93*Reward
 135:Instinct. If Drive=Tiredness and I rest = 255*Reward

A nice simple one. If the Norns Tiredness drive is the highest of all its drives and the Norn rests it will be rewarded. I simply increased the amount of reward.

301:Instinct. Child. If Verb=Rest and I rest = 255*Reward
301:Instinct. Embryo. If Verb=Rest and I rest = 255*Reward

This gene rewards the Norn if it hears the word 'Rest' and  rests. Previously this turned on at the child stage. I changed it to the earlier embryo life stage.

334: Instinct: If Drive=Tiredness and I rest = 255*Reward

This is a new gene I added. If it looks like a duplicate of gene 135, that's because it is. This is actually a typo. It should be 'Drive=Sleepiness', not Tiredness.

CONCLUSION

These are all the genes related to sleepiness I changed and it's been extremely successful. Too successful. Perfecia prefers to sleep rather than eat. Early on she caught a cold that included sleeping fever. Due to her propensity for sleep she slept through most of the illness at the expense of eating. Naturally this caused her glucose levels to plummet and she very nearly died from the disease.
Clearly I've pushed these genes too far, but the plus side is that I've been successful in creating a Norn who sleeps extremely well and despite some other genes I messed up, Perfecia is one of the happier, more self-sufficient Norns I've raised. I think with tweaking these changes will prove very beneficial.

Next time we'll go through some of the other genes I changed, as there's a great deal I've learned from them, including some interesting mistakes I made.

Friday, October 25, 2013

Genetic Manipulation



I've been working far too hard this last week. Needed a gaming break and unfortunately I just finished playing the latest Tomb Raider. So what to do in the mean time? Oh I know, how about I create a Norn!

As I've mentioned in the past I've been wanting to create a new breed of Norn for a long time. Honestly, most of my efforts on this blog have been building towards this, from the original 3D world I created in Unity3D, to my wolfing runs in C3, to my selective breeding programs in C1. It's all been towards this end.

To give a quick recap, what I'd like to achieve with a new C1 breed would be:
  1. Better eating and sleeping habits
  2. Better at relieving boredom
  3. Intelligence that doesn't rely on instincts
  4. Life spans based on how stressful their lives are
  5. Improved immune system
  6. Energy Conservation
  7. Speciation
I suspect 6 and 7 may not be possible with the limitations built into the game. I also suspect 5 will take quite a while to puzzle out and develop. But 1-4 should be pretty easy to implement, at least in theory if not in practice.

The last couple of days I've gone through the entire Forest Norn genome and made a stack of notes on things I'd definitely like to change, and a few things I'd like to play with. I won't bore you with the entire list (with 332 genes already present, plus a few I'd like to add that would take forever), but I'll give you a quick run down on categories of genes I'd like to play with.

DRIVE RAISERS - REACTION

Genes 57-70 are labeled as DRIVE RAISERS in the Genetics Kit. Essentially these genes all relate to what happens with all the drive-increase chemicals (eg. painIncrease, hungerIncrease, etc.). A typical gene might read:

59: 1*HungerIncrease + 1* => 1*Hunger + 1*Punishment; half-life = 8.

In a Forest Norn gene, it reads:

59: 1*HungerIncrease + 1* => 1*Hunger + 1*; half-life = 8.

Most of these genes have been altered in the Forest Norn genome not to punish the creature. I think this is a good thing, as sometimes increasing drives isn't a bad thing. For example, if you exercise you will increase your hunger. Exercise isn't a bad thing, but under this model the Norn may feel they are being punished for it. It's also possible that if the creature was playing with a ball at the same time as being hungry they might associate this punishment with pushing toys. Not so good.

I intend to take the Forest Norn genes a step further and take out all punishment for increasing drives. The actual punishment can come from elsewhere.

STIMULUS

There's a whole range of stimulus genes I'd like to tweak. They cover a wide range of topics, so I can't list them all here, but one example would be:

93: Pointer slaps me = PainIncrease + FearIncrease + AngerIncrease + SleepinessDecrease

These all make sense, but I think I'd rather change the SleepinessDecrease to Punishment. At present slapping your Norns doesn't directly punish them (although tickling does reward). It only punishes them through drive-raisers, which I'll be removing. In fact the current SleepinessDecrease would reward them slightly.

Another example would be:

98: Object comes into view = NFPdecrease + BoredomDecrease + LonelinessDecrease + SexDriveDecrease

Lowering NFP (Need for pleasure) and boredom makes sense. Lowering loneliness only makes sense if the object happens to be another creature. Lowering sexDrive makes no sense. I'd definitely remove that.

INSTINCTS

I'd like to remove as many instinct genes as possible. I prefer my Norns to learn from their lives, not be forced into it by their genetics. That said I'll still keep a few, such as the fight/flight mechanics or breeding related ones.

DIGESTION

The digestion related genes (142-145) were altered in the Forest Norns and I think for the most part I'll keep these the same. But they're worth mentioning as it's a pretty important change from the original design.

When a Norn eats it injects Starch into their system. This then turns into Glucose and finally into Glygogen.

In the original genome Starch would turn into Glucose. Glucose would turn into Glycogen + HungerDecrease. Finally Glyocogen could turn back into Glucose + Hunger.

The Forest Norn model is Starch into Glucose + HungerDecrease. Glucose into Glycogen. Glycogen into Glucose. Notice that the Norns hunger gets address immediately in the Forest Norn version. There is also no increase of hunger when converting back and forth. I think this a more realistic model that should also help the Norn learn the importance of eating.

STRESS

The stress related genes are found between 282-292. These genes already reduce sexDrive and lower life expectancy. I just intend to push them further. Idealy I'd like Norns that can live for the normal ~12 hours, but realistically only live for around 8. I definitely want stress (Adrenaline) to have a greater impact on reducing sexDrive and breeding. This should help simulate some natural selection.

ALCOHOL

Currently males get angry when drinking and females increase their sexDrive. Am I the only one who thinks this is a little sexist? Not entirey sure how I'll change this yet, but either way these genes will be the same for both male and female.

SLEEPING

There's a whole range of genes dedicated to sleeping and they're spread throughout the entire genome. I intend to address each of these and make alterations as I go. One example would be gene 312:

312: Emitter "I'm asleep" = Chemical Boredom

Norns have enough trouble sleeping without increasing their boredom (and therefore their punishment). I'll be changing this to Reward or something similar.

CONCLUSION

There's a great deal more genes I intend to play with (around 100 in all) and I will make a post listing all the changes at some point. But hopefully this will give you an idea of what to expect. If you've got any ideas you'd like to add, please throw them my way.

Thursday, October 3, 2013

Dragonboots Studios Facebook page

Howdy guys. Long time no chatty. Unfortunately I can't say I'm here to do a Creatures update, but I thought you might be interested in some of my other going's on.

As many of you may already know, my day job is as a 3D animator. For the past few years I've been working as a freelance under the company name 'Dragonboots Studios'.

Well, I've recently done over the website, and part of the redo has included adding a new Facebook page as a blogging section. At present I'm mostly using it to give progress updates on the short film I'm working on 'The Little Pokie Machine'.

If that sort of thing interests you, drop by and 'Like' the page.

Dragonboots Studios Facebook Page

I've just entered a new post featuring a wallpapers download of my best character work. Get in quick while the post is still at the top of the page!