Selection Gradients/MacLev

From Worden
Jump to: navigation, search

On these pages I am investigating the evolution of interactions in the MacArthur/Levins resource competition model.

This page explains the adaptive dynamics concepts and questions I'm using, and includes Sage source code for the models.

Child pages use this theory and code to investigate specific cases of the models:

MacArthur-Levins population dynamics

We start with a population-resource model:


where Xi is the density of population i, R is the abundance of resource and the parameters are bi, an intrinsic population growth rate, mi, mortality rate, ci, the rate at which population i captures resource , w, the amount a unit of resource contributes to population growth, r, the resupply rate of resource , and K its maximum possible abundance.

This is a fine model on its own, but I am interested in Lotka-Volterra models, which are models in which there is a simple number aij describing how populations i and j interact with each other. Using a Lotka-Volterra model will let us look at how these interaction terms aij change, telling us how evolution drives these populations to become more competitive, antagonistic, or mutualistic.

In the above model the populations i interact indirectly by taking resources from each other, but we can make the interactions direct by making simplifying assumptions, and this is what MacArthur and Levins did.

We do this by assuming that the resources come to equilibrium very quickly compared to the populations. Under this assumptions, we can hold the population sizes Xi fixed and solve the second equation above for R when dRdt=0:


Then we simply use that value of R in the first equation, and we have a system of population sizes only:


We can rearrange the terms of this to have the standard Lotka-Volterra form:



ki=bi(ciwK-m1) (ordinarily I'd call this ri, but the name is already in use),

I'll be interested in how the interaction terms aij change as the populations coevolve, because this expresses whether competition becomes stronger or weaker. When two coevolving populations compete for resources, we expect them to differentiate from each other and lessen the competition, but I'd like to look at both that and other cases, and do some detailed analysis about when it lessens and when it greatens.

Adaptive dynamics in the Macarthur-Levins model

And now here's where we look at how that single population evolves in the Mac-Lev model. I won't review the details of how adaptive dynamics is done, but in summary: suppose that certain aspects of the population dynamics depend on the characteristics of the population, and those characteristics are able to mutate. Then over time, mutants will arise, and if they are better able to thrive in the environment they encounter than their forefathers, they will gradually replace them, and the characteristics of the population will slowly change.

In this model, it's bi, ci, and mi that have to do with the populations, so we introduce a phenotype variable ui representing the characteristics of the population and suppose that bi, ci and mi are determined by the value of u. Then we can find out how u changes in time in response to the conditions created by the population dynamics, and also how the other values such as Xi, R, aij, ki, change as u evolves.

The change in u, to make a long story short, is driven by how the population growth rate of a rare mutant varies with the mutant's phenotype u. That is, there's an "invasion speed" that is closely related to the population growth rate dXidt, and the change in u (that is, dudt) is in proportion to u.

To be precise:


defines the invasion speed (where E is the environment that an individual population i experiences, including the rest of population i and all other populations), and then


where γ is a coefficient accounting for the frequency and size of available mutations. In simple cases, it's a constant, while when available mutations are not quite so simple and uniform, it may not be (as we will see).

Adaptive geometry of ecological parameters

Now let's go deeper into what happens in that evolutionary change. We're considering several different ways to describe the evolving population, and now I want to give them clearer notation:

These are vectors that are functions of one another. Using a suitable vector notation in our calculus, we can write the adaptive dynamics of 𝐮 directly, ignoring the intermediate variables 𝐩 and 𝐀 for the moment:


The T sign is for vector or matrix transposition: with the notation I'm using, 𝐮i is a column vector - a point in a vector space of values - and 𝐮i is a row vector - a thing that operates on points. Since d𝐮idt is a column, we need to transpose the derivative of to make it match. The 1 sign is for the partial derivative with respect to the first argument.

Now we can use the chain rule to see how 𝐩 changes:


Here we see the usefulness of this row-and-column-vector notation, because it lets us use the chain rule in a natural way: when we write d𝐩(𝐮i)dt=𝐩𝐮id𝐮idt, we're multiplying a matrix by a column vector to get another column vector, in just the way we want.

I like to write S(𝐮)=1(𝐮)T for the "selection gradient" of 𝐮 -- the direction of increasing fitness in the space of possible 𝐮 values. I'm very interested in the role of this selection gradient in various spaces, as we'll see. Notice that in the derivation above I switched from S(𝐮i)=((𝐯|𝐮1,,𝐮n)𝐯)𝐯=𝐮i to


These different selection gradients are very different objects: they're vectors expressing the direction of selection in different spaces -- here, the space of 𝐮 values vs. the space of 𝐩 values. Soon enough we'll also be looking at the selection gradient in 𝐀 space.

Using the above chain rule manipulations, we can write


Like 𝐮 or whatever other vector, 𝐩 would evolve in the direction of S(𝐩) if it were to mutate in all directions equally. However, it doesn't do that: since 𝐩 is a function of 𝐮, it only mutates in directions given by mutations in 𝐮. The matrix multiplying S(𝐩) in the dynamics of 𝐩 is a projection matrix, restricting the motion of 𝐩 to directions allowed by the mapping between 𝐮 and 𝐩. (To be precise, 𝐩𝐮𝐩𝐮TS(𝐩) is not precisely the projection of S(𝐩) onto the subspace parametrized by 𝐮 unless the columns of 𝐩𝐮 are unit-length; otherwise there's some scaling by positive numbers involved. But it definitely transforms the vector into a direction allowed by the restriction to points parametrized by 𝐮.)

