Agent reproduction with behaviors

Author: Lukas Breitwieser
In tutorial ST3-agent-reproduction-mortality we have explored how to add and remove agents from the simulation. In this tutorial we want to explore different behavior options to control if a new agent gets a behavior from the original agent, and if a behavior will be removed from the original one.

Let's start by setting up BioDynaMo notebooks.

We define a simple behavior which prints has print behavior.

We define the following experiment which we will run with different options of the print_behavior.
We create a cell, add a copy of the print_behavior, and run all behaviors. We expect that the following output is created.

mother: 
  has print behavior

Afterwards we print a seperator ------- to indicate cell division, divide the mother cell and run the behaviors of daughter 1 and daughter 2. By definition the original mother cell turns into daugther 1 and the new agent becomes daughter 2.

Let's run the experiment with default parameters and see what happens.

The print_behavior was not copied to the daughter 2 cell and was not removed from the mother cell.


Let's try to copy the behavior from the mother cell to daughter 2.

Now the print_behavior was copied to the daughter 2 cell and was not removed from the mother cell.


Let's try to remove the behavior from the mother cell.

Now the print_behavior was copied to the daughter 2 cell and was removed from the mother cell.


Let's reset the values to the default.

Behaviors provide also more fine-grained distinction. Some agents support multiple new agent events: neurite branching, neurite bifurcation, side neurite extension, etc. For each event we can specify if the behavior should be copied to the new, or removed from the existing agent.