Phantasian Biology 101: Lesson 2; Chemistry

·

·

When I was about 13 or 14 years old, I remember being given a classroom test, in which one of the questions was something like, “Question 1: What are the roles of chemistry in the body?”

What are the roles??? What was I supposed to say to that? “ALL of them. Chemistry plays all of the roles in the body.” But somehow that didn’t seem enough. I was clearly expected to elaborate.

I was only a kid, so I expect the “correct” answer for my age was just “chemistry is used for growth and energy”, or something like that, but honestly I was paralyzed by the overwhelming enormity of the question. What on earth was coming next? “Question 2: Write down everything you know.”

Nevertheless, “all of them” was definitely the right answer. You are nothing but chemistry; nothing but chemical reactions and interactions. Every thought that you think, every feeling you feel, every movement you make, everything you perceive, the color of your skin, the shape of your eyebrows, the fate of last night’s dinner, the battle that is going on inside you between your cells and a million foreign enemies. That’s all chemistry.

Phantasians, mercifully, are quite a bit simpler than us, and the fact that they’re virtual makes some difference too. After all, they don’t really need to eat in order to grow; they don’t really need to excrete waste products, or produce energy, or fight off disease. All of that stuff is fake, essentially. In virtual reality, one of the most fundamental laws of physics is actually inverted. Whereas in the physical world things are easy to move but hard to copy; in the virtual world, things are easy to copy but they can’t be moved. I’ll talk about that another time, perhaps, but the thrust of what I’m saying is that there is no innate conservation of energy or matter inside virtual worlds. Things don’t waste away or run out of resources unless they’re specifically programmed to.

So why do the phantasians need chemistry at all, then? The lame answer to this is that if there was nothing for them to fight against, they wouldn’t be alive. We expect living creatures to eat, excrete, expend energy and try hard to avoid having to, whereas we don’t expect this of rocks. It’s kind of the point. So, in a virtual world, we need virtual chemistry in order to simulate nutrients, digestive processes, energy production and consumption, and all the rest.

But there’s a deeper answer that isn’t so lame: Chemistry is computation. Not as in a digital computer, but an analogue one. If you don’t know what an analogue computer is, I’d be happy to explain that fascinating story another time, since I am very old, and reminiscing is one of my few remaining pleasures 🙂

How do you know when you’re hungry? It’s due to chemical computations: The levels of glucose and other substances in your blood, the signals being sent to your brain by bacteria in your gut, the amount of energy that your body has been using or expects to need, the amount of time since you last ate, the time of day or night… All of these things and more are mediated by chemical levels, and from the combination of these we compute how hungry we are.

How do you know when you’re frightened? Just like in hunger, there has to be something to measure it, right? If there wasn’t something there to act like the needle on a voltmeter, we would have no way of knowing how scared we are. It doesn’t follow that something as big of a deal as fear, all comes down to the level of a single chemical, but a lot of our feelings do rely on the production and suppression of hormones and similar signaling chemicals, and hormones (along with their receptors) are computational chemistry. They turn things on and off, according to a complex set of rules.

So, phantasians need these things too, for the same reasons we do.

Much earlier in this project, I came up with a rather nice system for defining virtual enzymes, which were able to construct or break down specific other enzymes, purely according to their chemical structure. I really liked this, but unfortunately it turned out to be far too complex for my limited brain to design working chemical systems with. So, instead, I gave the phantasians much simpler chemicals that are basically just numbers with names attached. Glucose is the name of one such chemical, and 0.3 might be its current concentration in the blood. It’s a pretty simple system, but not trivial.

(For reasons I won’t go into, it used to be that these chemicals all needed seven-character names, so you’ll find some oddly named substances, such as polypep, hydroxy, and oxygene. It’s not actually necessary any more, but I got used to them! Some of them have no exact biological equivalent, but I tried to give them vaguely meaningful Greek or Latin names, such as maleate (bad), and morsate (pain). There’s also some vague logic as to why some of the chemicals end in -ase, while others end in -ate or -ine, etc.)

There are some other numbers associated with each chemical, besides concentration, which define how and whether it has a spontaneous tendency to decay, build up, or settle to a happy medium. All of these numbers are defined in the genes; one gene per chemical. Here’s an example of a chemical gene:

gene C X
{
	name = maleate
	np = 1
	below = 0.001
	above = 0
	slew = 0.1
	concentration = 1
}

Maleate is a chemical that tracks how healthy or ill the creature feels. The gene specifies that they will slowly recover from feeling sick. However, various chemical reactions can also drastically alter the level of maleate over time. Rather than define all of these reactions as part of the structure of the chemical itself, I decided to specify them separately, in their own genes. Here’s an example of a reaction gene:

gene Z X
{
	r1 = glucase
	r2 = glucose
	p1 = glucase
	p2 = ureanin
	ratioR1 = 1
	ratioR2 = 1
	ratioP1 = 1
	ratioP2 = 1
	baseRate = 0.0050
}

This gene specifies that glucose turns slowly into ureanin, but only in the presence of glucase. The more glucose and glucase there is in the bloodstream (and the less ureanin), the faster the reaction happens. But because glucase is both an input and an output of this reaction, it doesn’t get consumed in the process. In other words, glucase acts as an enzyme, which facilitates or catalyzes the production of ureanin from glucose. Other reactions might convert two chemicals into one, or one into two, or two into a different pair.

Okay, so we have a bunch of chemicals, and a bunch of reactions that can convert up to two reactants into one or two reaction products over time and in proportion to their concentrations. That’s actually quite powerful, but so what? Chemistry is no use at all unless it can actually do something.

And for that we need chemoreceptors. A receptor gene looks like this:

gene R O
{
	organ = brain
	structure = XXXX
	substructure = Somatic
	locus = 0
	mode = 0
	chem = vigilin
	x1 = 0.17
	x2 = 0.23
	x3 = 1
	x4 = 1
	y1 = 1
	y2 = 0
	y3 = 0
	y4 = 0
}

The object that the receptor is attached to is called a locus. It’s basically just a fancy variable inside the code. The ‘address’ of the locus specified by this particular gene is, “inside the brain, in a generic region (as opposed to a specific layer of a specific brain map, which I’ll explain in a later lesson), at locus number 0. The gene then goes on to say that the receptor is sensitive to the concentration of a chemical called vigilin, and it should respond to it in a certain way (its response curve).

The resulting receptor produces a constantly changing number, which is visible to the program code and thus can be used in a huge variety of ways by yours truly.

By the way, you don’t actually have to know any of these details, unless you want to. There won’t be a test; I’m mostly just trying to give you an overall feel for the kind of thing that’s going on inside the creatures. You can think of it like a biologist would, rather than like a mathematician would.

Vigilin is actually one of several chemicals that begin to rise as a creature falls asleep (which in turn happens as a result of other chemistry). Through this receptor, vigilin is acting as a kind of anesthetic. As the concentration rises, the correspondingly falling output of the receptor reduces the strength of most nerve signals going from the brain to the muscles, making the limbs become weak and floppy. It also affects signals passing up from the senses to the brain, apart from those that might need to wake the creature up in response to a bump or a loud noise.

So, anyway, that’s reactions and receptors. The remaining kind of chemistry gene is also one that causes something to become attached to a locus in the code. This (as you might be able to guess) is called a chemoemitter. Whereas receptors turn chemical concentrations into numbers, emitters produce a given chemical in amounts that vary according to the value stored in the given locus. Here’s an example:

gene E O
{
	organ = skin
	structure = XXXX
	substructure = Somatic
	locus = 1
	mode = 0
	chem = hydrase
	x1 = 0
	x2 = 1
	x3 = 1
	x4 = 1
	y1 = 0.1
	y2 = 1
	y3 = 1
	y4 = 1
}

As you can see, this emitter is attached to the creature’s skin, on a locus which (I happen to know) produces a value proportional to subjective temperature. This value is highest when the creature is in a hot, dry, exposed environment, and the emitter is defined so as to produce the chemical hydrase in response. Hydrase is an enzyme that causes the production of sweat, thus cooling the creature down. But this action in turn chemically reduces the amount of hydroxy (water) available in the blood, which will lead to a rise in thirst, And, if nothing is done about it, this can eventually lead to muscle weakness and other problems. So, don’t leave your creatures outside in the middle of the day during summer, if you think they’re a species that prefers cooler or moister conditions!

