Package EvolutionaryGames

Similar documents
Package SEMrushR. November 3, 2018

Package ECctmc. May 1, 2018

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package fastdummies. January 8, 2018

Package bisect. April 16, 2018

Package canvasxpress

Package climber. R topics documented:

Package validara. October 19, 2017

Package datasets.load

Package gtrendsr. August 4, 2018

Package gtrendsr. October 19, 2017

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package gifti. February 1, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package effectr. January 17, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package calpassapi. August 25, 2018

Package readobj. November 2, 2017

Package WordR. September 7, 2017

Package balance. October 12, 2018

Package knitrprogressbar

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package sigqc. June 13, 2018

Package docxtools. July 6, 2018

Package fitbitscraper

Package meme. November 2, 2017

Package weco. May 4, 2018

Package TrafficBDE. March 1, 2018

Package widyr. August 14, 2017

Package barcoder. October 26, 2018

Package mmpa. March 22, 2017

Package spark. July 21, 2017

Package nngeo. September 29, 2018

Package crossrun. October 8, 2018

Package kdtools. April 26, 2018

Package RNAseqNet. May 16, 2017

Package meme. December 6, 2017

Package facerec. May 14, 2018

Package projector. February 27, 2018

Package eply. April 6, 2018

Package ASICS. January 23, 2018

Package splithalf. March 17, 2018

Package postgistools

Package robotstxt. November 12, 2017

Package opencage. January 16, 2018

Package farver. November 20, 2018

Package rsppfp. November 20, 2018

Package fusionclust. September 19, 2017

Package qualmap. R topics documented: September 12, Type Package

Package shinyfeedback

Package available. November 17, 2017

Package quadprogxt. February 4, 2018

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package essurvey. August 23, 2018

Package PDN. November 4, 2017

Package jpmesh. December 4, 2017

Package mixsqp. November 14, 2018

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package mgc. April 13, 2018

Package wrswor. R topics documented: February 2, Type Package

Package data.world. April 5, 2018

Package epitab. July 4, 2018

Package GFD. January 4, 2018

Package repec. August 31, 2018

Package wdman. January 23, 2017

Package condusco. November 8, 2017

Package nmslibr. April 14, 2018

Package rzeit2. January 7, 2019

Package MetaLonDA. R topics documented: January 22, Type Package

Package blocksdesign

Package catenary. May 4, 2018

Package messaging. May 27, 2018

Package BASiNET. October 2, 2018

Package sgmcmc. September 26, Type Package

Package fastrtext. December 10, 2017

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package knitrbootstrap

Package queuecomputer

Package linkspotter. July 22, Type Package

Package RODBCext. July 31, 2017

Package pdfsearch. July 10, 2018

Package statsdk. September 30, 2017

Package vinereg. August 10, 2018

Package raker. October 10, 2017

Package preprosim. July 26, 2016

Package edfreader. R topics documented: May 21, 2017

Package mapsapi. March 12, 2018

Package samplesizecmh

Package editdata. October 7, 2017

Package fitur. March 11, 2018

Package semver. January 6, 2017

Package crossword.r. January 19, 2018

Package geogrid. August 19, 2018

Package githubinstall

Package IATScore. January 10, 2018

Package patentsview. July 12, 2017

Package GetITRData. October 22, 2017

Package elmnnrcpp. July 21, 2018

Package colf. October 9, 2017

Package phonics. February 13, Type Package Title Phonetic Spelling Algorithms Version Date Encoding UTF-8

Transcription:

Type Package Package EvolutionaryGames November 27, 2017 Title Important Concepts of Evolutionary Game Theory Version 0.1.0 Maintainer Jochen Staudacher <jochen.staudacher@hs-kempten.de> A comprehensive set of tools to illustrate the core concepts of evolutionary game theory, such as evolutionary stability or various evolutionary dynamics, for teaching and academic research. License GPL-2 Encoding UTF-8 LazyData true Imports desolve (>= 1.14), geometry (>= 0.3-6), ggplot2 (>= 2.2.1), grdevices (>= 3.2.2), interp (>= 1.0-29), MASS (>= 7.3-43), reshape2 (>= 1.4.2), rgl (>= 0.95.1201) Suggests knitr, rmarkdown VignetteBuilder knitr NeedsCompilation no RoxygenNote 6.0.1 Author Daniel Gebele [aut, cph], Jochen Staudacher [aut, cre, cph] Repository CRAN Date/Publication 2017-11-27 12:36:41 UTC R topics documented: BNN............................................. 2 BR.............................................. 3 ESS............................................. 4 ESset............................................ 5 ILogit............................................ 6 Logit............................................. 7 1

