## The Game: computing growth

Posted by Vitalie Ciubotaru

Previous posts on this topic:

* * *

## 1. Plant size

Under normal conditions, plant size increases over time. Plant growth depends on:

• Plant’s current size ($S_{t}$) — the larger the plant is, the more it adds every day.
• Growth rate ($g$) — a general concept, which will be discussed in more detail below.
• Cell size ($S_{max}$) — i.e. there is an upper limit for growth.

Thus, $\frac{\mathrm{d}S_t}{\mathrm{d}t} = f(S_{t}, g, S_{max}) = S_{t} \cdot g \cdot \frac{S_{max} - S_{t}}{S_{max}}$. When the plant is small, the upper limit is not important and the limiting factor is current size, so initially the plant grows [almost] exponentially. When the plant grows large, the upper limit becomes more binding and growth decelerates again. Let me solve this equation for $t$.

$\frac{\mathrm{d}S_{t}}{S_{t} \cdot (S_{max} - S_{t})} = \frac{g \mathrm{d}t}{S_{max}}$
$\int \!\frac{1}{S_{t} \cdot (S_{max} - S_{t})} \, \mathrm{d}S_{t} = \int \! \frac{g}{S_{max}} \, \mathrm{d}t + C$
Solving the left side integral:
$\frac{1}{S_{t} \cdot (S_{max} - S_{t})} = \frac{S_{max}}{S_{max} S_{t} (S_{max} - S_{t})} = \frac{S_{max} - S_{t} + S_{t}}{S_{max} S_{t} (S_{max} - S_{t})} = \frac{S_{max} - S_{t}}{S_{max} S_{t} (S_{max} - S_{t})} + \frac{S_{t}}{S_{max} S_{t} (S_{max} - S_{t})} = \frac{1}{S_{max} S_{t}} + \frac{1}{S_{max} (S_{max} - S_{t})}$
So $\int \!\frac{1}{S_{t} \cdot (S_{max} - S_{t})} \, \mathrm{d}S_{t} = \int \!\frac{1}{S_{max} S_{t}} \, \mathrm{d}S_{t} + \int \!\frac{1}{S_{max} (S_{max} - S_{t})} \, \mathrm{d}S_{t} = \frac{1}{S_{max}} [\ln (S_{t}) - \ln (S_{max} - S_{t})] = \frac{\ln (\frac{S_{t}}{S_{max} - S_{t}})}{S_{max}}$
Solving the right side integral:
$\int \! \frac{g}{S_{max}} \, \mathrm{d}t = \frac{g t}{S_{max}}$
Now putting it all together:
$\frac{\ln (\frac{S_{t}}{S_{max} - S_{t}})}{S_{max}} = \frac{g t}{S_{max}} + C$
Simplify and redefine the constant:
$\ln (\frac{S_{t}}{S_{max} - S_{t}}) = g t + C$
$(\frac{S_{t}}{S_{max} - S_{t}}) = e^{g t + C} = e^C + e^{g t} = S_{0} e^{g t}$
$S_{t} = \frac{S_0 S_{max} e^{g t}}{1 + S_0 e^{g t}}$
Finally, making it discrete:
$S_1 = \frac{S_0 S_{max} e^g}{1 + S_0 e^g}$

## 2. Growth rate

Time to discuss $g$. The growth rate depends on:

• (mis)match between the “climate requirements” of a particular species and “climate” or “resource endowment” of a particular cell
• capacity to acquire resources — roots and leaves

For example, insufficient sunlight can be partly compensated by large leaves and insufficient minerals/water — by longer roots. Excessive resources will represent a small saving in roots/leaves, but will still be limiting the growth rate. As a possible way to make the impact of deficit and excess of resources to be symmetric, developing roots and leaves can cost no resources, just a mouse click and some waiting time. Have to think a bit on this.

## The Game: plant types and species

Posted by Vitalie Ciubotaru