The motion of 𝐀 is the same way, except that it is influenced by all the populations in the system, not just one, because two phenotypes are involved in each aij value. For that reason, the dynamics of 𝐀 has some extra terms...

But before we go into that, let's look at the selection gradient and the dynamics of 𝐩(𝐮).

Adaptive geometry of interaction terms

Now, let's get to how aij and ki "would like to evolve" and why they move in the directions they do.

Expanding out the dynamics of the 𝐀 vector has more involved than doing it for the 𝐩 vector, because 𝐀 depends on all the different phenotypes 𝐮j, not just one we're concerned with. Also, we have to keep careful track of 𝐮i, because it appears in 𝐀 in two different ways: on the left-hand side of each 𝐚ij=a(𝐮i,𝐮j) term, which describes how population i (the "patient") is affected by an encounter with population j (the "agent"); and also on the right-hand side of the aii=a(𝐮i,𝐮i) term, as the "agent" in an encounter between i and i. This distinction is important because every encounter has two effects, the effect on oneself and the effect on the other, and we'll see that selection treats these two effects very differently.

So to be clear, we'll work with the notation

𝐀i=𝐀(𝐯,𝐮1,,𝐮n)|𝐯=𝐮i =(𝐚(𝐯,𝐮1)𝐚(𝐯,𝐮n)k(𝐯))𝐯=𝐮i,

to distinguish the two different roles of 𝐮i (suppressing the intermediate variable 𝐩), and we'll refer to the two different partial derivatives that relate to 𝐮i as 1𝐀i(𝐮i)=𝐀i𝐯|𝐯=𝐮i and 2𝐀i(𝐮i)=𝐀i𝐮i|𝐯=𝐮i.

So first of all, if we use 𝐀i as an intermediate variable, the dynamics of 𝐮i is




This expression is made up of two somewhat complex terms. The first term, the S(𝐀i) term, expresses the change in the interactions experienced by population i due to change in population i in its patient role. I refer to this as the direct effect of selection on population i. The second term, the sum of S(𝐀j) vectors, expresses the change in population i's interactions due to change in all the different agents it encounters, including population i itself in its agent role. I refer to this as an indirect effect of selection on the various populations.

What would happen if there were no constraints on 𝐀i? That is, if all the terms just mutate independently without being constrained by dependence on 𝐮 variables. In this case, we would simply have


In the constrained case, as with 𝐩, the motion due to S(𝐀i) is modified by a transformation matrix. Here, though, there's also another term dealing with the effect of changing 𝐮 values as the second argument to a(𝐮i,𝐮j). Let's expand that out one step further:


Here I'm using colors to distinguish three different vector quantities, which I'll soon plot in the same colors:

Supplementary materials

Here are the Sage classes that do the work for the Mac-Lev models. above. They use generalized Sage machinery that's stored at SageDynamics.

Now here's the MacArthur-Levins resource competition model.

Loading WorkingWiki file "" dynamically. If it doesn't load, click to view the page statically.