Kindlewild

Genetics in code

By Robin Dowling ยท 10 months ago

So, how do you assign genetics to an organism in code? That's what I asked myself at first.

I created an Organism class, and added a few attributes that I believed the organisms in my world ought to have. Things that define them and propagate naturally to offspring.

Fuzzy values for max possible age, values for how likely the organism is to want to reproduce, given the right circumstances, the maximum number of offspring, its max theoretical mass and density.

Stuff like that.