Class CLabour

All Implemented Interfaces:
Runnable, IBS.HasIBS, IBS.HasIBS.MCPairs, MilestoneListener, Features, Features.Pairs, HasDistribution, HasDistribution.Strategy, HasHistogram, HasHistogram.Degree, HasHistogram.Fitness, HasHistogram.Strategy, HasMean, HasMean.Fitness, HasMean.Strategy, HasPop2D, HasPop2D.Fitness, HasPop2D.Strategy, HasPop3D, HasPop3D.Fitness, HasPop3D.Strategy, CLOProvider

The module for the evolution of two behavioural traits. This module is designed for the study of specialization and division of labour.
Author:
Christoph Hauert
See Also:
  • "Henriques G. J. B., Ito K., Hauert C., Doebeli M. (2021) <em>On the importance of evolving phenotype distributions on evolutionary diversification.</em> PLoS Comput. Biol. 17(2): e1008733. <a href='https://doi.org/10.1371/journal.pcbi.1008733'>doi: 10.1371/journal.pcbi.1008733</a>"
  • Field Details

    • you

      protected double[] you
      Temporary storage for the traits of the opponent.
  • Constructor Details

    • CLabour

      public CLabour(EvoLudo engine)
      Constructs a new EvoLudo module for the evolution of two behavioural traits.
      Parameters:
      engine - the manager of modules and pacemaker for running the model
  • Method Details

    • load

      public void load()
      Description copied from class: Module
      Load new module and perform basic initializations.
      Overrides:
      load in class Continuous
      See Also:
    • unload

      public void unload()
      Description copied from class: Module
      Unload module and free all resources.
      Overrides:
      unload in class Continuous
      See Also:
    • getKey

      public String getKey()
      Description copied from class: Module
      Returns identifier of the active module. For example, 2x2 games in TBT return "2x2". This corresponds to the argument for the --module option to load a particular module. The default is to use the class name.
      Overrides:
      getKey in class Module
      Returns:
      the identifying key of this module
    • getAuthors

      public String getAuthors()
      Description copied from class: Module
      Returns a string with information about the authors of the module.
      Overrides:
      getAuthors in class Module
      Returns:
      the names of the authors
    • getTitle

      public String getTitle()
      Description copied from class: Module
      Returns title of active module, e.g. 2x2 games in TBT returns "2x2 Games".
      Specified by:
      getTitle in class Module
      Returns:
      the title of active module
    • pairScores

      public double pairScores(double[] me, double[] groupTraits, int len, double[] groupPayoffs)
      Description copied from interface: IBS.HasIBS.MCPairs
      Calculate the payoff/score for modules with interactions in pairs and multiple continuous traits. The focal individual has traits me and the traits of its len interaction partners are given in group. The traits they are arranged in the usual manner, i.e. first all traits of the first group member then all traits by the second group member etc. for a total of len*nTraits entries. The payoffs/scores for each of the len opponent traits/strategies must be stored and returned in the array payoffs.

      Note:

      Only the first len entries in group are guaranteed to exist and have meaningful values. The population structure may restrict the size of the interaction group. len&le;nGroup always holds.

      Important:

      must be overridden and implemented in subclasses that define game interactions between pairs of individuals (nGroup=2, pairwise=true), otherwise see IBS.HasIBS.CGroups.groupScores(double, double[], int, double[]).
      Specified by:
      pairScores in interface IBS.HasIBS.MCPairs
      Parameters:
      me - the trait of the focal individual
      groupTraits - the traits of the group members
      len - the number of memebrs in the group
      groupPayoffs - the array for returning the payoffs/scores for each group member
      Returns:
      the total (accumulated) payoff/score for the focal individual