Competition and learning in a recreational game community - proof of concept
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This is a model of a community of players of a competitive two-player game. It models these players' selection of opponents, competition, and learning game strategy.
In its current form, it models socially-motivated opponent selection (Stafford, Devlin, Sifa, & Drachen, 2017), exponential skill acquisition (Heathcote, Brown, & Mewhort, 2000), and learning from opponents (Lorenzet, Salas, & Tannenbaum, 2005; Weintrop & Wilensky, 2013).
HOW IT WORKS
Types of agents
This model contains two types of agents: players (visualized as people) and their undirected links, which store information about players' competition histories.
Environment
The environment for players is the network created by links.
Agent variables
Player variables
strategy: the current strategy of the player, from 0-to-1. Determines competition outcomes and is one of the primary outcome variables of interest in this model. Strategy is visualized by players' shade of green, from white (0) to black (1). plays: the total number of the player's competitions, which after each tick should be equal to the number of ticks plays-to-99: counts the number of competitions the player takes to reach strategy = .99 wins: counts the number of the player's competitions wins played?: true/false flag that indicates whether a player has already competed during the current tick
Link variables
matches-real: counts the number of competitions between the turtles at both ends of the link. Matches-real is visualized by links' shade of green, from white (fewer) to black (more). matches-for-choosing: a weighted count of the number of competitions between the turtles at both ends of the link, which begins at the value of the start-wt slider and increments by the value of the match-wt slider
Setup
Setup generates a group of players, seeds their starting strategy levels (player var: strategy), and seeds links for competitor selection during the model run (link var: matches-for-choosing).
Go
Every tick, all players compete exactly once against exactly one other player. In random order, players make a random weighted selection of an opponent based on the number of competitions against other players (link var: matches-for-choosing). The player with the greater strategy (player var: strategy) wins the competition.
After the competition, both players learn—i.e., increase their strategy (player var: strategy). Both players increase their strategy proportionally to the difference between their current strategy level and the maximum (1). The loser of the competition additionally increases their strategy proportionally to the difference between their current strategy level and the competition winner's strategy level.
HOW TO USE IT
Before running the model, set the following sliders: num-nodes: determines the number of players to generate start-wt: sets the starting value of matches-for-choosing for all links between players during setup match-wt: sets the value by which matches-for-choosing increments after each competition between players during model run start-strat-max: sets the maximum value to randomly seed players' strategy levels during setup base-learn: sets the percent of the difference between players' current strategy level and the maximum by which they increase after a competition partner-learn: sets the percent of the difference between a competition losers' current strategy level and the competition winners' current strategy level by which the loser increases after a competition
To run competitions between players one at a time, press the 'go-once' button. This is useful for debugging the model and viewing individual pairs of competitors, who are displayed in red and blue.
To continuously run competitions between players, press the 'go' button. Because player strategy asymptotically approaches 1 without ever reaching it, the model will automatically stop running when all players have strategy >= .999.
THINGS TO NOTICE
Two visualizations are displayed to the right of the model.
Matches-hist is a histogram of the number of competitions between players. What shape is the distribution of competitions between players? Does a given setting always yield similar distributions across multiple runs?
Avg-strat displays the change over time in average strategy of all players (center black line), the maximum strategy of all players (upper blue line), and the minimum strategy of all players (lower blue line). What, if any, is the relation between players' matches and their rate of strategy learning?
THINGS TO TRY
Try adjusting the start-wt and match-wt sliders. How does the distribution of competitions between players change (see matches-hist histogram)? Do certain settings have more or less variability in their patterns of opponent selection? What about the relative influence of early opponent selection patterns on later opponent selection? See if you can generate both highly skewed and bimodal distributions.
Try adjusting the base-learn and partner-learn sliders. How do these effect not only the rate of learning (see avg-strat plot), but the difference between the best and worst players?
EXTENDING THE MODEL
Competitor selection
A number of alternative competitor selection strategies are possible. Drawing on Self-Determination Theory (Deci & Ryan, 2000), for example, distinct competitor selection could be modeled based on relatedness (past number of competitions), autonomy (weakest competitor), and competence (strongest competitor)—or some combination thereof. Different players could be modeled as having different selection strategies, or selection strategies could be modeled as dynamically varying based on game outcomes. For example, as players win games, their need to experience competence may decrease, and the weight of potential opponents’ strategy strength (or remembered strategy strength based on the most recent play with that player) on competitor selection might decrease. Conversely, as players lose games, their need for autonomy may increase, and the weight of potential opponents’ strategy weakness might increase.
Competition winner
There are a number of alternatives to deterministically modeling the winner of a competition. Non-deterministic—i.e., probabilistic—competition outcome algorithms, such as Elo (Albers & de Vries, 2001), can have a variety of probability functions (Hsu, Earley, & Wolf, 2006). In isolation, the particular competition outcome algorithm has little effect on the model. However, because winning and losing currently have consequences for learning strategy, changing the competition algorithm may need to be accompanied by changes to the strategy learning function. Furthermore, while learning curves in aggregate have smooth curvilinear functions, individuals’ learning involve plateaus, dips, and leaps in performance (Gray & Lindstedt, 2016). In particular, periods of exploration of new strategies that lead to substantial gains appear as dips in performance followed by leaps (Gray & Lindstedt, 2016). Players could be modeled as engaging in periods of strategy exploration and exploitation of known strategies (Stafford & Dewar, 2014), which would have be associated with differences in the influence of current strategy level on win probabilities.
Skill growth
The preceding discussion of changes to competition outcome algorithms also suggest potential extensions to the learning functions. For example, players could be modeled as having maximum strategy thresholds lower than 1 that cannot be surpassed without engaging in strategy exploration (Gray & Lindstedt, 2016). Strategy exploration would be associated with not only decreased probability of victory during competition, but also of greater gains in strategy—including overcoming earlier strategy thresholds/plateaus (Gray & Lindstedt, 2016). It is possible that a player’s exploration makes it more difficult for opponents to learn from their potentially unorthodox—or ineffective—game behavior (cf. Weintrop & Wilensky, 2013). Additionally, exploration may have feed-forward effects such that early exploration increases subsequent strategy acquisition rates (Stafford & Dewar, 2014).
Strategy modeling
Strategy could be modeled in a more complex manner than a single 0-to-1 variable. For example, several strategies could be modeled as different variables. These strategies could have a rock-paper-scissor dynamic such that they have different fitnesses against each other. In such a model, agents would need a method for selecting a strategy, possibly based on past strategy performance. Competition outcomes could be determined by some combination of players’ values for their selected strategies and the relative fitnesses of the selected strategies against each other.
NETLOGO FEATURES
This model uses the rnd extension during competitor selection to model a random weighted selection using rnd:weighted-one-of.
CREDITS AND REFERENCES
Created 2017 by Joe A. Wasserman during the Sante Fe Institute Complexity Explorer's Introduction to Agent-Based Modeling (Summer 2017) with instructor William Rand.
Albers, P. C. H., & de Vries, H. (2001). Elo-rating as a tool in the sequential estimation of dominance strengths. Animal Behaviour, 489–495. Deci, E. L., & Ryan, R. M. (2000). The “what” and “why” of goal pursuits: Human needs and the self-determination of behavior. Psychological Inquiry, 11, 227–268. doi:10.1207/S15327965PLI1104_01 Gray, W. D., & Lindstedt, J. K. (2016). Plateaus, dips, and leaps: Where to look for inventions and discoveries during skilled performance. Cognitive Science, Advance online publication. doi:10.1111/cogs.12412 Heathcote, A., Brown, S., & Mewhort, D. J. K. (2000). The power law repealed: The case for an exponential law of practice. Psychonomic Bulletin & Review, 7, 185–207. doi:10.3758/BF03212979 Hsu, Y., Earley, R. L., & Wolf, L. L. (2006). Modulation of aggressive behaviour by fighting experience: mechanisms and contest outcomes. Biological Reviews, 81, 33–74. doi:10.1017/S146479310500686X Lorenzet, S. J., Salas, E., & Tannenbaum, S. I. (2005). Benefiting from mistakes: The impact of guided errors on learning, performance, and self-efficacy. Human Resource Development Quarterly, 16, 301–322. doi:10.1002/hrdq.1141 Stafford, T., Devlin, S., Sifa, R., & Drachen, A. (2017). Exploration and skill acquisition in a major online game. In The 39th Annual Meeting of the Cognitive Science Society (pp. 3249–3254). Stafford, T., & Dewar, M. (2014). Tracing the trajectory of skill learning with a very large sample of online game players. Psychological Science, 25, 511–518. doi:10.1177/0956797613511466 Weintrop, D., & Wilensky, U. (2013). Know your enemy: Learning from in-game opponents. In Proceedings of the 12th International Conference on Interaction Design and Children (pp. 408–411). New York, NY: Association for Computing Machinery. doi:10.1145/2485760.2485789
Comments and Questions
extensions [nw rnd] turtles-own [strategy plays plays-to-99 wins played?] links-own [matches-real matches-for-choosing] to setup clear-all ;; seed agents crt num-nodes layout-circle turtles (world-width / 2 - 1) ask turtles [ set shape "person" set strategy random-float start-strat-max set color scale-color green strategy 1 0 set plays 0 set plays-to-99 0 set wins 0 set played? false create-links-with other turtles ;; make all possible links ] ;; setup networks ask links [ set matches-for-choosing start-wt ;; adds one dummy match to links for selecting opponents set matches-real 0 ;; the real tracker of number of matches ] ask patches [ set pcolor gray ] reset-ticks end to go ;; runs ONE turtle at a time ask one-of turtles with [ not played? ] ;; chooses a player1 randomly who hasn't played this round [ let player1 self ;; sets player1 as self let player2 nobody let match-link rnd:weighted-one-of (my-links with [[not played?] of other-end]) [matches-for-choosing] ;; lottery to choose an opponent weighted by previous plays ask self [ ask match-link [set player2 other-end]] update-match-link match-link ;; updates match-link's variables compete player1 player2 ;; compete! ] ;; when no potential matches remain, tick and reset played? flags if count turtles with [not played?] < 2 [ ask turtles [set played? false] visualize tick ] ;; aborts when minimum strategy asymptotyically approaches 1 if min([strategy] of turtles) >= .999 [ visualize stop ] end ;; increments matches between the paired players to update-match-link [match-link] ask match-link [ set matches-for-choosing matches-for-choosing + match-wt set matches-real matches-real + 1 ] end ;; match opponents, compete, and learn to compete [player1 player2] ;; identifies players visually ask player1 [ set color red set played? true set plays plays + 1 ] ask player2 [ set color blue set played? true set plays plays + 1 ] ;; compete between opponents and update skill etc. let strategy1 [strategy] of player1 let strategy2 [strategy] of player2 ;; base learning regardless of game outcome ask player1 [ set strategy strategy + ((1 - strategy) * base-learn) ] ask player2 [ set strategy strategy + ((1 - strategy) * base-learn) ] ;; player1 > player2, increase player2 strategy proportional to difference in strategy if strategy1 > strategy2 [ ask player1 [ set wins wins + 1 ] ask player2 [ set strategy strategy + ((strategy1 - strategy2) * partner-learn) ] ] ;; player 2 > player1, increase player1 strategy proportional to difference in strategy if strategy1 < strategy2 [ ask player2 [ set wins wins + 1 ] ask player1 [ set strategy strategy + ((strategy2 - strategy1) * partner-learn) ] ] ;; counts how many ticks it takes for every player to reach strategy >= .99 ask (turtle-set player1 player2) [ if strategy < .99 [ set plays-to-99 plays-to-99 + 1 ] ] end to visualize ;; visualizes density of matches between opponents: darker = more ask links [ set color scale-color green matches-real max [matches-real] of links min [matches-real] of links ifelse matches-real = 0 [hide-link] [show-link] ] ;; visualizes current strategy of all turtles: darker = more ask turtles [ set color scale-color green strategy 1 0 ] end
There is only one version of this model, created over 6 years ago by Joe Wasserman.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Competition and learning in a recreational game community - proof of concept.png | preview | Preview for 'Competition and learning in a recreational game community - proof of concept' | over 6 years ago, by Joe Wasserman | Download |
This model does not have any ancestors.
This model does not have any descendants.