I have a linear replicator equation and I want to simulate its dynamics to find the resting point and hopefully the Nash equilibrium.

I defined strategies' payoff as $ \vec f = C*\vec p+ \vec b$, where $C$ is a community matrix similar to the one in Lotka volterra models, $p$ is the vector of probabilities for each strategy and b is a vector of constants. From what I understand, this is very similar to the replicator dynamics for a linear model, except that I'm adding a constant.

However, when I iterate over $\vec p_{t+1} = \vec p_t+ \vec p_t (\vec f- \sum\vec f \vec p_t) $, $\vec p_{t+1}$ frequently gets values greater than one or smaller than zero, which from my understanding is not suppose to happen.

An example to show the issue:

$C = \begin{pmatrix} -1 && -1.1 && 0 \\ 1 && -1.0 && -1.1 \\ 0 && 1 && 0 \end{pmatrix}; \space \vec b= \begin{pmatrix} 0.7 \\ 0 \\ 0 \end{pmatrix}; \vec p_0 = \begin{pmatrix} 0.8 \\ 0.9 \\ 0.25 \end{pmatrix} $

In this situation, the second element of $\vec p_1 $ equals 1.448550!

What could be causing this error? Am I calculating the replicator dynamics wrong? Does adding a constant to fitness "breaks" the replicator dynamics? Is my understanding wrong and replicator dynamics can go above 1 or below 0?

  • $\begingroup$ Can you please describe the meaning behind your equation because it does not really look like Lotka-Volterra equations? Lotka-Volterra equations are explained in this post. $\endgroup$
    – Remi.b
    Aug 23, 2017 at 14:27
  • $\begingroup$ Sorry, I mean that payoff of a strategy depends on the frequency of use of these strategies. This is represented by the matrix C. In the example, the -1 on the top left indicates that the more strategy 1 is used, the smaller is it's payoff. Likewise the more strategy 2 is used the smaller is the payoff of strategy 1 by a factor of -1.1. however irrespective of strategies distribution in the population there is a baseline payoff b for every strategy. $\endgroup$
    – JMenezes
    Aug 23, 2017 at 14:39
  • $\begingroup$ It is hard to tell what you are trying to compute. It is not obvious to me looking at the equation that $\arrow p$ must contain probabilities. Also, it is a bit weird that you are adding a baseline at every generation. Of course, the baseline fitness / probability (or whatever is represented of $\arrow p$) will very quickly become greater than 1. $\endgroup$
    – Remi.b
    Aug 23, 2017 at 14:46
  • $\begingroup$ $ \vec p$ is supposed to represent the proportion of time exercising a behavior (eg feeding). Every individual, ie every row of C and every element of in p, is supposed to have a value going from 0 to 1, representing how much of the time it spends doing said behavior. but the benefit of foraging more or less depends on how much other individuals are doing. Thus I want to know if there is any equilibrium point where all individuals stick with a certain proportion of time feeding. Hope it helps, and thanks for the time invested $\endgroup$
    – JMenezes
    Aug 23, 2017 at 15:02
  • 1
    $\begingroup$ If I'm to provide an answer to this, I first need to know: How did you obtain the values for the $C$ matrix? How did you come up with the definition of $f$? What purpose does the $b$ vector serve? And lastly, in your recurrence relation (definition of $p_{t+1}$), regarding the summand expression, are you multiplying the $f$ vector with the $p$ vector? I tried looking at your mathjax but it still wasn't clear from where you didn't bracket anything. Also, at first glance, shouldn't it be $p_{t+1} = p_{t} * p_{t}(...)$? i.e., multiplication between the two terms, and not addition? $\endgroup$
    – user22020
    Aug 23, 2017 at 16:38

1 Answer 1


This is happening because the fitness for your first strategy can be negative. In the case of the discrete replicator dynamics, the fitness cannot be negative. Otherwise, you can leave the simplex. Note that the continuous replicator dynamics doesn't have this restriction (the fitness can be negative).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .