Building a snail one organ at a time

I think enough of the SnailLife Go infrastructure is ready now for me to start digging into the snail itself. In the PHP draft of SnailLife, I started with a basic concept of a snail “Here’s a snail. All it has is a name, size, and speed” and then made it more and more complex. By the end I had a model that had organs, genes, a reproductive system, macro/micro nutrient requirements, locomotion, a brain with memories, mood, etc. With the Go rewrite I have the luxury of hindsight and a vision based on the draft. I know roughly where I want to end up - “organs, genes, a reproductive system, macro/micro nutrient requirements, locomotion, a brain with memories, mood, etc.”

So now I get to really think about it and try to find the best way to build the snail. I have already made a few changes from the original approach. Before, I’d have one snails table in the database and I kept adding more data to it as the complexity increased. For example, when I added the heart, I added columns associated with heart quantity and quality - a snail had one heart. Its efficiency had a particular value. Its max efficiency had some other value. You get the idea.

But what if a snail is born with some kind of mutation that results in two hearts…or no heart? The original structure was very rigid - two hearts just wasn’t a thing.

This is why I’m now going to have a separate table for organ types and another table for the actual organs that belong to each snail. That way if a snail is born with two hearts, all it takes is another row in the organ table for that snail.

The organ_types table for now just contains two columns - organ_type_id, which is just going to be the organ name, and ideal_quant, which is the “normal” amount of organs that a snail would usually have. I do not think this second column will stick to be honest, I don’t know that it’s really relevant in the grand scheme of things, but for now it’s there. The organ types I’ve registered and plan to implement so far are:

I think I will start implementing these organs one by one, from what I feel might be the least to most complex (the brain will likely come last, but we will see). While looking at each of these I’ll also flesh out what genes would be associated with each snail. I hope that as I go I’ll flesh out the implementation of the genotype and phenotype as well, in relation to each organ that builds up the overall system.

So what will the first organ be? To me the outer shell seems like a natural starting point - many of the visual traits of the snail will be based around the shell and shell patterns, and when working on it I will have to also start thinking about the nutrition system - primarily calcium.

Since I am very much a layperson in the area of snails or biology in general, this will also be a good opportunity to learn more about the organism with a focus on one organ at a time (to the extent that it is possible to learn about a living thing in isolated parts like this, anyway)

comments powered by Disqus