Mythruna
March 29, 2024, 07:33:17 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Mob genetics  (Read 8044 times)
Rayblon
Donators
Hero Member
***
Posts: 1861


Hmmm...


View Profile
« on: June 05, 2015, 07:11:40 AM »

Th teitl sayes it all. Is there going to be a system of heredity and variability between organisms? I ask in part because of the role genetics and heredity plays in my advanced farming suggestion... and in part because I'm going to be a geneticist and I like that stuff. :3
Logged

Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #1 on: June 05, 2015, 06:42:19 PM »

Sounds painful to program, honestly (depending on the number of components and how they 'change' over generations)
Logged
Rayblon
Donators
Hero Member
***
Posts: 1861


Hmmm...


View Profile
« Reply #2 on: June 05, 2015, 09:10:16 PM »

Sounds painful to program, honestly (depending on the number of components and how they 'change' over generations)

Well, let's do a quick (and bare bones) genetics lesson! Cheesy

All genes in plants and animals have two alleles; one from each parent. There are a few different kinds of alleles and allelic interactions. The different kinds of alleles and blendings include:
1. Dominant alleles: An allele that always expresses itself in a gene. (Assuming red is dominant, red rose + blue rose = red rose)

2. Recessive alleles: Only expresses itself in the presence of another recessive allele.(Blue is recessive, so blue rose + blue rose= blue rose, but blue rose + red rose = red rose)
3. Codominant: Two recessive alleles interacting to create a blended phenotype (Assuming coloration is homozygous recessive or homozygous dominant, Red roses+Blue roses = purple roses)

Codominance can be seen when you observe someone with wavy hair(curly hair + straight hair) and occasionally in flowers like snapdragons. It's rare irl, but cross pollinating flowers is more fun when you just have codominant mixes.

When an egg is fertilized, one allele for each gene is present in the egg and sperm cell. To illustrate the possible resulting genotypes and odds, a Punnett square is used. Let's assume we have two heterozygous roses(Rr).  (On the top and left sides of the table, the genotypes of the parents are shown)
Rr
RRRRr
rRrrr

Genotypically(for this punnett square), there is a 50% chance of the offspring being heterozygous, 25% chance of it being homozygous recessive, and 25% chance of it being homozygous recessive. PHENOTYPICALLY, there is a 75% chance of the offspring being red(R Phenotype) and a 25% chance of it being blue(r phenotype).


Now that Genetics class is over, we can get back to the important stuff. Dominance can be a boolean(denoting dominance or recessiveness), and each allele can be a value or set of values. Let's say snapdragons are in the game. There would be white, red, and yellow alleles. All color alleles are recessive, so white+red=pink, yellow+red=orange, and white+yellow=light yellow).

The most comprehensive approach for codominance in color would be to take the mean of the values for hue, brightness, and saturation when expressing codominant alleles in a gene. The most important thing here to note is that there are no new alleles being created. Orange snapdragons don't have orange alleles. To determine which allele is passed on from each parent... For each gene, RNG between 1 and 2; pass parent A's allele accordingly, then RNG for parent B's allele. The passed on alleles are then 'expressed' for the dominant allele, or two matching recessive alleles, or a codominant trait.

As for dominance and recessiveness, they're great for straight up booleans. If there is a cold resistance allele, it is going to work the same if it is heterozygous or homozygous(as long as it's expressed). Of course, I'm oversimplifying it, but you get the idea.
Logged

Rayblon
Donators
Hero Member
***
Posts: 1861


Hmmm...


View Profile
« Reply #3 on: June 05, 2015, 09:14:23 PM »

The fun thing here is, with a recessive cold resistance gene you could create an arctic melon or something... if you can get two homozygous recessives to cross pollinate.
Logged

pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #4 on: June 05, 2015, 10:11:42 PM »

It's not necessarily the mechanics of genetic breeding that's hard to simulate, it's all of the expressions of the genes that is hard.  Somehow the entire makeup of a mob would need to be defined by its genes.  Would be nice but hard to model, I think.
Logged
Rayblon
Donators
Hero Member
***
Posts: 1861


Hmmm...


View Profile
« Reply #5 on: June 05, 2015, 11:13:11 PM »

It's not necessarily the mechanics of genetic breeding that's hard to simulate, it's all of the expressions of the genes that is hard.  Somehow the entire makeup of a mob would need to be defined by its genes.  Would be nice but hard to model, I think.

Well, if you want to simulate genetics to a T, that'd be hell to make... But cold resistance, flower coloration, fur patterns, eye color, stats, etc... wouldn't be terribly difficult to translate with a genetics system... Right? .-.

I hadn't really even considered physiological genes, if that's what you mean... Though, it may not be too intensive... depending on how far you take mob customization, if you plan to do that at all. (That would be ALOT of sliders xD)
« Last Edit: June 05, 2015, 11:24:06 PM by Rayblon » Logged

pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: June 06, 2015, 01:44:18 AM »

It's not necessarily the mechanics of genetic breeding that's hard to simulate, it's all of the expressions of the genes that is hard.  Somehow the entire makeup of a mob would need to be defined by its genes.  Would be nice but hard to model, I think.

Well, if you want to simulate genetics to a T, that'd be hell to make... But cold resistance, flower coloration, fur patterns, eye color, stats, etc... wouldn't be terribly difficult to translate with a genetics system... Right? .-.

I hadn't really even considered physiological genes, if that's what you mean... Though, it may not be too intensive... depending on how far you take mob customization, if you plan to do that at all. (That would be ALOT of sliders xD)

Well, on some level it's all related.  "Cold resistance" doesn't just exist as a bit flipped somewhere... at least not if it's going to make any sense.  On one end, it may actually be the effect caused by a whole bunch of other parameters that might not be so easy to 'gene'... on the other side, a good game designer would give a cold-resistant thing a different look and "well it's all genes underneath" isn't a great excuse.  An excuse, just not a great one.

I mean, if I bread cold resistance into a naked mole rat, I doubt very much it would look very much like a naked mole rat anymore... and the same sort of goes for plants.

But anyway, the framework upon which this would be based doesn't even exist yet so it's hard to speculate, really.  I have no idea what "cold resistance" means in code right now.

Also, just getting mobs to breed at all without accidentally overrunning the world or whatever is going to be tricky enough.  There may be fragile formulas involved that genetics may totally complicate.

I'm not against the idea.  I still remember this part of biology class and I've played with plenty of genetic algorithms breeding smarter code and ants and stuff.  It won't be lack of desire that keeps something like this from happening but I already plan to do a bunch of nearly impossible stuff... so don't anyone get their hopes up on this one. Wink
Logged
Rayblon
Donators
Hero Member
***
Posts: 1861


Hmmm...


View Profile
« Reply #7 on: June 06, 2015, 03:11:41 PM »

I mean, if I bread cold resistance into a naked mole rat, I doubt very much it would look very much like a naked mole rat anymore... and the same sort of goes for plants.

But anyway, the framework upon which this would be based doesn't even exist yet so it's hard to speculate, really.  I have no idea what "cold resistance" means in code right now.

Also, just getting mobs to breed at all without accidentally overrunning the world or whatever is going to be tricky enough.  There may be fragile formulas involved that genetics may totally complicate.

I'm not against the idea.  I still remember this part of biology class and I've played with plenty of genetic algorithms breeding smarter code and ants and stuff.  It won't be lack of desire that keeps something like this from happening but I already plan to do a bunch of nearly impossible stuff... so don't anyone get their hopes up on this one. Wink

Cold resistance CAN be conferred by hair on the naked mole rat, or it can illicit a change in ion channels and tissue composition to prevent freezing and allow the mole rat to survive with a very low core body temperature. Carrots can survive in an arctic tundra by accumulating sugars in their roots and leaves; sugar is a natural antifreeze in this setting. There is an octopus species that thrives off the coasts of equatorial countries with water temperatures in excess of 85 degrees... but can and does reside in arctic territories. The interesting thing about those carrots and that species of octopus is... they don't look any different for it. The only way to distinguish them is by analyzing the sugar distribution in the carrots and the structure of ion channel proteins in the octopi.

All a gene does is code for a protein; not necessarily a trait(AKA a distinguishable feature). Cold or heat resistance("stress") proteins aren't a visible trait until the plant or animal is tested for it; which is what makes finding heat tolerant carrots hard. Cold resistance, if you think of it in terms of a tolerance spectrum, is just a subtraction of X degrees from the minimum safe temperature.

Even sun and shade tolerance in plants is difficult to diagnose at a glance. Dark pigment can be useful for low light conditions, but there are many such plants that do best in full sun. Again, that is the work of invisible proteins. Honestly, only someone with little knowledge on the subject matter could criticize the game for not screaming "cold resistant!" when there's a carrot that can handle a chill.


I'm goigg to end this post here becaus my phone keyboar ids being glitchy as hell.
Logged

ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #8 on: June 06, 2015, 03:36:35 PM »

Interesting Idea Rayblon
Logged

Rayblon
Donators
Hero Member
***
Posts: 1861


Hmmm...


View Profile
« Reply #9 on: June 06, 2015, 04:54:27 PM »

Also there are limited gene pools for each species. A cold resistance gene in carrots can't be tanrsferred to a naked mole rat. The naked mole rat does not have a cold resistance gene in real life, either.

EDIT: It's sometimes possible through gene splicing...
 but that won't be in game so meh.
« Last Edit: June 06, 2015, 06:05:30 PM by Rayblon » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!