Chemicals, reactions, emitters, and receptors can be used in concert to produce a wide range of analogue computations – digestion, energy production and storage, temperature regulation, sexual maturation and reproduction, and so on. Multiple receptors and emitters can even be connected to the same locus, which allows for one chemical to interact with another (or even itself!) in some quite interesting ways. The creatures’ menstrual cycle would be a good example of this, but I’ll talk about how that works in future posts.

One particularly important group of chemicals is the set that makes up the emotional or affective system, also known as drives. These chemicals represent emotional states, such as how bored, angry or lonely a creature feels. They play a vital role in learning, since creatures generally try to learn ways to return their various drives back to their ‘comfort level’ again, after something has disturbed them. But they also play other roles too, such as causing a cold creature to shiver, a happy one to smile, or a tired one to want to sit down.

In general, these drive chemicals are ‘bipolar’. For instance, curiate represents a high degree of boredom whenever the value is very low, but over-excitement when the value is too high. The comfort zone lies somewhere in the middle. Similarly, eudrate represents sadness at one end and joy at the other. You might think that joy would be perpetually desirable, but chemistry is never quite that simple! Just as in humans, if every single day was party time, we might eventually stop appreciating it, and wish we could spend a nice quiet day reading a book instead. The interplay of all these drive chemicals, and the ways that receptors and emitters adjust their responses over time, can be quite complex. Like I say, it’s a computer.

Also, I should mention payloads. These are components attached to virtual world objects (including the creatures) that define the various sounds, visual stimuli, etc. which accompany changes in an object’s state. One of the properties of a payload is that it can emit chemicals directly into the bloodstream of a creature. So, when a phantasian eats a mushroom, for instance, the nutrients and other substances that are present in that particular species of mushroom get ‘injected’ by the payload, directly into the creature’s bloodstream. And sometimes merely seeing an object do something interesting (smile or frown, say) can cause the production (injection) of mentally active substances such as emotional chemicals, which in turn trigger internal reactions of various kinds.

So there you have it: Phantasian biochemistry is essentially an analogue computer, made up of reactions, receptors and emitters, which act upon enzymes, hormones and other chemicals in the bloodstream, and form a bridge between that chemistry and a zillion different sensory and motor functions in the creatures’ bodies and brains. Sleep is thus chemistry, learning is chemistry, pregnancy is chemistry, feelings and emotional signals are chemistry.

So, “Question 1: What are the roles of chemistry in the body?”

“All of them!!! Chemistry plays all of the roles in the body!!! I told my teacher that!!!”

Alongside the brain, of course, which in phantasians is a different kind of chemistry altogether. It’s exceedingly complex in its own right and tightly linked to the main biochemistry through receptors and emitters, but it works in its own special way, because of the hundreds of signals involved. I’ll get to the brain eventually, and we’ll also come back to the details of the individual chemical systems (digestion, reproduction, etc.) later, along with the sensory organs that feed them. But in the next post I think I should talk about genetics. You’ve already seen a few examples of phantasian genes, but there’s more to say about them yet.


5 3 votes
Article Rating
Subscribe
Notify of
23 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Fern
Fern
2 months ago

No test, you say? Although, if there was some sort of in-game test on the material, for some sort of prize, a cool hat perhaps, I wouldn’t be offended.

Mabus
Mabus
2 months ago

This sounds interesting and reminds me a lot of the creatures biochemestry.

And that helped me understand a lot with experimentation. For example once I made a drug by accident. I wanted to create a food that helps against all desires. Because I wanted them to feel happy.

Yeah, it was extremely addictive and they did nothing but eat that…

Also a question about that sweating gen, would it be possible for a human to edit the “uses water” part or even to mutate it away? Making a biochemical perpetuum mobile? Had a lot of problems with those after a few generations in creatures.

Oh and about the connection of all biochemical processes we have, I am still amazed to this day how tight everything is connected. Started a diet just before Christmas, as a result my body temperature dropped, my energy levels and motivation gone down. Just because of that. Stopped it a week ago, suddenly everything is back to normal (and sadly I didn’t even reach the full six-pack). And all that was “just” reduction of food (combined with heat induced apoptosis of fat cells)

