corrected bug, rerun test, vortrag nears completion

This commit is contained in:
Stefan Dresselhaus
2018-06-27 12:51:06 +02:00
parent 4f32bf2cd0
commit 6b93f61d0d
654 changed files with 64616 additions and 20377 deletions

View File

@ -8,6 +8,7 @@ slides: $(INPUT)
pandoc -f markdown+smart+emoji -t revealjs \
--template ./template.html \
--incremental \
--mathjax \
--indented-code-classes=haskell \
--section-divs \
-o chemodiversity.html $(INPUT)

View File

@ -170,7 +170,7 @@
</ul></li>
<li class="fragment">Input can be <code class="sourceCode haskell"><span class="dt">Substrate</span></code> and/or <code class="sourceCode haskell"><span class="dt">Products</span></code></li>
<li class="fragment">Outputs can only be <code class="sourceCode haskell"><span class="dt">Products</span></code></li>
<li class="fragment"><span class="math inline"></span> This makes them to Edges in a graph combining the chemical compounds</li>
<li class="fragment"><span class="math inline">\(\Rightarrow\)</span> This makes them to Edges in a graph combining the chemical compounds</li>
</ul>
</section>
<section id="usage-in-the-current-model-1" class="level2">
@ -191,9 +191,9 @@
<li class="fragment"><strong><code class="sourceCode haskell"><span class="dt">Predator</span></code>s</strong> consist of
<ul>
<li class="fragment">a list of <code class="sourceCode haskell"><span class="dt">Compound</span></code>s that can kill them</li>
<li class="fragment">a fitness impact (<span class="math inline">[0..1]</span>) as the probability of killing the plant</li>
<li class="fragment">a fitness impact (<span class="math inline">\([0..1]\)</span>) as the probability of killing the plant</li>
<li class="fragment">an expected number of attacks per generation</li>
<li class="fragment">a probability (<span class="math inline">[0..1]</span>) of appearing in a single generation</li>
<li class="fragment">a probability (<span class="math inline">\([0..1]\)</span>) of appearing in a single generation</li>
</ul></li>
<li class="fragment"><code class="sourceCode haskell"><span class="dt">Predator</span></code> need not necessary be biologically motivated
<ul>
@ -223,7 +223,7 @@
<p>Additional rules:</p>
<ul>
<li class="fragment">Every “subtree” from the marked <code class="sourceCode haskell"><span class="dt">PPM</span></code> is treated as a separate species (fungi, animals, …)<br />
<span class="math inline"></span> Every predator can only be affected by toxins in the same part of the tree</li>
<span class="math inline">\(\Rightarrow\)</span> Every predator can only be affected by toxins in the same part of the tree</li>
<li class="fragment">Trees can be automatically generated in a decent manner to search for environmens where specific effects may arise</li>
</ul>
</div>
@ -242,55 +242,172 @@
<section id="plants" class="level2">
<h2>Plants</h2>
<p>A plant consists of</p>
<p>A <strong><code class="sourceCode haskell"><span class="dt">Plant</span></code></strong> consists of</p>
<ul>
<li class="fragment">a <strong><code class="sourceCode haskell"><span class="dt">Genome</span></code></strong>, a simple list of genes
<ul>
<li class="fragment">Triple of <code class="sourceCode haskell">(<span class="dt">Enzyme</span>, <span class="dt">Quantity</span>, <span class="dt">Activation</span>)</code></li>
<li class="fragment">without order or locality (i.e. interference of neighboring genes)</li>
<li class="fragment"><code class="sourceCode haskell"><span class="dt">Quantity</span></code> is just an optimization (=Int) to group identical <code class="sourceCode haskell"><span class="dt">Activation</span></code>s</li>
<li class="fragment"><code class="sourceCode haskell"><span class="dt">Activation</span></code> is a float <span class="math inline">\(\in [0..1]\)</span> to regulate the activity of the <code class="sourceCode haskell"><span class="dt">Enzyme</span></code> genetically</li>
</ul></li>
<li class="fragment">an <code class="sourceCode haskell">absorbNutrients</code>-Function to simulate various effects when absorbing nutrients out of the environment, depending on the environment (i.e. <em>can</em> use informations about chemistry, predators, etc.)
<ul>
<li class="fragment">Not used in our simulation, as we only have <code class="sourceCode haskell"><span class="dt">PPM</span></code> as “nutrient” and we take everything given to us.</li>
</ul></li>
</ul>
</section>
<section id="metabolism-simulation" class="level2">
<h2>Metabolism simulation</h2>
<p>Compounds are created foo..</p>
<p>Creation of compounds from the given resources is an iterative process:</p>
<ul>
<li class="fragment">First of all we create a conversion Matrix <span class="math inline">\(\Delta_c\)</span> with corresponding startvector <span class="math inline">\(s_0\)</span>.</li>
<li class="fragment"><p>We now iterate <span class="math inline">\(s_i = (\mathbb{1} + \Delta_c) \cdot s_{i-1}\)</span> for a fixed number of times (currently: <span class="math inline">\(100\)</span>) to simulate the metabolism<sup>[2]</sup>.</p>
<div class="footer">
<p><sup>[2]</sup>: Thats a lie, we calculate <span class="math inline">\((\mathbb{1} + \Delta_c)^{100}\)</span> efficiently via <code>lapack</code>-internals</p>
</div></li>
<li class="fragment">Entries in the matrix come from the <code class="sourceCode haskell"><span class="dt">Genome</span></code>: an <code class="sourceCode haskell"><span class="dt">Enzyme</span></code> which converts <span class="math inline">\(i\)</span> to <span class="math inline">\(j\)</span> with quantity <span class="math inline">\(q\)</span> and activity <span class="math inline">\(a\)</span> yield <span class="math display">\[\begin{eqnarray*}
\Delta_c[i,j] &amp;\mathrel{+}=&amp; q\cdot a,\\
\Delta_c[j,i] &amp;\mathrel{+}=&amp; q\cdot a, \\
\Delta_c[i,i] &amp;\mathrel{-}=&amp; q\cdot a, \\
\Delta_c[j,j] &amp;\mathrel{-}=&amp; q\cdot a
\end{eqnarray*}.\]</span>
<ul>
<li class="fragment">This makes the Enzyme-reaction invertible as both ways get treated equally.</li>
</ul></li>
</ul>
</section>
<section id="metabolism-example" class="level2">
<h2>Metabolism-example</h2>
<ul>
<li class="fragment"><p>Given a simple Metabolism with <span class="math inline">\(1\)</span> nutrient (first row/column) and <span class="math inline">\(2\)</span> Enzymes in sequence, we have given <span class="math inline">\(\Delta_c\)</span> wtih corresponding startvector <span class="math inline">\(s_0\)</span>: <span class="math display">\[\Delta_c = 0.01 \cdot \begin{pmatrix}
-1 &amp; 1 &amp; 0 \\
1 &amp; -2 &amp; 1 \\
0 &amp; 1 &amp; -1 \\
\end{pmatrix}, s_0 = \begin{pmatrix}\text{PPM:} &amp; 3 \\ \text{Compound1:} &amp; 0 \\ \text{Compound2:} &amp; 0\end{pmatrix}.\]</span></p></li>
<li class="fragment"><p>In the simulation this yields us <span class="math display">\[s_{100} \approx \begin{pmatrix}\text{PPM:} &amp; 1 \\ \text{Compound1:} &amp; 1 \\ \text{Compound2:} &amp; 1\end{pmatrix},\]</span> which is the expected outcome for an equilibrium.</p></li>
</ul>
</section>
<section id="assumptions-for-metabolism-simulation" class="level2">
<h2>Assumptions for metabolism simulation</h2>
<ul>
<li class="fragment">All Enzymes are there from the beginning</li>
<li class="fragment">All Enzyme-reactions are reversible without loss</li>
<li class="fragment">static conversion-matrix for fast calculations (unsuited, if i.e. enzymes depend on catalysts)</li>
<li class="fragment">One genetic enzyme corresponds to (infinitely) many real (proportional weaker) enzymes in the plant, which get controlled via the “activation” parameter</li>
</ul>
</section>
<section id="fitness" class="level2">
<h2>Fitness</h2>
<ul>
<li class="fragment">Static costs of enzymes</li>
<li class="fragment">Cost of active enzymes</li>
<li class="fragment">We handle fitness as <span class="math inline">\(\text{survival-probability} \in [0..1]\)</span> and model each detrimental effect as probability which get multiplied together.</li>
<li class="fragment">To calculate the fitness of an individual we take three distinct effects into consideration:
<ul>
<li class="fragment">Static costs of enzymes
<ul>
<li class="fragment">Creating enzymes weakens the primary cycle and thus possibly beneficial traits (growth, attraction of beneficial organisms, …) <span class="math display">\[F_s := \text{static_cost_factor} \cdot \sum_i q_i \cdot a_i \quad | \quad (e_i,q_i, a_i) \in \text{Genome}\]</span></li>
<li class="fragment">limits the amount of dormant enzymes</li>
</ul></li>
<li class="fragment">Cost of active enzymes
<ul>
<li class="fragment">Cost of using up nutrients <span class="math display">\[F_e := \text{active_cost_factor} \cdot \frac{\text{Nutrients used}}{\text{Nutrients available}}\]</span></li>
</ul></li>
<li class="fragment">Deterrence of attackers <span class="math inline">\(F_d\)</span> (next slide)</li>
</ul></li>
</ul>
</section>
<section id="attacker" class="level2">
<h2>Attacker</h2>
<ul>
<li class="fragment">Rate of attack ~&gt; Paper, Formulas</li>
<li class="fragment">Defenses
<li class="fragment">Predators are modeled after <a href="http://doi.org/10.1098/rspb.2007.0456">Svennungsen et al. (2007)</a></li>
<li class="fragment">Each predator has an expected number of attacks <span class="math inline">\(P_a\)</span>, that are poisson-distributed with impact <span class="math inline">\(P_i\)</span>.</li>
<li class="fragment">Plants can defend themselves via
<ul>
<li class="fragment">single plant</li>
<li class="fragment">automimicry</li>
<li class="fragment">toxins that the predator is affected by with impact-probability <span class="math inline">\(D_t(P_i)\)</span></li>
<li class="fragment">herd-immunity via effects like automimicry: <span class="math inline">\(D_{pop} = \mathbb{E}[D_t(P_i)]\)</span></li>
</ul></li>
<li class="fragment"><p>All this yields the formula:</p>
<p><span class="math display">\[F_d := 1 - e^{- (D_{pop} \cdot P_a) (1-D_t(P_i))}\]</span></p></li>
<li class="fragment">The attacker-model is only valid for many reasonable assumptions
<ul>
<li class="fragment">equilibrium population dynamics</li>
<li class="fragment">equal dense population</li>
<li class="fragment">which individual to attack is independently chosen</li>
<li class="fragment">etc. (Details in the paper linked above)</li>
</ul></li>
</ul>
</section>
<section id="haploid-mating" class="level2">
<h2>Haploid mating</h2>
<ul>
<li class="fragment">fixed population-size (100)</li>
<li class="fragment"><span class="math inline">$p(\textrm{reproduction}) = \frac{\textrm{plant-fitness}}{\textrm{total fitness in population}}$</span></li>
<li class="fragment">Gene
<li class="fragment">We hold the population-size fixed at <span class="math inline">\(100\)</span></li>
<li class="fragment">Each plant has a reproduction-probability of <span class="math display">\[p(\textrm{reproduction}) = \frac{\textrm{plant-fitness}}{\textrm{total fitness in population}}\]</span> yielding a fitness-weighted distribution from that <span class="math inline">\(100\)</span> new offspring are drawn</li>
<li class="fragment"><p>in inheritance each gene of the parent goes through different steps (with given default-values)<sup>[3]</sup></p>
<div class="footer">
<p><sup>[3]</sup>: in case of quantity <span class="math inline">\(q &gt; 1\)</span> the process is repeated <span class="math inline">\(q\)</span> times independently.</p>
</div>
<ul>
<li class="fragment">mutation</li>
<li class="fragment">duplication</li>
<li class="fragment">deletion</li>
<li class="fragment">addition</li>
<li class="fragment">activation-noise</li>
<li class="fragment"><strong>mutation</strong>: with <span class="math inline">\(p_{mut} = 0.01\)</span> another random enzyme is produced, but activation kept</li>
<li class="fragment"><strong>duplication</strong>: with <span class="math inline">\(p_{dup} = 0.05\)</span> the gene gets duplicated (quantity <span class="math inline">\(+1\)</span>)</li>
<li class="fragment"><strong>deletion</strong>: with <span class="math inline">\(p_{del} = p_{dup}\)</span> the gene get deleted (or quantity <span class="math inline">\(-1\)</span>)</li>
<li class="fragment"><strong>addition</strong>: with <span class="math inline">\(p_{add} = 0.005\)</span> an additional gene producing a random enzyme with activation <span class="math inline">\(0.5\)</span> gets added as mutation from genes we do not track (i.e. primary cycle)</li>
<li class="fragment"><strong>activation-noise</strong>: activation is changed by <span class="math inline">\(c_{noise} = \pm 0.01\)</span> drawn from a uniform distribution, clamped to <span class="math inline">\([0..1]\)</span></li>
</ul></li>
</ul>
<aside class="notes">
<ul>
<li>Default values <strong>not</strong> motivated in any way!</li>
<li>finding out how these values influence is core!</li>
</ul>
</aside>
</section>
</section>
<section class="slide level1">
<section id="simulations" class="level2">
<h2>Simulations</h2>
<p>Parameters tested</p>
<ul>
<li class="fragment">x</li>
<li class="fragment">y</li>
<li class="fragment">z</li>
<li class="fragment">Overall question: What parameters are necessary for chemodiversity?
<ul>
<li class="fragment">How can we see chemodiversity?</li>
<li class="fragment">We define an Enzyme <span class="math inline">\(E\)</span> as divers, if the average of this Enzyme in the population stays below <span class="math inline">\(0.5\)</span>, so <span class="math inline">\(E_i \in E_{div} \text{iff.} \mathbb{E}[E_i] &lt; 0.5\)</span></li>
<li class="fragment">We can then count the number of diverse Enzymes per plant <span class="math inline">\(E_{d,p_i} = |\left\lbrace E_i | E_i \in E_{div}, E_{i,p_i} &gt; 0.5, \right\rbrace|\)</span></li>
</ul></li>
<li class="fragment">To get an insight into how this behaves we observe several other parameters every generation:
<ul>
<li class="fragment">Fitness <span class="math inline">\(\in [0..1]\)</span></li>
<li class="fragment">Number of different compounds created</li>
<li class="fragment">Amount of compounds created</li>
<li class="fragment">Number of Plants theoretically resistant to predator <span class="math inline">\(i\)</span> (i.e. <strong>can</strong> produce a toxin to defend themselves, albeit not to <span class="math inline">\(100\%\)</span>.</li>
</ul></li>
</ul>
</section>
<section id="simulations-cont." class="level2">
<h2>Simulations (cont.)</h2>
<ul>
<li class="fragment">General setup of the simulation:
<ul>
<li class="fragment">All using the example-environment shown before
<ul>
<li class="fragment">27 different compounds, 1 Nutrient (simulating the primary metabolism)</li>
<li class="fragment">7 of 27 compounds are toxic</li>
<li class="fragment">at least 3 compounds are needed for total immunity</li>
<li class="fragment">4 predators</li>
</ul></li>
<li class="fragment">Duration of 2000 generations</li>
</ul></li>
<li class="fragment">Different setups tested:
<ul>
<li class="fragment">Behavior of predators (<code class="sourceCode haskell"><span class="dt">AlwaysAttack</span></code>, <code class="sourceCode haskell"><span class="dt">AttackRandom</span></code>, <code class="sourceCode haskell"><span class="dt">AttackInterval</span> <span class="dt">Int</span></code>)</li>
<li class="fragment">varying <span class="math inline">\(\text{static_enzyme_cost}\)</span> from <span class="math inline">\(0.0\)</span> to <span class="math inline">\(0.20\)</span> in steps of <span class="math inline">\(0.02\)</span>
<ul>
<li class="fragment">effectively limits the amount of maximal enzymes to <span class="math inline">\(\frac{1}{\text{static_enzyme_cost}}\)</span></li>
</ul></li>
<li class="fragment">varying <span class="math inline">\(\text{nutrient_impact}\)</span> from <span class="math inline">\(0.0\)</span> to <span class="math inline">\(1.0\)</span> in steps of <span class="math inline">\(0.1\)</span>
<ul>
<li class="fragment">makes toxins less/more costly to produce</li>
</ul></li>
</ul></li>
</ul>
</section>
</section>
@ -303,6 +420,48 @@
</section>
<section class="slide level1">
<section id="effect-of-predator-behavior-onto-chemodiversity" class="level2">
<h2>Effect of Predator-Behavior onto chemodiversity</h2>
<figure>
<img data-src="img/attackRate_E_d_mu_vs_C_mu.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
<section id="effect-of-static-enzyme-cost" class="level2">
<h2>Effect of static enzyme cost</h2>
<figure>
<img data-src="img/staticCost_Fitness_vs_num_compounds.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
<section id="effect-of-static-enzyme-cost-cont." class="level2">
<h2>Effect of static enzyme cost (cont.)</h2>
<figure>
<img data-src="img/staticCost_Fitness_vs_e_d_mu.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
<section id="effect-of-static-enzyme-cost-cont.-1" class="level2">
<h2>Effect of static enzyme cost (cont.)</h2>
<figure>
<img data-src="img/staticCost_e_d_mu_vs_num_compounds.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
<section id="effect-of-nutrient-impact" class="level2">
<h2>Effect of nutrient-impact</h2>
<figure>
<img data-src="img/nutrientCost_Fitness_vs_num_compounds.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
<section id="effect-of-nutrient-impact-cont." class="level2">
<h2>Effect of nutrient-impact (cont.)</h2>
<figure>
<img data-src="img/nutrientCost_Fitness_vs_e_d_mu.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
<section id="effect-of-nutrient-impact-cont.-1" class="level2">
<h2>Effect of nutrient-impact (cont.)</h2>
<figure>
<img data-src="img/nutrientCost_e_d_mu_vs_num_compounds.png" alt="Graph" /><figcaption>Graph</figcaption>
</figure>
</section>
</section>

View File

@ -207,11 +207,22 @@ body {
.reveal small * {
vertical-align: top; }
.reveal .math {
color: #1a6091;
}
.reveal .math.display {
margin: auto;
display: block;
width: fit-content;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #586e75;
color: #3070a0;
font-weight:bold;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
@ -470,8 +481,7 @@ body {
padding: 5px;
font-size: 0.5em;
left: 100px;
width: 724px;
top: 750px;
bottom: -100px;
}

View File

@ -0,0 +1 @@
../../simulations/attackRate/E_d_mu_vs_C_mu.png

View File

@ -0,0 +1 @@
../../simulations/attackRate/E_d_sigma_vs_C_mu.png

View File

@ -0,0 +1 @@
../../simulations/enzymeCost/nutrientCost/Fitness_vs_e_d_mu.png

View File

@ -0,0 +1 @@
../../simulations/enzymeCost/nutrientCost/Fitness_vs_num_compounds.png

View File

@ -0,0 +1 @@
../../simulations/enzymeCost/nutrientCost/e_d_mu_vs_num_compounds.png

View File

@ -0,0 +1 @@
../../simulations/enzymeCost/staticCost/Fitness_vs_e_d_mu.png

View File

@ -0,0 +1 @@
../../simulations/enzymeCost/staticCost/Fitness_vs_num_compounds.png

View File

@ -0,0 +1 @@
../../simulations/enzymeCost/staticCost/e_d_mu_vs_num_compounds.png

View File

@ -90,8 +90,7 @@ Usage in the current Model
- This is used to simulate i.e. worse growth, fertility and other things
affecting the fitness of a plant.
- We are not using named Compounds, but restrict to generic `Compound
1`{.haskell},
`Compound 2`{.haskell} ...
1`{.haskell}, `Compound 2`{.haskell} ...
- Not done, but worth exploring:
- Take a "real-world" snapshot of Nutrients and Compounds and recreate them
- See if the simulation follows the real world
@ -179,53 +178,175 @@ CTRL+Click for zoom!
Plants
------
A plant consists of
...
A **`Plant`{.haskell}** consists of
- a **`Genome`{.haskell}**, a simple list of genes
- Triple of `(Enzyme, Quantity, Activation)`{.haskell}
- without order or locality (i.e. interference of neighboring genes)
- `Quantity`{.haskell} is just an optimization (=Int) to group identical
`Activation`{.haskell}s
- `Activation`{.haskell} is a float $\in [0..1]$ to regulate the activity of
the `Enzyme`{.haskell} genetically
- an `absorbNutrients`{.haskell}-Function to simulate various effects when
absorbing nutrients out of the environment, depending on the environment (i.e.
*can* use informations about chemistry, predators, etc.)
- Not used in our simulation, as we only have `PPM`{.haskell} as "nutrient"
and we take everything given to us.
Metabolism simulation
---------------------
Compounds are created foo..
Creation of compounds from the given resources is an iterative process:
- First of all we create a conversion Matrix $\Delta_c$ with corresponding
startvector $s_0$.
- We now iterate $s_i = (\mathbb{1} + \Delta_c) \cdot s_{i-1}$ for a fixed number of times
(currently: $100$) to simulate the metabolism^[2]^.
::: footer :::
^[2]^: Thats a 'lie', we calculate $(\mathbb{1} + \Delta_c)^{100}$ efficiently via
`lapack`-internals
:::
- Entries in the matrix come from the `Genome`{.haskell}: an `Enzyme`{.haskell} which
converts $i$ to $j$ with quantity $q$ and activity $a$ yield
$$\begin{eqnarray*}
\Delta_c[i,j] &\mathrel{+}=& q\cdot a,\\
\Delta_c[j,i] &\mathrel{+}=& q\cdot a, \\
\Delta_c[i,i] &\mathrel{-}=& q\cdot a, \\
\Delta_c[j,j] &\mathrel{-}=& q\cdot a
\end{eqnarray*}.$$
- This makes the Enzyme-reaction invertible as both ways get treated equally.
Metabolism-example
------------------
- Given a simple Metabolism with $1$ nutrient (first row/column) and $2$ Enzymes
in sequence, we have given $\Delta_c$ wtih corresponding startvector $s_0$:
$$\Delta_c = 0.01 \cdot \begin{pmatrix}
-1 & 1 & 0 \\
1 & -2 & 1 \\
0 & 1 & -1 \\
\end{pmatrix}, s_0 = \begin{pmatrix}\text{PPM:} & 3 \\ \text{Compound1:} & 0 \\ \text{Compound2:} & 0\end{pmatrix}.$$
- In the simulation this yields us
$$s_{100} \approx \begin{pmatrix}\text{PPM:} & 1 \\ \text{Compound1:} & 1 \\ \text{Compound2:} & 1\end{pmatrix},$$
which is the expected outcome for an equilibrium.
Assumptions for metabolism simulation
-------------------------------------
- All Enzymes are there from the beginning
- All Enzyme-reactions are reversible without loss
- static conversion-matrix for fast calculations (unsuited, if i.e. enzymes
depend on catalysts)
- One genetic enzyme corresponds to (infinitely) many real (proportional weaker)
enzymes in the plant, which get controlled via the "activation" parameter
Fitness
-------
- Static costs of enzymes
- Cost of active enzymes
- We handle fitness as $\text{survival-probability} \in [0..1]$ and model each
detrimental effect as probability which get multiplied together.
- To calculate the fitness of an individual we take three distinct effects into
consideration:
- Static costs of enzymes
- Creating enzymes weakens the primary cycle and thus possibly beneficial
traits (growth, attraction of beneficial organisms, ...)
$$F_s := \text{static_cost_factor} \cdot \sum_i q_i \cdot a_i \quad | \quad (e_i,q_i, a_i) \in \text{Genome}$$
- limits the amount of dormant enzymes
- Cost of active enzymes
- Cost of using up nutrients
$$F_e := \text{active_cost_factor} \cdot \frac{\text{Nutrients used}}{\text{Nutrients available}}$$
- Deterrence of attackers $F_d$ (next slide)
Attacker
--------
- Rate of attack ~> Paper, Formulas
- Defenses
- single plant
- automimicry
- Predators are modeled after [Svennungsen et al. (2007)](http://doi.org/10.1098/rspb.2007.0456)
- Each predator has an expected number of attacks $P_a$, that are
poisson-distributed with impact $P_i$.
- Plants can defend themselves via
- toxins that the predator is affected by with impact-probability $D_t(P_i)$
- herd-immunity via effects like automimicry: $D_{pop} = \mathbb{E}[D_t(P_i)]$
- All this yields the formula:
$$F_d := 1 - e^{- (D_{pop} \cdot P_a) (1-D_t(P_i))}$$
- The attacker-model is only valid for many reasonable assumptions
- equilibrium population dynamics
- equal dense population
- which individual to attack is independently chosen
- etc. (Details in the paper linked above)
Haploid mating
--------------
- fixed population-size (100)
- $p(\textrm{reproduction}) = \frac{\textrm{plant-fitness}}{\textrm{total fitness in population}}$
- Gene
- mutation
- duplication
- deletion
- addition
- activation-noise
- We hold the population-size fixed at $100$
- Each plant has a reproduction-probability of
$$p(\textrm{reproduction}) = \frac{\textrm{plant-fitness}}{\textrm{total fitness in population}}$$
yielding a fitness-weighted distribution from that $100$ new offspring are
drawn
- in inheritance each gene of the parent goes through different steps (with
given default-values)^[3]^
::::: footer
^[3]^: in case of quantity $q > 1$ the process is repeated $q$ times
independently.
::::
- **mutation**: with $p_{mut} = 0.01$ another random enzyme is produced, but
activation kept
- **duplication**: with $p_{dup} = 0.05$ the gene gets duplicated (quantity $+1$)
- **deletion**: with $p_{del} = p_{dup}$ the gene get deleted (or quantity $-1$)
- **addition**: with $p_{add} = 0.005$ an additional gene producing a random
enzyme with activation $0.5$ gets added as mutation from genes we do not
track (i.e. primary cycle)
- **activation-noise**: activation is changed by $c_{noise} = \pm 0.01$ drawn from
a uniform distribution, clamped to $[0..1]$
:::: notes
- Default values **not** motivated in any way!
- finding out how these values influence is core!
::::
--------------------------------------------------------------------------------
Simulations
-----------
Parameters tested
- Overall question: What parameters are necessary for chemodiversity?
- How can we see chemodiversity?
- We define an Enzyme $E$ as divers, if the average of this Enzyme in the
population stays below $0.5$, so $E_i \in E_{div} \text{iff.} \mathbb{E}[E_i] < 0.5$
- We can then count the number of diverse Enzymes per plant $E_{d,p_i} =
|\left\lbrace E_i | E_i \in E_{div}, E_{i,p_i} > 0.5, \right\rbrace|$
- To get an insight into how this behaves we observe several other parameters
every generation:
- Fitness $\in [0..1]$
- Number of different compounds created
- Amount of compounds created
- Number of Plants theoretically resistant to predator $i$ (i.e. **can** produce
a toxin to defend themselves, albeit not to $100\%$.
Simulations (cont.)
-------------------
- General setup of the simulation:
- All using the example-environment shown before
- 27 different compounds, 1 Nutrient (simulating the primary metabolism)
- 7 of 27 compounds are toxic
- at least 3 compounds are needed for total immunity
- 4 predators
- Duration of 2000 generations
- Different setups tested:
- Behavior of predators (`AlwaysAttack`{.haskell}, `AttackRandom`{.haskell}, `AttackInterval Int`{.haskell})
- varying $\text{static_enzyme_cost}$ from $0.0$ to $0.20$ in steps of $0.02$
- effectively limits the amount of maximal enzymes to $\frac{1}{\text{static_enzyme_cost}}$
- varying $\text{nutrient_impact}$ from $0.0$ to $1.0$ in steps of $0.1$
- makes toxins less/more costly to produce
- x
- y
- z
--------------------------------------------------------------------------------
@ -237,10 +358,40 @@ Results
--------------------------------------------------------------------------------
Effect of Predator-Behavior onto chemodiversity
----------------------------------------
![Graph](img/attackRate_E_d_mu_vs_C_mu.png)
Effect of static enzyme cost
----------------------------
![Graph](img/staticCost_Fitness_vs_num_compounds.png)
Effect of static enzyme cost (cont.)
------------------------------------
![Graph](img/staticCost_Fitness_vs_e_d_mu.png)
Effect of static enzyme cost (cont.)
------------------------------------
![Graph](img/staticCost_e_d_mu_vs_num_compounds.png)
Effect of nutrient-impact
-------------------------
![Graph](img/nutrientCost_Fitness_vs_num_compounds.png)
Effect of nutrient-impact (cont.)
---------------------------------
![Graph](img/nutrientCost_Fitness_vs_e_d_mu.png)
Effect of nutrient-impact (cont.)
---------------------------------
![Graph](img/nutrientCost_e_d_mu_vs_num_compounds.png)