-
Notifications
You must be signed in to change notification settings - Fork 1
Dish aka Environment
7yl4r edited this page Dec 22, 2014
·
3 revisions
To a cell in LifeGenes, their Dish (aka Environment) is the whole universe. This page describes different dish configuration options which can have dramatic effect on the way cells in it behave.
Environments have:
- cell state map : boolean map of live/dead cells
- list of protein maps: boolean (or int density?) maps of protein present/not present for each protein
each iteration, the environment:
- calls each cell's internal run() function to allow protein synthesis/responses
- executes the "rule" of the game (e.g. Conway's GoL rules)
indicates how the dish's run function should behave. That is, whether or not the protein map should reset on each run.
In short: reset: protein values reset with each run. cumulative: proteins build up and must be consumed to go away. decay: proteins never reset, but disappear over time without consumption.
protein values reset with each run. steps are:
- compute protein outputs for each cell
- diffuse proteins to neighboring cells
- perform hard-coded responses (death, birth, etc.)
- reset protein maps
0 1 1 1 0 # state before (live/dead 1/0)
0 0 0 0 0 # all proteins 0
# 1: compute protein outs
0 2 2 2 0 # p outputs (cellEther amount before diffusing)
# step 2: diffuse
1 2 3 2 1 # diffuse (cellEther concentration after diffusing)
# step 3: perform hard-coded protein responses
0 0 1 0 0 # new state (kill/birth criterion applied: 2 < cellEther < 4 to stay alive)
# 4: reset proteins
0 0 0 0 0 # new proteins
protein values build up over time and are never reset. Proteins must be consumed to go away. Steps for each run() are:
- perform hard-coded responses for each cell based on proteins nearby
- compute protein outputs for each cell
- diffuse outputs to neighbors
# ITERATION 1
0 0 0 0 0 before (live/dead 1/0)
0 3 3 3 0 cellEther having been inserted manually
# step 1: compute protein outputs
0 0 0 0 0 no live cells, no protein
# step 2: diffuse
2 3 3 3 2 cellEther diffuses
#step 3: hard-coded responses
0 1 1 1 0 cell birth on 3 cellEther
0 3 3 3 0 consumed cellEther
#ITERATION 2
2 0 0 0 2 cellEther before
0 2 2 2 0 cellEther out
3 2 3 2 3 cellEther diffused
1 0 1 0 1 new state computed...
# step 1: compute protein outs
0 2 2 2 0 p outputs (cellEther amount before diffusing)
# step 2: diffuse
1 2 3 2 1 diffuse (cellEther concentration after diffusing)
# step 3: perform hard-coded protein responses
0 1 1 1 0 new state
# ITERATION 3
0 1 1 1 0 state
1 2 3 2 1 cellEther
#step 1: protein responses
0 1 0 1 0 cellDeath response to cellEther concentrations
0 1 0 1 0 cellEther consumed by cellDeath formation (subtracted from existing concentraiton)
0 2 2 2 0 cellEther to be diffused (on top of existing amounts)
#step 2: diffuse
0 1 0 1 0 cellDeath
1 1 3 1 1 cellEther
# step 3: hard-coded protein responses
0 0 1 0 0 Notice the cells killed by cellDeath
0 0 0 0 0 new cellDeath concentration (was consumed by cell deaths)
TODO