Previous posts on this topic:

* * *

In all games, player “races” have names and these names are somehow suggestive of the race traits (strength, aggressiveness etc.). Thus my plants should have names and these names should reflect their traits.

Plants have too many features, so making up a full set of real plants which would reflect all possible combinations of these features is way too much for now. I will start with a couple of traits and match them with broad groups of plans.

Features:
* Longevity — annuals, biennials and perennials (a plant “year” or “season” will correspond to a real-life week or two).
* Speed of propagation — low (shoots/runners/rhyzomes/bulbs, with high resistance and high survival rates), high (seeds/spores, with low protection and low survival rates)
* ?

Plants:
* Palms (Arecaceae or Palmae) family — perennial, high temp/sunlight, high humidity, any soil, evergreen, seeds (few, high survival), no shoots.
* Bamboo — kinda perennial, lots of shoots, all plantation blooms once and dies out.
* Araceae —

* * *

Followup posts on the game progress:

## Dynamic inconsistency

Posted by Vitalie Ciubotaru

Every working day I leave my lab at about 5pm and head for kinderkarten to pick up my kid. Each time, I leave with a strong intension to return later and stay until late. However, after I reach home, my plans often change — I feel tired, or it rains outside, or there’s something to do at home etc. — and I do not return to the lab. A typical example of dyniamic inconsistency.

When I leave the lab, I know that I might not be willing to return until next day, so I try to “commit” myself somehow. For example, I leave my computer turned on and waiting for me to return. Mind you, it’s not idling — it’s usually left to do distributed computing for the folding@Home project. Thus, every time I have a incentive to be back soon.

Teoretically, voluntarily constraining oneself’s choices is not an optimal solution, but what is?

## The Game: life and death

Posted by Vitalie Ciubotaru

Previous posts on this topic:

* * *

There should be some limit as to the plant size:

• Plant growth depends on resources aquired (production function :-) — better roots and leaves mean quicker growth
• Resources depend on resource endowment in each particular cell
• Plant growth is limited by cell size — the larger the plant is (relative to the cell size), the slower it can grow, other things equal

There should be some limit on the age:

• Death is not immediate, it’s the last phase in the plant life and it takes some time (more or less fixed), after which plant disappears
• Death phase is triggered randomly after age t1. The probability of “death” linearly increases with age and reaches 100% at age t2. Well, death should be predetermined (so as not to roll the dice every time), but should be kept secret from the player.
• Mmm … can attacks trigger death or they just hinder growth and proliferation?

* * *

Followup posts on the game progress:

Posted by Vitalie Ciubotaru

The existing menu items are based on respective .desktop files in /opt/kde3/share/apps/systemview. We can edit them, add or delete items globally by playing with these .desktop files. In order to add an item for one user (i.e. locally), we just create a new .desktop file in $HOME/.kde3/share/apps/systemview. In my case the systemview directory was missing (and thus only systemwide items showed), so I first created it and then a file pointing to my Downloads folder: # mkdir -pv ~/.kde3/share/apps/systemview # cat > ~/.kde3/share/apps/systemview/downloads.desktop << "EOF" [Desktop Entry] Type=Link Path=$HOME/Downloads Icon=folder_man Name=Downloads folder EOF
That's it.

## DIY plant filter for my aquarium

Posted by Vitalie Ciubotaru

Plant filter for my fish tank

It’s probably not the most efficient filter out there, but it is definitely better than the one that came with my fish tank. It consists of:

• air pump
• case with water intake and waterfall (I bought a fish nursery — it was much larger than a waterfall filter)
• gravel
• plants
• plastic tube

The plants sit inside a piece of plastic tube, a bit narrower than the width of the case. Water inflow is done by simple air-lift. Incoming water flows into the tube with plants, goes down, washing plant roots, and then goes up between the tube and case walls, all the way through gravel. Finally is flows back into the tank through a waterfall.