how to plot the phase portraits of a onlinear dynamics of rock-paper-scissors game model

조회 수: 13 (최근 30일)
Let x,y, and z denote the relative frequencies of individuals playing rock, paper, and scissors, respectively. Then x + y + z = 1 or z = 1 − x − y. By eliminating z in this fashion, one can capture the dynamics of the three strategies by studying x and y alone: x'=x*(f_x-p)+u*(-2*x+y+z), y'=y*(f_y-p)+u*(-2*y+x+z), f_x and f_y denote the expected fitness of individuals playing rock and paper, respectively, and p = x*f_x + y*f_y + z*f_z is the average fitness in the whole population.
Then the question is how can I plot the phase diagram like this:
I'm sorry for missing some key informations: the payoffs of the three strategies are:
f_z=-(1.0+e)*x+y
f_x=1-x-(e+2)*y,
f_y=(e+2)*x+(e+1)*(y-1).
p = x*f_x + y*f_y + z*f_z
is the average fitness in the whole population.
According to the restriction: x+y+z=1.0, the ODEs of the system could be simplified as:
x'=x*(f_x-p)+u*(-3*x+1.0)
y'=y*(f_y-p)+u*(-3*y+1.0)
And the initial conditions are
x_0=1/3. y_0=1/3, z_0=1/3.
The values of the parameters are:
(1u=0.4 and e=2,
(2) u=0.05 and e=5
respectively.

채택된 답변

Mischa Kim
Mischa Kim 2018년 8월 21일
Hi Cui, there are two steps you need to take to get to your desired result:
  1. Solve the differential equations (DE): Essentially you have a system of two coupled DE in x and y. See this answer to get started.
  2. Plot the solution of the differential equation in a triangular plot: There are a couple of examples of triangular shaped plots on our File Exchange. Search for ternary and entropy plot. Hope this helps.
  댓글 수: 1
Cui Pengbi
Cui Pengbi 2018년 8월 21일
Thanks! It indeed works. And now the next problem is how to extend this to the case of simplex 4 when there are four variables to be considered:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Just for fun에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by