Skip to main content
Log in

An Introduction to Dynamo: Diagrams for Evolutionary Game Dynamics

  • Thematic Issue Article: Strategic Interaction
  • Published:
Biological Theory Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Notes

  1. See Helbing (1992), Björnerstedt and Weibull (1996), Weibull (1995), Hofbauer (1995a), and Schlag (1998).

  2. For a list of articles containing Dynamo output, see http://www.ssc.wisc.edu/~whs/dynamo/papers.html.

  3. For shorter and less technical introductions to evolutionary game theory, see Sandholm (2009, 2012).

  4. 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.

  5. 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.

  6. The full location is Choice of game Specification of payoff parameters Specification of normal form game .

  7. This example is due to Arneodo et al. (1980), who introduce it in the context of the Lotka–Volterra equations; also see Skyrms (1992). The attractor here is known as a Shilnikov attractor; see Hirsch et al. (2004, Chap. 16).

  8. 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.

  9. Its location is Specification of graphical output Specifications for phase diagramSolution trajectories.

  10. The pdcontourplot option is located in Specification of graphical output Specifications for phase diagram .

  11. 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.

  12. 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.

  13. The options that control these diagrams are located in Specification of graphical output Specifications for other diagrams .

  14. 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).

  15. This transformation is useful for studying the replicator dynamic in potential games, since under this transformation, the replicator dynamic is the gradient system defined by the game’s potential function. See Akin (1979) and Sandholm et al. (2008).

  16. 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 .

  17. 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.

  18. The relevant parameters can be found in Specification of graphical output Specifications for phase diagram Face shading and viewpoint .

  19. These parameters are located in Specification of graphical output Specifications for phase diagram Drawing dots at rest points and Nash equilibria .

  20. 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 .

  21. This option is found in Specification of graphical output Specifications for phase diagram .

  22. See Sandholm (2010c, Fig. 5.7).

  23. 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.

  24. See, for example, Press et al. (2007).

  25. See reference.wolfram.com/mathematica/tutorial/NDSolveOverview.html .

  26. See the Dynamo notebooks for documentation. Dynamo takes advantage of this property when finding solutions to the projection dynamic (Nagurney and Zhang 1996; Lahkar and Sandholm 2008), which seems to proceed most smoothly using the Runge–Kutta–Fehlberg method of orders 5 and 4.

  27. See Sandholm (2010c, Chaps. 4–6).

  28. 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.

  29. For more on linearization of game dynamics, see Sandholm (2010c, Sects. 8.5, 8.6, and 8.C).

  30. For more on local stability of ESSs, see Hofbauer and Sigmund (1988), Cressman (1997), Sandholm (2010a, c, Sects. 8.3 and 8.4).

  31. 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

    Book  Google Scholar 

  • Arneodo A, Coullet P, Tresser C (1980) Occurrence of strange attractors in three-dimensional Volterra equations. Phys Lett 79A:259–263

    Article  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Google Scholar 

  • 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

    Google Scholar 

  • Cressman R (1997) Local stability of smooth selection dynamics for normal form games. Math Soc Sci 34:1–19

    Article  Google Scholar 

  • Fudenberg D, Levine DK (1998) The theory of learning in games. MIT Press, Cambridge

    Google Scholar 

  • Gilboa I, Matsui A (1991) Social stability and equilibrium. Econometrica 59:859–867

    Article  Google Scholar 

  • 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

    Chapter  Google Scholar 

  • Hirsch MW, Smale S, Devaney RL (2004) Differential equations, dynamical systems, and an introduction to chaos. Elsevier, Amsterdam

    Google Scholar 

  • Hofbauer J (1995a) Imitation dynamics for games, unpublished manuscript. University of Vienna, Vienna

    Google Scholar 

  • Hofbauer J (1995b) Stability for the best response dynamics, unpublished manuscript. University of Vienna, Vienna

    Google Scholar 

  • Hofbauer J (2000) From Nash and Brown to Maynard Smith: equilibria, dynamics, and ESS. Selection 1:81–88

    Article  Google Scholar 

  • Hofbauer J, Sandholm WH (2002) On the global convergence of stochastic fictitious play. Econometrica 70:2265–2294

    Article  Google Scholar 

  • Hofbauer J, Sigmund K (1988) Theory of evolution and dynamical systems. Cambridge University Press, Cambridge

    Google Scholar 

  • Hofbauer J, Weibull JW (1996) Evolutionary selection against dominated strategies. J Econ Theory 71:558–573

    Article  Google Scholar 

  • Jordan JS (1993) Three problems in learning mixed-strategy Nash equilibria. Games Econ Behav 5:368–386

    Article  Google Scholar 

  • Lahkar R, Sandholm WH (2008) The projection dynamic and the geometry of population games. Games Econ Behav 64:565–590

    Article  Google Scholar 

  • Matsui A (1992) Best response dynamics and socially stable strategies. J Econ Theory 57:343–362

    Article  Google Scholar 

  • Maynard Smith J (1982) Evolution and the theory of games. Cambridge University Press, Cambridge

    Book  Google Scholar 

  • Maynard Smith J, Price GR (1973) The logic of animal conflict. Nature 246:15–18

    Article  Google Scholar 

  • Nagurney A, Zhang D (1996) Projected dynamical systems and variational inequalities with applications. Kluwer, Dordrecht

    Book  Google Scholar 

  • 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

    Google Scholar 

  • Robinson J (1951) An iterative method of solving a game. Ann Math 54:296–301

    Article  Google Scholar 

  • Sandholm WH (2001) Potential games with continuous player sets. J Econ Theory 97:81–108

    Article  Google Scholar 

  • Sandholm WH (2002) Evolutionary implementation and congestion pricing. Rev Econ Stud 69:667–689

    Article  Google Scholar 

  • Sandholm WH (2005) Negative externalities and evolutionary implementation. Rev Econ Stud 72:885–915

    Article  Google Scholar 

  • Sandholm WH (2009) Evolutionary game theory. In: Meyers RA (ed) Encyclopedia of complexity and systems science. Springer, Heidelberg, pp 3176–3205

    Chapter  Google Scholar 

  • Sandholm WH (2010a) Local stability under evolutionary game dynamics. Theor Econ 5:27–50

    Article  Google Scholar 

  • Sandholm WH (2010b) Pairwise comparison dynamics and evolutionary foundations for Nash equilibrium. Games 1:3–17

    Article  Google Scholar 

  • Sandholm WH (2010c) Population games and evolutionary dynamics. MIT Press, Cambridge

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • Skyrms B (1990) The dynamics of rational deliberation. Harvard University Press, Cambridge

    Google Scholar 

  • Skyrms B (1992) Chaos in game dynamics. J Logic Lang Inf 1:111–130

    Article  Google Scholar 

  • Smith MJ (1984) The stability of a dynamic model of traffic assignment—an application of a method of Lyapunov. Transp Sci 18:245–252

    Article  Google Scholar 

  • Swinkels JM (1993) Adjustment dynamics and rational play in games. Games Econ Behav 5:455–484

    Article  Google Scholar 

  • Taylor PD, Jonker L (1978) Evolutionarily stable strategies and game dynamics. Math Biosci 40:145–156

    Article  Google Scholar 

  • Viossat Y (2011) Monotonic dynamics and dominated strategies, unpublished manuscript. Université Paris-Dauphine

  • Weibull JW (1995) Evolutionary game theory. MIT Press, Cambridge

    Google Scholar 

  • 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

    Google Scholar 

  • 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

Download references

Acknowledgments

Financial support from NSF Grant SES-1155135 is gratefully acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to William H. Sandholm.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13752-013-0109-z

Keywords

Navigation