egttools.plotting.simplified.plot_pairwise_comparison_rule_dynamics_in_simplex_without_roots

plot_pairwise_comparison_rule_dynamics_in_simplex_without_roots(population_size, beta, payoff_matrix=None, game=None, group_size=2, figsize=(10, 8), ax=None)[source]

Helper function to simplify the plotting of the moran dynamics in a 2 Simplex.

Parameters
  • population_size (int) – Size of the finite population.

  • beta (float) – Intensity of selection.

  • payoff_matrix (Optional[ndarray]) – The square payoff matrix.

  • game (Optional[AbstractGame]) – Game that should contain a set of payoff matrices

  • group_size (Optional[int]) – Size of the group. By default, we assume that interactions are pairwise (the group size is 2).

  • figsize (Optional[Tuple[int, int]]) – Size of the figure. This parameter is only used if the ax parameter is not defined.

  • ax (Optional[axis]) – A matplotlib figure axis.

Return type

Tuple[Simplex2D, Callable[[ndarray, int], ndarray], AbstractGame, PairwiseComparison]

Returns

  • A tuple with the simplex object which can be used to add more features to the plot, the function that

  • can be used to calculate gradients and should be passed to Simplex2D.draw_trajectory_from_roots and

  • Simplex2D.draw_scatter_shadow, a list of the roots in barycentric coordinates, a list of the roots in

  • cartesian coordinates and a list of booleans indicating whether the roots are stable. It also returns the

  • game class (this is important, since a new game is created when passing a payoff matrix, and if not returned,

  • a reference to the game instance will disappear, and it will produce a segmentation fault). Finally, it also returns

  • a reference to the evolver object.