Abstract
Dynamo: Diagrams for Evolutionary Game Dynamics is free, open-source software used to create phase diagrams and other images related to dynamical systems from evolutionary game theory. We describe how to use the software’s default settings to generate phase diagrams quickly and easily. We then explain how to take advantage of the software’s intermediate and advanced features to create diagrams that highlight the key properties of the dynamical system under study. Sample code and output are provided to help demonstrate the software’s capabilities.
Similar content being viewed by others
Notes
For a list of articles containing Dynamo output, see http://www.ssc.wisc.edu/~whs/dynamo/papers.html.
In principle, we could create a fifth notebook for two-population games with three strategies for one population and two for the other, for which the state space is a triangular prism.
Many commands from Mathematica version 5 were eliminated entirely from version 6, so notebooks written on either side of this divide are typically incompatible with the application on the other side.
The full location is Choice of game → Specification of payoff parameters → Specification of normal form game .
See http://www.ssc.wisc.edu/~whs/dynamo/3D.html. These notebooks can be opened in Mathematica 6–8, or using Wolfram’s free CDF Player; see http://www.wolfram.com/products/player.
Its location is Specification of graphical output → Specifications for phase diagram → Solution trajectories.
The pdcontourplot option is located in Specification of graphical output → Specifications for phase diagram .
Reversing the order of these times causes Dynamo to interpret {.4, .3, .3} as the terminal condition at time 30, and to compute the solution backward until time 0. Working from the terminal condition is useful when trying to locate unstable cycles, or to find or trajectories that approach unstable rest points along their stable manifolds.
Here is a detailed explanation of what this line of code does. Dynamo’s DEsol calls upon Mathematica’s NDSolve to a the numerical solution to the differential equation. The output of NDSolve is presented as a list of so-called transformation rules. In the present case, the list contains a single transformation rule, corresponding to the lone solution of the differential equation from the initial condition provided. The transformation rule refers to the first two components of the solution using the functions {Xt1, Xt2} , with the third component of the solution being defined implicitly by the fact that solutions live on the simplex.
The code /., which is the short form of Mathematica’s ReplaceAll command, has Mathematica specify the values of the expression that precedes it by applying the transformation rule that follows it. Here {Xt1[30], Xt2[30], 1-Xt1[30]-Xt2[30]}/.DEsol[{.4, .3, .3}, 0, 30] uses /. to obtain for the time 30 position of the each solution found by DEsol . The result is a list containing a single position vector; the final [[1]] extracts the lone element from this list. It is worth noting that if this code is run in a separate cell after initial run of Dynamo (but without the final ; that suppresses the output), Mathematica immediately reports the point that lies very close to the closed orbit.
The options that control these diagrams are located in Specification of graphical output → Specifications for other diagrams .
By projected payoff, we mean the orthogonal projection of the payoff vector onto the tangent space of the simplex. It is obtained by subtracting the unweighted average of all strategies’ payoffs from each strategy’s payoff—see Sandholm (2010c, Sect. 2.3).
See Hofbauer and Weibull (1996), as well as Viossat (2011), from which this example is taken. It follows that one could have obtained the same differential equation by defining the appropriate payoff functional imitative dynamic in Dynamo, and then applying it to F(x) = Ax. Defining new dynamics is not difficult, but takes a few steps to accomplish. The definitions of the built-in dynamics are presented in Choice of dynamic → Definitions of dynamics ; these can be used as a template for defining a new dynamic under the heading Other .
This definition works because of a quirk in Mathematica’s syntax: when a bulit-in function that takes a scalar argument is applied to a vector, the function is evaluated separately on each component of the vector.
The relevant parameters can be found in Specification of graphical output → Specifications for phase diagram → Face shading and viewpoint .
These parameters are located in Specification of graphical output → Specifications for phase diagram → Drawing dots at rest points and Nash equilibria .
An excellent source of information on working with Mathematica graphics, including the creation of files for publication, is a website maintained by Jens Nöckel: see pages.uoregon.edu/noeckel/MathematicaGraphics.html .
This option is found in Specification of graphical output → Specifications for phase diagram .
See Sandholm (2010c, Fig. 5.7).
Mac users who work in TeXShop will find that bitmap figures appearing in pdfs look ugly in TeXShop’s pdf viewer. Fortunately, the figures will look just fine when the pdf is opened in any standard viewer.
See, for example, Press et al. (2007).
See reference.wolfram.com/mathematica/tutorial/NDSolveOverview.html .
See Sandholm (2010c, Chaps. 4–6).
By default, FindRoot employs Newton’s method, but other methods are available and can be selected manually. See reference.wolfram.com/mathematica/ref/FindRoot.html.
For more on linearization of game dynamics, see Sandholm (2010c, Sects. 8.5, 8.6, and 8.C).
If a certain class of examples systematically causes problems, one can tune the parameters of the test to obtain better performance. The relevant parameters are located in Specification of graphical output → Specifications for phase diagram → Tuning stability tests .
References
Akin E (1979) The geometry of population genetics. Springer, Berlin
Arneodo A, Coullet P, Tresser C (1980) Occurrence of strange attractors in three-dimensional Volterra equations. Phys Lett 79A:259–263
Björnerstedt J, Weibull JW (1996) Nash equilibrium and evolution by imitation. In: Arrow KJ, et al. (eds) The rational foundations of economic behavior. St. Martin’s Press, New York, pp 155–181
Brown GW (1949) Some notes on computation of games solutions. Report P-78, The Rand Corporation
Brown GW (1951) Iterative solutions of games by fictitious play. In: Koopmans TC, et al (eds) Activity analysis of production and allocation. Wiley, New York, pp 374–376
Brown GW, von Neumann J (1950) Solutions of games by differential equations. In: Kuhn HW, Tucker AW (eds) Contributions to the theory of games I, Annals of Mathematics Studies, vol 24. Princeton University Press, Princeton, pp 73–79
Cressman R (1997) Local stability of smooth selection dynamics for normal form games. Math Soc Sci 34:1–19
Fudenberg D, Levine DK (1998) The theory of learning in games. MIT Press, Cambridge
Gilboa I, Matsui A (1991) Social stability and equilibrium. Econometrica 59:859–867
Helbing D (1992) A mathematical model for behavioral changes by pair interactions. In: Haag G, Mueller U, Troitzsch KG (eds) Economic evolution and demographic change: formal models in social sciences. Springer, Berlin, pp 330–348
Hirsch MW, Smale S, Devaney RL (2004) Differential equations, dynamical systems, and an introduction to chaos. Elsevier, Amsterdam
Hofbauer J (1995a) Imitation dynamics for games, unpublished manuscript. University of Vienna, Vienna
Hofbauer J (1995b) Stability for the best response dynamics, unpublished manuscript. University of Vienna, Vienna
Hofbauer J (2000) From Nash and Brown to Maynard Smith: equilibria, dynamics, and ESS. Selection 1:81–88
Hofbauer J, Sandholm WH (2002) On the global convergence of stochastic fictitious play. Econometrica 70:2265–2294
Hofbauer J, Sigmund K (1988) Theory of evolution and dynamical systems. Cambridge University Press, Cambridge
Hofbauer J, Weibull JW (1996) Evolutionary selection against dominated strategies. J Econ Theory 71:558–573
Jordan JS (1993) Three problems in learning mixed-strategy Nash equilibria. Games Econ Behav 5:368–386
Lahkar R, Sandholm WH (2008) The projection dynamic and the geometry of population games. Games Econ Behav 64:565–590
Matsui A (1992) Best response dynamics and socially stable strategies. J Econ Theory 57:343–362
Maynard Smith J (1982) Evolution and the theory of games. Cambridge University Press, Cambridge
Maynard Smith J, Price GR (1973) The logic of animal conflict. Nature 246:15–18
Nagurney A, Zhang D (1996) Projected dynamical systems and variational inequalities with applications. Kluwer, Dordrecht
Oyama D, Sandholm WH, Tercieux O (2012) Sampling best response dynamics and deterministic equilibrium selection, unpublished manuscript. University of Tokyo, University of Wisconsin, and Paris School of Economics
Press WH, Teukolsky SA, Vetterling WT, Flannery BP (2007) Numerical recipes: the art of scientific computing, 3rd edn. Cambridge University Press, Cambridge
Robinson J (1951) An iterative method of solving a game. Ann Math 54:296–301
Sandholm WH (2001) Potential games with continuous player sets. J Econ Theory 97:81–108
Sandholm WH (2002) Evolutionary implementation and congestion pricing. Rev Econ Stud 69:667–689
Sandholm WH (2005) Negative externalities and evolutionary implementation. Rev Econ Stud 72:885–915
Sandholm WH (2009) Evolutionary game theory. In: Meyers RA (ed) Encyclopedia of complexity and systems science. Springer, Heidelberg, pp 3176–3205
Sandholm WH (2010a) Local stability under evolutionary game dynamics. Theor Econ 5:27–50
Sandholm WH (2010b) Pairwise comparison dynamics and evolutionary foundations for Nash equilibrium. Games 1:3–17
Sandholm WH (2010c) Population games and evolutionary dynamics. MIT Press, Cambridge
Sandholm WH (2012). Population games and deterministic evolutionary dynamics. To appear in the Handbook of game theory.
Sandholm WH, Dokumacı E, Lahkar R (2008) The projection dynamic and the replicator dynamic. Games Econ Behav 64:666–683
Sandholm WH, Dokumacı E, Franchetti F (2012) Dynamo: diagrams for evolutionary game dynamics. Software. http://www.ssc.wisc.edu/~whs/dynamo. Accessed 31 December 2012
Schlag KH (1998) Why imitate, and if so, how? A boundedly rational approach to multi-armed bandits. J Econ Theory 78:130–156
Skyrms B (1990) The dynamics of rational deliberation. Harvard University Press, Cambridge
Skyrms B (1992) Chaos in game dynamics. J Logic Lang Inf 1:111–130
Smith MJ (1984) The stability of a dynamic model of traffic assignment—an application of a method of Lyapunov. Transp Sci 18:245–252
Swinkels JM (1993) Adjustment dynamics and rational play in games. Games Econ Behav 5:455–484
Taylor PD, Jonker L (1978) Evolutionarily stable strategies and game dynamics. Math Biosci 40:145–156
Viossat Y (2011) Monotonic dynamics and dominated strategies, unpublished manuscript. Université Paris-Dauphine
Weibull JW (1995) Evolutionary game theory. MIT Press, Cambridge
Weibull JW (1996) The mass action interpretation. Excerpt from ‘The work of John Nash in game theory: Nobel Seminar, December 8, 1994.’ J Econ Theory 69:165–171
Zeeman EC (1980) Population dynamics from game theory. In: Nitecki Z, Robinson C (eds) Global theory of dynamical systems (Evanston, 1979), Springer, Berlin, no. 819 in Lecture Notes in Mathematics, pp 472–497
Zusai D (2011) The tempered best response dynamic, unpublished manuscript. University of Wisconsin
Acknowledgments
Financial support from NSF Grant SES-1155135 is gratefully acknowledged.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Franchetti, F., Sandholm, W.H. An Introduction to Dynamo: Diagrams for Evolutionary Game Dynamics . Biol Theory 8, 167–178 (2013). https://doi.org/10.1007/s13752-013-0109-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13752-013-0109-z