-
Notifications
You must be signed in to change notification settings - Fork 1
DNA, Genes, Proteins revisited
7yl4r edited this page Dec 7, 2014
·
5 revisions
DNA: collection of genes
Gene:
proteinCode: byteString which specifies the particular protein produced by this gene
activator: proteinCode(s) which turns this gene on
silencer: proteinCode(s) which turns this gene off
Protein:
code: unique byteString id
desc: short description of what the protein does
functions: [
{
key: hard-coded string linking to a function,
value: how strongly the protein does whatever it does
},
...
]
Some protein codes are hard-coded to UI and environmental functions, but most are not. That is, some proteins have "functions" external to the cell, but most do not. Those which are not hard-linked are free to be used as activator/silencer proteins to control genetic expressions. Hard-links represent imaginary physical properties of the produced proteins. Color, for instance is a protein function. Proteins can (should?) have multiple functions.
Hard-coded protein codes can represent input or output. Inputs are used by becoming activators for other proteins, outputs are used when a Gene produces the output protein.
these proteins are hard-coded into the environment
* onclick: when the cell has been clicked (within last few generations?)
* onmouseover: when the cell is hovered over (within last few generations?)
* overcrowded: the cell has > certain # of neighbors
* undercrowded: the cell has < certain # of neighbors
* allwaysOn:
these protein functions are hard-coded into the environment
* color: color display is changed by given val [-FFFFFF, +FFFFFF]
* move: cell moves to neighbor # given by val [1,2,3,4, 6,7,8,9]
* suicide: cellular sepukku in {value} generations
* spread: protein spreads out to neighbors and stays there for {value} generations
* silence: silences proteinCode specified by {value}
CellObj:
proteins_present: [protCode1, protCode2] # list of proteins present and not silenced
foreach "activated" gene (foreach activator prot. present, foreach gene activated by this protein)
if silencer not present:
produce_protein # add protein to proteins_present
execute protein function(s)
#EXAMPLES:
colorProtein:
desc: adds 123 to the hex color value
code: COLOR_UP_PROT
functions: [
{
key: increaseColor
val: 123
}
]
doNothingProtein:
desc: does nothing
code: RANDOM_STUFF_HERE
functions: []
crowdedBehaviorGene:
desc: this Gene produces a protein when crowded
activator: OVERCROWDED_PROT
linkGene: # creates a protein in presence of other protein
activator: ACTIVATOR_PROT_CODE
proteinCode: RESULTANT_PROT_CODE