Simulation Ideas
Game of Life
We could start off by just doing the game of life in our framework. We wouldn't even need collision detection working since the cells don't move, but instead just access the adjacency information. This would be a good thing to demonstrate what conceptually what we are doing is as well.
Collision:
If two cells would collide, the cell with the larger area (area=length*heigth) remains in place, the other is not allowed to move. If the smaller cell is attempting to grow in such a way that it will overlap with a larger cell, it instead grows in another direction. If the larger cell is attempting to grow on top of the smaller cell, the smaller cell should be pushed out of the way so that the larger cell is allowed to grow.
If a cell and a virus or food particle collide, there will be a rule for calculating the %chance of a successful absorbtion. If the collision is successful, the food or virus is removed and considered to be absorbed into the cell, and the cell's status updated accordingly (+food, +virus, etc). If the collision is unsuccessful, whichever object was attempting to move on top of the other is displace such that they no longer overlap.
If we do implement boundaries, and a cell or other object collides with one, it should follow the displacement rules above, as no object can overlap or go outside of the boundaries. If a cell is attempting to grow outside of the boundaries, it instead grows in another direction.
Infection:
If a cell absorbes a virus (and does not resist infection) it will become infected. When infected, the cell undergoes a cyclic activity check, once every x (maybe 3) turns. Upon completion of one of these cycles, the cell has a % chance of taking one of 3 possible paths: continued infection (no change, still infected), lysing (cell is destroyed, new viruses are spawned within the cell's area), or restoration (the cell is healed, and no longer infected). Upon successfully colliding with a virus, the cell is allowed to make an initial check to resist infection, however, the longer the cell has been infected, the lower the % chance that restoration will be successful. Also, when a cell lyses, the number of viruses formed depends on the amount of time that cell has been infected.
Food and Growth:
Upon successfully absorbing a(or a set number of) food particle(s), the cell will attempt to grow by a pre-determined size factor. If enough food particles are absorbed in one step, the cell could grow twice. Once a certain cell size is obtained (aka enough food is absorbed), the cell will divide. The cell will divide evenly into two new cells (possibly both cells should be smaller than the original area?)
Gene Expression:
Postive:
Extra Growth: Each food particle absorbed counts extra (2x, 1.5x?), allowing cells to grow and divide faster. Fast Division: Cells will divide sooner, allowing the cells to exist in greater quantities. Viral Resistant: The % chance of resisting viral infection, as well as becoming restored once infected.
Neutral:
Extra Absorbant: The % chance of successful collision (with both viruses and food) is increased, allowing the cell to obtain more food, but at the risk of getting infected. Extra Movement: The cell will be more active, attempting to move around the grid more, creating more possible collisions. Cell Adhesion: The cell will not move unless it grows. This will reduce the chance of collisions, making growth, but also infection, less likely.
Negative:
Slow Growth: Each growth step takes twice (or more?) the amount of food to grow, causing it to grow very slowly, and divide less often. Viral Weakness: The cell is less resistant to viruses, and will have a lower % chance to resist infection, as well as a lower chance to become restored once infected.
