extensions [ array matrix ] globals [ focal-agent-A focal-agent-B highlight agent-list move-IDs-A-list ;; list of move numbers (x) to plot in time series move-IDs-B-list ] breed [agents agent] patches-own [ payoff-list ;; just a pair of values, for the two focal agents ] agents-own [ current-x ;; player's chosen move in the current round pr-x-list ;; list of player's probabilities for each of N possible move ("x") Q-array ;; array of a player's "attraction" to each of N possible moves. These are updated through learning cum-payoff index ;; pointer in the agent-list and payoff-list payoff-matrix ] ;;####################################################################################################### ;;####################################################################################################### ;; SETUP AND RESET ;;####################################################################################################### ;;####################################################################################################### to reset clear-all set num-possible-moves 100 set num-agents 2 set Gamma 0 set A 0 set B 1 set alpha 0.01 set beta 0.07 set learning-model "experience weighted" set generate-new-payoffs true set sim-random-seed 0 set setup-random-seed -2147483648 ;; max negative integer. Will be incremented sequentially each setup click let N num-possible-moves set move-IDs-A (word (word round(N / 10)) "\n" (word round(N / 5)) "\n" (word round(N / 4)) "\n" (word round(N / 2)) ) set move-IDs-B (word (word round(N / 10)) "\n" (word round(N / 5)) "\n" (word round(N / 4)) "\n" (word round(N / 2)) ) set move-IDs-A-list read-from-string (word "[" (replace-newlines move-IDs-A " ") "]") set move-IDs-B-list read-from-string (word "[" (replace-newlines move-IDs-B " ") "]") end to setup clear-all-plots clear-turtles clear-drawing RESET-TICKS if (not lock) [set sim-random-seed sim-random-seed + 1] set num-agents 2 ;; force this to 2 right now random-seed sim-random-seed with-local-randomness [ set setup-random-seed setup-random-seed + 1 random-seed setup-random-seed set move-IDs-A-list read-from-string (word "[" (replace-newlines move-IDs-A " ") "]") set move-IDs-B-list read-from-string (word "[" (replace-newlines move-IDs-B " ") "]") set agent-list [ ] let i 0 create-agents num-agents [ hide-turtle let initial-pr 1 / num-possible-moves set pr-x-list [ ] repeat num-possible-moves [ set pr-x-list lput initial-pr pr-x-list ] set current-x choose-x pr-x-list set Q-array array:from-list n-values num-possible-moves [0] set payoff-matrix matrix:make-constant num-possible-moves num-possible-moves 0 set agent-list lput self agent-list set index i set i i + 1 ] set focal-agent-A item A agent-list set focal-agent-B item B agent-list if display-options = "2-player payoff matrix" [ ask patches with [pxcor < num-possible-moves and pycor < num-possible-moves] [ if generate-new-payoffs [ set payoff-list random-normal-correlated Gamma ] set pcolor scale-two-color-two-param item 0 payoff-list item 1 payoff-list 3.0 -3.0 ;; color limits are 3 * sigma = 99.7% ;; for focal-agent-A, set cell in payoff-matrix let this-row pxcor let this-col pycor let this-payoff item 0 payoff-list ask focal-agent-A [ matrix:set payoff-matrix this-row this-col this-payoff ] ;; for focal-agent-B, set cell in payoff-matrix, but reversing rows and columns set this-row pycor set this-col pxcor set this-payoff item 1 payoff-list ask focal-agent-B [ matrix:set payoff-matrix this-row this-col this-payoff ] ] let this-x [current-x] of focal-agent-A let this-y [current-x] of focal-agent-B ask patch this-x this-y [ sprout 1 [ set size 4 set color black set shape "square 3" set highlight self ] ] ] ] ;; end with-local-randomness end ;;####################################################################################################### ;;####################################################################################################### ;; GO ;;####################################################################################################### ;;####################################################################################################### to go set move-IDs-A-list read-from-string (word "[" (replace-newlines move-IDs-A " ") "]") ask agents [ set current-x choose-x pr-x-list let alter-current-x 0 ask other agents [ set alter-current-x current-x ] let this-payoff matrix:get payoff-matrix current-x alter-current-x set cum-payoff this-payoff + cum-payoff let pr-x-others [ ] ask other agents [ set pr-x-others pr-x-list ] update-attractions pr-x-others update-choice-probabilities ] if display-options = "2-player payoff matrix" [ clear-drawing ;; erase turtle previous lines ask highlight [ let new-x [current-x] of focal-agent-A let new-y [current-x] of focal-agent-B pen-down setxy new-x new-y set color black ] ] tick do-plots end ;; ##################################### END GO ################################################ ;; ############################################################################################## to new-sim-random-seed set sim-random-seed sim-random-seed + 1 end ;; ############################################################################################## to-report random-normal-correlated [gamma-x ] let mean-x 0 ;; mean = 0 ; from Galla & Farmer p 2 let variance-x 1 ;; variance = 1 ; from Galla & Farmer p 2 ;; draw M random normal numbers, x and y ;; x has given mean and variance ;; y has variance scaled by gamma ;; then rotate the pair by 45 degrees, centered on {0.0,0.0} https://en.wikipedia.org/wiki/Rotation_matrix#In_two_dimensions ;; 45 degrees = 0.78539816339 radians = pi / 4 let x random-normal 0 1.0 set x min (list 3.0 max (list -3.0 x)) let y random-normal mean-x (variance-x - abs( gamma-x ) ) set y min (list 3.0 max (list -3.0 y)) ;;show (word x ", " y) let theta 45 ifelse gamma-x > 0 [ set theta 45 ] [ set theta -45 ] let x-prime (x * cos(theta)) - (y * sin(theta)) let y-prime (x * sin(theta)) + (y * cos(theta)) set x-prime min (list 3.0 max (list -3.0 x-prime)) set y-prime min (list 3.0 max (list -3.0 y-prime)) report (list x-prime y-prime) end to-report scale-two-color-two-param [param1 param2 upper-limit lower-limit] let x-color [0 255 0 ] let y-color [255 0 0] let range upper-limit - lower-limit let x-weight max(list 0 ((param1 - lower-limit ) / range) ) let y-weight max(list 0 ((param2 - lower-limit ) / range) ) ;;let neutral-weight 1 - (pos-weight + neg-weight) ;;show (sentence "param = " param "; pos-weight = " pos-weight "; neg-weight = " neg-weight "; neutral-weight = " neutral-weight) let i 0 let scaled-color [ ] repeat 3 [ let new-color (x-weight * item i x-color + y-weight * item i y-color) set scaled-color lput new-color scaled-color set i i + 1 ] report scaled-color end ;; ############################################################################################## ;; ##################################### UTILITIES ############################################# to-report replace-newlines [str replace-str] let new-string str let newline-pos position "\n" new-string while [newline-pos != false] [ set new-string replace-item newline-pos new-string replace-str set newline-pos position "\n" new-string ] report new-string end to-report roulette [probabilities-list ] ;; create a roulette wheel using the probabilities-list, then return a random draw from that list according to probabilities let num-buckets length probabilities-list let buckets array:from-list n-values num-buckets [0] let total 0 let i 0 foreach probabilities-list [ set total total + ? array:set buckets i total set i i + 1 ] let result -1 let draw random-float 1 let done false set i 0 while [not done] [ if array:item buckets i >= draw [ set result i set done true ] set i i + 1 if i >= num-buckets [ set done true set result i - 1 ] ] report result end to-report generate-key-list [n-dim max-N] ;; return a list of lists, with the full cross product of values for each dimension ;; first, generate a list sequence from 0 to max-N let result n-values max-N [ (list ?) ] if n-dim > 1 [ set result add-sub-list result 1 n-dim max-N ] report result end to-report add-sub-list [main-list dim limit-dim max-N] ;; recursively add sub-lists to the main-list, one sub-list for each additional dimension let result [ ] foreach main-list [ let i 0 repeat max-N [ set result lput ( lput i ?) result set i i + 1 ] ] if dim < limit-dim - 1 [ let nextdim dim + 1 set result add-sub-list result nextdim limit-dim max-N ] report result end ;; ############################## END UTILITIES ################################################# ;; ############################################################################################## ;; ############################################################################################## ;; ##################################### AGENT PROCEDURES ###################################### to-report choose-x [pr-list] report roulette pr-list end ;; agent procedure to update-attractions [pr-x-other-agent] ;; get pr-x-list of other agents ;; for each attraction in Q-array, update it with most recent Q-array (derated by alpha) plus expected payoff based on pr-x of other agents let i 0 repeat num-possible-moves [ array:set Q-array i ((1 - alpha) * array:item Q-array i) + weighted-payoff (matrix:get-row payoff-matrix i) pr-x-other-agent set i i + 1 ] end to-report weighted-payoff [p-list frequencies ] let total 0 let i 0 repeat num-possible-moves [ set total total + item i p-list * item i frequencies set i i + 1 ] report total end ;; agent procedure to update-choice-probabilities ifelse learning-model = "none" [ ;; no update ] [ ;; calculate the numerators, storing them in a list, and accumulate the sum for use in the denomenator let total 0 let numerators [ ] let this-numerator 0 let i 0 repeat num-possible-moves [ set this-numerator exp (beta * array:item Q-array i) set numerators lput this-numerator numerators set total total + this-numerator set i i + 1 ] let new-pr-x-list [ ] foreach numerators[ set new-pr-x-list lput (? / total ) new-pr-x-list ] ;; test to see if it sums to 1.0 set total 0 foreach new-pr-x-list[ set total total + ? ] if round(total * 10000) / 10000 != 1.0 [ print (word "Error: choice probabilities don't sum to 1.0. Instead: " total) ] set pr-x-list new-pr-x-list ] end ;;####################################################################################################### ;;####################################################################################################### ;; PLOTTING ;;####################################################################################################### ;;####################################################################################################### to do-plots set-current-plot "Focal Agents' Cumulative Payoffs" ;; only plot the two focal agents set-current-plot-pen "0" plot [cum-payoff] of focal-agent-A set-current-plot-pen "1" plot [cum-payoff] of focal-agent-B set-current-plot "Move Probabilities - Focal Agent A" clear-plot ask focal-agent-A [ foreach pr-x-list [ plot ? ] ] set-current-plot "Move Probabilities - Focal Agent B" clear-plot ask focal-agent-B [ foreach pr-x-list [ plot ? ] ] let x1 item 0 move-IDs-A-list let x2 item 1 move-IDs-A-list let x3 item 2 move-IDs-A-list let x4 item 3 move-IDs-A-list set-current-plot "Pr(move) Time Series - Focal Agent A" set-current-plot-pen "1" plot log ( [item x1 pr-x-list] of focal-Agent-A ) 10 set-current-plot-pen "2" plot log ( [item x2 pr-x-list] of focal-Agent-A ) 10 set-current-plot-pen "3" plot log ( [item x3 pr-x-list] of focal-Agent-A ) 10 set-current-plot-pen "4" plot log ( [item x4 pr-x-list] of focal-Agent-A ) 10 set x1 item 0 move-IDs-B-list set x2 item 1 move-IDs-B-list set x3 item 2 move-IDs-B-list set x4 item 3 move-IDs-B-list set-current-plot "Pr(move) Time Series - Focal Agent B" set-current-plot-pen "1" plot log ( [item x1 pr-x-list] of focal-Agent-B ) 10 set-current-plot-pen "2" plot log ( [item x3 pr-x-list] of focal-Agent-B ) 10 set-current-plot-pen "3" plot log ( [item x3 pr-x-list] of focal-Agent-B ) 10 set-current-plot-pen "4" plot log ( [item x4 pr-x-list] of focal-Agent-B ) 10 end @#$#@#$#@ GRAPHICS-WINDOW 210 10 720 541 -1 -1 5.0 1 10 1 1 1 0 0 0 1 0 99 0 99 0 0 1 ticks 30.0 BUTTON 76 93 142 126 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 76 130 142 163 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 11 289 201 322 num-possible-moves num-possible-moves 10 100 100 5 1 NIL HORIZONTAL SLIDER 10 347 199 380 Gamma Gamma -1 1 0 .1 1 NIL HORIZONTAL CHOOSER 7 575 195 620 display-options display-options "2-player payoff matrix" 0 TEXTBOX 8 51 211 93 Written by Russell C. Thomas (2016),\nbased on Galla & Farmer (2012) 11 0.0 1 SLIDER 12 252 200 285 num-agents num-agents 2 100 2 1 1 NIL HORIZONTAL BUTTON 6 93 68 126 NIL reset NIL 1 T OBSERVER NIL NIL NIL NIL 1 PLOT 210 545 720 699 Focal Agents' Cumulative Payoffs ticks NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "0" 1.0 0 -7500403 true "" "" "1" 1.0 0 -2674135 true "" "" INPUTBOX 88 626 138 686 A 0 1 0 Number INPUTBOX 142 625 192 685 B 1 1 0 Number TEXTBOX 6 10 203 47 Complex dynamics in learning complicated games 14 0.0 1 SLIDER 9 435 198 468 alpha alpha 0 .03 0.01 .0001 1 NIL HORIZONTAL CHOOSER 8 512 183 557 learning-model learning-model "experience weighted" "none" 0 SLIDER 8 471 198 504 beta beta 0 .15 0.07 .01 1 NIL HORIZONTAL TEXTBOX 20 628 86 646 focal agents 11 0.0 1 BUTTON 150 131 205 164 step go NIL 1 T OBSERVER NIL NIL NIL NIL 1 PLOT 730 10 1149 157 Move Probabilities - Focal Agent A move # Pr(move) 0.0 100.0 0.0 0.1 true false "" "" PENS "default" 1.0 1 -16777216 true "" "" PLOT 731 160 1150 307 Move Probabilities - Focal Agent B move # Pr(move) 0.0 100.0 0.0 0.1 true false "" "" PENS "default" 1.0 1 -16777216 true "" "" PLOT 731 320 1245 488 Pr(move) Time Series - Focal Agent A NIL log Pr(move) 0.0 10.0 -3.0 0.0 true true "" "" PENS "1" 1.0 0 -16777216 true "" "" "2" 1.0 0 -7500403 true "" "" "3" 1.0 0 -2674135 true "" "" "4" 1.0 0 -13345367 true "" "" PLOT 731 490 1245 658 Pr(move) Time Series - Focal Agent B NIL log Pr(move) 0.0 10.0 -3.0 0.0 true true "" "" PENS "1" 1.0 0 -16777216 true "" "" "2" 1.0 0 -7500403 true "" "" "3" 1.0 0 -2674135 true "" "" "4" 1.0 0 -13345367 true "" "" SWITCH 11 380 199 413 generate-new-payoffs generate-new-payoffs 0 1 -1000 INPUTBOX 14 177 197 237 sim-random-seed 1 1 0 Number SWITCH 115 174 205 207 lock lock 1 1 -1000 INPUTBOX 3 704 124 764 setup-random-seed -2147483647 1 0 Number INPUTBOX 1252 320 1307 449 move-IDs-A 10\n20\n25\n50 1 1 String INPUTBOX 1252 490 1306 616 move-IDs-B 10\n20\n25\n50 1 1 String @#$#@#$#@ ## WHAT IS IT? Replicates the model in "Complex dynamics in learning complicated games" by Galla and Farmer (2012). (http://www.pnas.org/cgi/doi/10.1073/pnas.1109672110) This model shows the dynamics of strategies when two or more agents try to play complicated games (large number of possible moves, bounded rationality about long-term payoffs, etc.). The payoff matrices of the games are generated randomly, based on parameters described below. This allows experiments over a large number of games with similar qualities, without making assumptions about the detailed structure of the game (as is typical in analytic Game Theory). The purpose of the model is to explore the conditions that fit traditional Game Theory analysis (e.g. unique equilibrium) and those that do not (multiple equilibria, chaotic dynamics). And given the complexity of the game, the model allows us to explore how well this learning model works to enable players to evolve cooperative solutions, even when the payoff matrix might be unappealing. ## HOW IT WORKS Every tick, each agent choses a single "move" (indexed by x = 1..N) by drawing at random according to their current probabilities ("Pr(move)" or "x" in notation by Galla & Farmer). As in all Game Theory settings, their payoff depends both on their own choice of moves and that of other agents. Their payoff is added to their cumulative total for charting purposes. Finally, each agent updates their probabilities using "experience weighted learning", as described in Galla & Farmer (2012) The grid shows the payoff matrix for the two focal agents, "A" and "B", with each cell in the matrix color coded according to the pair of payoffs. Payoffs can range from -3.0 to +3.0. The color code is: * Red = positive for A, negative for B * Green = positive for B, negative for A * Yellow = positive for both A and B * Dark Brown = negative for both A and B When Gamma is set to -1.0 (perfect negative correlation), you will only see shades of red or green. When Gamma is set to 1.0 (perfect positive correlation) you will only see shades of yellow (to olive and dark brown). When Gamma is set to zero, you will see the full range of colors. The black square on the grid highlights the current payoff, given the move choices of agents A and B. The line drawn links the current payoff to the payoff in the previous tick. ## HOW TO USE IT Click "Reset" to initialize the parameters in their default settings. Click "Setup" to load the parameters and to initialize the payoff matrices. Click "Go" to run the model continuously. Unclick to stop the model Click "Step" to single step the model. Set "num-agents" (currently fixed at 2, but will be expanded to 100 in later versions.) Set "num-possible-moves" (N), which is the number of possible moves for each agent, ranging from 10 to 100. (Galla & Farmer 2012 use 50) "Gamma" is the parameter that controls the correlation between agent payoffs. -1.0 is perfect negative correlation (i.e. zero sum game). +1.0 is perfect positive correlation (i.e. positive sum game). 0.0 is uncorrelated. "alpha" is the parameter that controls agent memory (i.e. influence of past probabilities) when updating their preference probabilities. 0 is unlimited memory (no decay in the influence of past probabilities), while 1.0 is no memory (100% decay, meaning no influence of past probabilities). "beta" is the parameter that controls randomness associated with the move choice decision. 0 is fully random with equal probability for each move. Infinity (i.e. large positive number) is a deterministic choice for the move with the highest "attractiveness". Galla & Farmer 2012 fix this at 0.07. "learning-mode" is either "experience weighted", which is the Galla & Farmer model, or "none", which is no updating. ## THINGS TO NOTICE The primary results to notice are the bar graphs for "Pr(move)" for the two focal agents, A and B. Do they settle into a stable pattern? (which would indicate an equilibrium) Or do they oscillate regularly? (which would incidate limit cycles) Or are the oscillations chaotic? (seemingly random) It is interesting to compare the effectiveness of learning on cumulative payoffs, compared to no learning. Can the agents, in effect, cooperate to make the most of the payoff options available? With shorter memories (i.e. higher values of alpha), agents can reach an equilibrium in probabilities where they prefer a broad range of moves, but fail to home in on the few (or one) move that might yield the best payoff for all agents (i.e. a bright yellow cell in the payoff matrix). ## THINGS TO TRY Try varying Gamma and alpha to see whether the probabilities Pr(move) demonstrate equilibria, limit cycles, or chaos. (Galla & Farmer 2012, p 2 and 3 show various parameter settings for Gamma and alpha that yeild interesting results) Try varying "num-possible-moves" (N) to see if the complexity of the game has any effect. ## EXTENDING THE MODEL **Detect equilibrium, and then stop.** Currently the model runs forever (i.e. until it is stopped manually). It would be useful to monitor changes in each players move probabilities and then stop the simulation when those probabilities stopped changing. **Auto-detect "interesting" Pr(move) indices for plotting.** Currently, the experimentor manually sets the index values for plotting Pr(move) in the time series. Ideally, you'd like them to be "interesting" (i.e. large value and/or varying significantly with time). It would be good to detect this automatically after some number of ticks (~1,000). **Support more than two agents.** Galla & Farmer (2012) include multiple players in their setup, but then reduce to only two players in their model and results. They don't describe how to implement multiple players, especially in light of the Gamma parameter which is the correlation in payoffs between any two players. With three or more players, it is not possible to have all the pair-wise correlations to be negative. One approach would be to have C(M,2) 2-player games, where C(M,2) is the number combinations of 2-player games with M players. (The formula for combinations is C(n,r) = n! / ( r! (n - r)! ), where n is the number of entities and r is the number in the subset.) For various numbers of players: * C(2,2) = 1 * C(4,2) = 6 * C(10,2) = 45 * C(20,2) = 190 * C(100,2) = 4950 As you can see, the number of combinations grows rapidly with the total number of players. Since each payoff matrix is N X N, having a large number of players becomes infeasable on ordinary personal computers due to memory limitations. One viable way of simplifying would be to not have different payoff matrices for each and every pair-wise game. You could even have just two -- one for a positively correlated game and one for the complementary negatively correlated game. Then each player plays both sides of each game, depending on the particular opponent. **Probabilistic payoffs.** In some settings (e.g. cyber security) the payoff from moves is not deterministic, and instead is probabilistic. This could be modeled by using a random draw from a given probability distribution. It would be interesting to see how this would change the results if payoff distributions had long tails (i.e. enabling extreme payoffs on rare occasions). **Uncertainty and/or imperfect knowledge regarding payoffs.** Along the same lines, it would be interesting to see if results would change if players had imperfect knowledge of their payoffs for a given move, or if their was uncertainty involved. It might be possible to incorporate this into the "experience weighted learning" model. **Sequential and/or combinatorial game.** The current design is a one-shot iterative game. Many settings (e.g. investment sequencing) require sequential and/or combinatorial game structure. ## NETLOGO FEATURES Uses Array and Matrix extensions. ## RELATED MODELS The Galla & Farmer (2012) model is aligned with Evolutionary Game Theory. There are a number of NetLogo models that implement some version of Evolutionary Game Theory. Examples include: * GameTheory, by Rick O'Gorman (Submitted: 07/22/2014) http://ccl.northwestern.edu/netlogo/models/community/GameTheory * Prisoner Dilemma N-Person with Strategies, by Tan Yongzhi (Submitted: 11/14/2012) http://ccl.northwestern.edu/netlogo/models/community/PD%20N-Person%20with%20Strategies * FriendshipGameRev_1_0_25, by David S. Dixon (Submitted: 10/15/2011) http://ccl.northwestern.edu/netlogo/models/community/FriendshipGameRev_1_0_25 * Evolutionary_Game_Theory_Big_Bird_Replicator_Dynamic, by Jeff Russell (Submitted: 09/06/2007) http://ccl.northwestern.edu/netlogo/models/community/Evolutionary_Game_Theory_Big_Bird_Replicator_Dynamic However, none of these models is focused on complex games (i.e. large strategy space) and associatied learning mechanisms. The closest are probably those involving replicator dynamics (e.g. Russell 2007). ## CREDITS AND REFERENCES Written by Russell C. Thomas (2016), based on paper and supplementary material: Galla, T., & Farmer, J. D. (2013). Complex dynamics in learning complicated games. Proceedings of the National Academy of Sciences, 110(4), 1232–1236. http://doi.org/10.1073/pnas.1109672110 For discussion and analysis of this model, see this blog post: * http://exploringpossibilityspace.blogspot.com/2016/01/complex-dynamics-in-learning.html @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 circle 3 false 0 Circle -7500403 false true 0 0 300 Circle -7500403 false true 2 2 297 Circle -7500403 false true 12 12 277 Circle -7500403 false true 23 23 255 Circle -7500403 false true 33 33 234 Circle -7500403 false true 44 44 212 Circle -7500403 false true 54 54 192 Circle -7500403 false true 65 65 170 Rectangle -7500403 false true 90 90 210 210 Rectangle -7500403 false true 75 75 225 225 Rectangle -7500403 false true 105 105 195 195 Circle -7500403 false true 86 86 127 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 square false 0 Rectangle -7500403 true true 30 30 270 270 square 3 false 0 Rectangle -7500403 true true 30 30 270 105 Rectangle -7500403 true true 30 195 270 270 Rectangle -7500403 true true 30 30 105 270 Rectangle -7500403 true true 195 30 270 270 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 5.2.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@