Symbiosis

Symbiosis means "living together". In biology, a symbiotic relationship is a long-term interaction between two species. Here are some examples of symbiotic interactions:

Selfishness or parasitic: one species benefits, the other is harmed. Predator-prey interactions fall into this category.

Mutualism or cooperative: both species benefit. For example, some birds clean the teeth of crocodiles.

Altruism: The reverse of selfishness. The initiator is harmed, the other organism benefits. This is the mother-child relationship.

Spitefulness: both species are harmed. Hunting for sport might be an example of this.

The symbiosis lab customizes the BAM2 framework.

Each turtle has a strategy attribute:

turtles-own [energy vision mobility strategy]

The strategies are: "greedy", "cooperative", "altruistic", and "spiteful".

When the active turtle interacts with a candidate, then one point is added or deducted from the energy of each depending on the strategy used by the active turtle.

Here's a screen shot:

Note that the initial number of turtles with the given stratgies can be set by the user.

Here's the code for updating the plotter:

to update-plots
  set-current-plot "demographics"
  set-current-plot-pen "altruistic"
  plot mean [energy] of turtles with [strategy = "altruistic"]
  set-current-plot-pen "greedy"
  plot mean [energy] of turtles with [strategy = "greedy"]
  set-current-plot-pen "cooperative"
  plot mean [energy] of turtles with [strategy = "cooperative"]
  set-current-plot-pen "spiteful"
  plot mean [energy] of turtles with [strategy = "spiteful"]
end