2 BNN MSReplicator........................................ 8 phasediagram2s...................................... 9 phasediagram3s...................................... 10 phasediagram4s...................................... 11 Replicator.......................................... 12 Smith............................................ 13 triangle........................................... 14 Index 15 BNN Brown-von Neumann-Nash dynamic Brown-von Neumann-Nash replicator dynamic as a type of evolutionary dynamics. BNN(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Brown, G. W. and von Neumann, J. (1950) "Solutions of games by differential equations", In: Kuhn, Harold William and Tucker, Albert William (Eds.) "Contributions to the Theory of Games I", Princeton University Press, pp. 73 79. dynamic <- BNN state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) phasediagram3s(a, dynamic, NULL, state, FALSE, FALSE)

BR 3 BR BR dynamic Best response dynamic as a type of evolutionary dynamics. BR(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Gilboa, I. and Matsui, A. (1991) "Social Stability and Equilibrium", Econometrica 59, pp. 859 867. dynamic <- BR state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) phasediagram3s(a, dynamic, NULL, state, FALSE, FALSE)

4 ESS ESS ESS for two-player games with a maximum of three strategies Computes Evolutionary Stable Strategies of a game with two players and a maximum of three strategies. ESS(A, strategies = c(), floats = TRUE) A strategies floats Numeric matrix of size 2x2 or 3x3 representing the number of strategies of a symmetric matrix game. String vector of length n that names all strategies whereas n represents the number of strategies. Logical value that handles number representation. If set to TRUE, floating-point arithmetic will be used, otherwise fractions. Default is TRUE. Numeric matrix. Each row represents an ESS. Smith, J. M. and Price, G. R. (1973) "The logic of animal conflict", Nature 246, pp. 15 18. ESS(matrix(c(-1, 4, 0, 2), 2, byrow=true), c("hawk", "Dove"), FALSE) ESS(matrix(c(1, 2, 0, 0, 1, 2, 2, 0, 1), 3, byrow=true))

ESset 5 ESset Evolutionarily stable set for two-player games with three strategies Computes evolutionarily stable sets of a game with two players and three strategies. ESset(A, strategies = c("1", "2", "3"), floats = TRUE) A strategies floats Numeric matrix of size 3x3 representing the number of strategies of a symmetric matrix game. String vector of length 3 that names all strategies. Logical value that handles number representation. If set to TRUE, floating-point arithmetic will be used, otherwise fractions. Default is TRUE. Numeric matrix. Each row represents the start and end point of a line (ESset). In addition, a plot of the ESset in the game will be created. Thomas, B. (1985) "On evolutionarily stable sets", Journal of Mathematical Biology 22, pp. 105 115. # Please note that the computation of evolutionarily stable sets # is rather time-consuming. # Depending on your machine you might need to wait more # than 10 seconds in order to run the following example. ## Not run: A <- matrix(c(-2, 5, 10/9, 0, 5/2, 10/9, -10/9, 35/9, 10/9), 3, byrow=true) strategies <- c("hawk", "Dove", "Mixed ESS") ESset(A, strategies) ## End(Not run)