neurobot
neurobot
2 months ago

For FGPS members who are interested in fictionalized takes on analog computers, I think both the organ-inspired tube computer from Neal Stephenson’s Cryptonomicon, as well as the ant-based “computer” from Adrian Tchaikovsky’s Children of Time, qualify. Oh, also, the various semaphore-and-so-forth-based “computers” from Three Body Problem.

Also, my own contribution to tying this post together with the last post, and emphasizing the difference between the “drives” system here, and the one in something like The Sims: in The Sims, drives are (I’m assuming) really just numbers and equations. Drives in The Sims could be made to interact with one another, or even to exhibit various dynamical behaviors, but any such behaviors would have to be programmed in, one at a time.

With a system like the one Steve has created, all of that dynamical behavior will just be an emergent property of the characteristics of the chemicals, and the rules for the overall system. That is, there are still numbers and equations, but they operate at a different level.

The downside of this approach is that you have to tweak things and tune the (emergent) behavior through trial and error, because it isn’t as simple as just changing the coefficient for a slope or changing from linear to quadratic, as developers might do with a Sims-like system. But, the upside is that all of the complexity and emergent properties come for free, rather than needing to be manually implemented one at a time.

(Apologies to Steve for bogarting, and please correct anything I’ve gotten wrong… the analogy with the drive system from The Sims just occurred to me when I got to that section of the post, and I thought it might lead some folks astray.)

Last edited 2 months ago by neurobot
Squirrel
Squirrel
2 months ago

I remember playing with the norns’ biochemistry! They made it much harder to see the mechanics in Creatures 3. I guess they were trying to simplify it to appeal to a younger audience maybe.

Robowaifu Technician
Robowaifu Technician
1 month ago

I don’t really know much about neurochemistry because it never really interested me. The way I always understood is was that hormones are a way of broadcasting information throughout a body in a way that wouldn’t be practical for the nervous system. In a real brain a neuron way in the back of the occipital lobe can’t connect directly to one in front of the frontal lobe the way a virtual neuron could. And instead of some part of the brain trying to tell every other relevant part to work faster, it’s just more efficient to produce adrenaline to tell everything to work in overdrive, or something to that effect.

For artificial life I don’t really get the point of it except to more accurately emulate a real living thing, making it more complex in the process.

Mabus
Mabus
1 month ago

I pondered a bit t more about the biochemestry and the perpetuum mobile problem.

All ideas boiled down to a universal energy cost used with every biochemical interaction.

If one chemical is split into two or tree, it needs more energy (may it be called ATP or whatever else) to prevent creating an infinite loop of excess energy.

And just a hand full of allowed pathways to create energy. Out of food or sunlight (food would be way more efficient)

However one other idea popped into my mind, it would be a longshot. The last hope for using your original system. Because I really, really loved the first pitch!

It would use a more messy and time consuming way. Therefore no option for the next few months anyway. That’s why I would recommend doing this around Christmas 2025, 2026 or even 2027.

There it would be released as “unsolvable” puzzle for the (hopefully) established community. It is important to be released around new year, because people have a lot of free time and seek out challenges. (I was once in a spec Evo project that exploded in popularity, just because of that release date between the years)

The chemicals like egsgsg should be able to be named something a human can better remember.

And the first goal won’t be a functional animal but an functional bacteria or fungi.

Once that is established, the brain gets connected (either by you or you give instructions to us and let the community tinker with it)

Afterwards the first animal will be made with the new old system. Sure, the biochemestry will be a mess and all over the place, because multiple people messed around with it. But that’s also how evolution works.

If you think that idea might work. Or at least won’t be compleate crap, establishing a dual biochemestry early on should make adaptions easyer. That way eh starch would have a simple starch biochemestry signal as well as a more complex molecule, that won’t be used for the next few years.

Because I really hope somehow the first biochemestry version can be saved for an other day in the far future…

It just needs 2-10 dedicated fans with free time and a lot of trials.

Don’t forget, we fans and players work on a different scale. Running a game overnight with waaaay to many creatures is our standard 😉

Chat Icon Close Icon
23
0
Would love your thoughts, please comment.x
()
x