6 ILogit ILogit ILogit dynamic Imitative Logit dynamic as a type of evolutionary dynamics. ILogit(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Jochen Staudacher <jochen.staudacher@hs-kempten.de> Weibull, J. W. (1997) "Evolutionary Game Theory", MIT Press. dynamic <- ILogit A <- matrix(c(-1, 0, 0, 0, -1, 0, 0, 0, -1), 3, byrow=true) state <- matrix(c(0.1, 0.2, 0.7, 0.2, 0.7, 0.1, 0.9, 0.05, 0.05), 3, 3, byrow=true) eta <- 0.7 phasediagram3s(a, dynamic, eta, state, TRUE, FALSE)

Logit 7 Logit Logit dynamic Logit dynamic as a type of evolutionary dynamics. Logit(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Fudenberg, D. and Levine, D. K. (1998) "The Theory of Learning in Games", MIT Press. dynamic <- Logit state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) eta <- 0.1 phasediagram3s(a, dynamic, eta, state, FALSE, FALSE)

8 MSReplicator MSReplicator Maynard Smith replicator dynamic Maynard Smith replicator dynamic as a type of evolutionary dynamics. MSReplicator(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Smith, J. M. (1982) "Evolution and the Theory of Games", Cambridge University Press. dynamic <- MSReplicator state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) phasediagram3s(a, dynamic, NULL, state, FALSE, FALSE)

phasediagram2s 9 phasediagram2s Phase Diagram for two-player games with two strategies Plots phase diagram of a game with two players and two strategies. phasediagram2s(a, dynamic, params = NULL, vectorfield = TRUE, strategies = c("1", "2")) A dynamic params vectorfield strategies Numeric matrix of size 2x2 representing the number of strategies of a symmetric matrix game. Function representing an evolutionary dynamic. Numeric vector representing additional parameters for the evolutionary dynamic. Logical value that handles vector field presentation. If set to TRUE, vector field will be shown, otherwise not. Default is TRUE. String vector of length 2 that names all strategies. None. A <- matrix(c(-1, 4, 0, 2), 2, 2, byrow=true) phasediagram2s(a, Replicator, strategies = c("hawk", "Dove"))

10 phasediagram3s phasediagram3s Phase Diagram for two-player games with three strategies Plots phase diagram of a game with two players and three strategies. phasediagram3s(a, dynamic, params = NULL, trajectories = NULL, contour = FALSE, vectorfield = FALSE, strategies = c("1", "2", "3")) A dynamic params trajectories contour vectorfield strategies Numeric matrix of size 3x3 representing the number of strategies of a symmetric matrix game. Function representing an evolutionary dynamic. Numeric vector with additional parameters for the evolutionary dynamic. Numeric matrix of size mx3. Each row represents the initial values for the trajectory to be examined. Logical value that handles contour diagram presentation. If set to TRUE, contour diagram will be shown, otherwise not. Default is FALSE. Logical value that handles vector field presentation. If set to TRUE, vector field will be shown, otherwise not. Default is FALSE. String vector of length 3 that names all strategies. None. state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) phasediagram3s(a, Replicator, NULL, state, FALSE, FALSE) phasediagram3s(a, Replicator, NULL, state, TRUE, TRUE) # Plot two trajectories rather than only one: state <- matrix(c(0.4, 0.3, 0.3, 0.6, 0.2, 0.2), 2, 3, byrow=true) phasediagram3s(a, Replicator, NULL, state, FALSE, FALSE)

phasediagram4s 11 phasediagram4s Phase Diagram for two-player games with four strategies Plots phase diagram of a game with two players and four strategies. phasediagram4s(a, dynamic, params = NULL, trajectory = NULL, strategies = c("1", "2", "3", "4"), norgl = TRUE) A dynamic params trajectory strategies norgl Numeric matrix of size 4x4 representing the number of strategies of a symmetric matrix game. Function representing an evolutionary dynamic. Numeric vector with additional parameters for the evolutionary dynamic. Numeric vector of size 4 representing the initial value for the trajectory to be examined. String vector of length 4 that names all strategies. Logical value that handles diagram rotation. If set to FALSE, diagram will be rotatable, otherwise not. Default is TRUE. None. A <- matrix(c(5, -9, 6, 8, 20, 1, 2, -18, -14, 0, 2, 20, 13, 0, 4, -13), 4, 4, byrow=true) state <- c(0.3, 0.2, 0.1, 0.4) phasediagram4s(a, Replicator, NULL, state)

12 Replicator Replicator Replicator dynamic Replicator dynamic as a type of evolutionary dynamics. Replicator(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Taylor, P. D. and Jonker, L. B. (1978) "Evolutionary stable strategies and game dynamics", Mathematical Biosciences 40 (1-2), pp. 145 156. dynamic <- Replicator state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) phasediagram3s(a, dynamic, NULL, state, FALSE, FALSE)

Smith 13 Smith Smith dynamic Smith dynamic as a type of evolutionary dynamics. Smith(time, state, parameters) time state parameters Regular sequence that represents the time sequence under which simulation takes place. Numeric vector that represents the initial state. Numeric vector that represents parameters needed by the dynamic. Numeric list. Each component represents the rate of change depending on the dynamic. Smith, M. J. (1984) "The Stability of a Dynamic Model of Traffic Assignment An Application of a Method of Lyapunov", Transportation Science 18, pp. 245 252. dynamic <- Smith state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=true) phasediagram3s(a, dynamic, NULL, state, FALSE, FALSE)

14 triangle triangle Triangle for 2-simplex operations Generates a triangle representing the 2-simplex. triangle(labels = c("1", "2", "3")) labels String vector of length 3 that names the edges of the triangle. List of size 2 with members coords and canvas. coords holds edge coordinates of the 2-simplex, canvas a ggplot2 plot object of the 2-simplex. triangle()

Index BNN, 2 BR, 3 ESS, 4 ESset, 5 ILogit, 6 Logit, 7 MSReplicator, 8 phasediagram2s, 9 phasediagram3s, 10 phasediagram4s, 11 Replicator, 12 Smith, 13 triangle, 14 15