;; Culture and conformity ;; This model started 12 March 2008 by Joanna J. Bryson while: ;; - Hans Przibram fellow at the Konrad Lorenz Institute for Evolution and Cognition Research. ;; - on sabbatical from the University of Bath, Department of Computer Science. ;; Version from 22 September 2008 -- more efficient but otherwise unchanged from Bryson (2008) AACC ;; Global variables from the interface: ;; prob-of-perception ; Probability of misperceiving the action of a neighbour ;; prob-of-action ; Probability of acting incorrectly ;; size-of-culture ; Both the number of elements in the culture and the number of possible values. ;; modules-modelled ; originally was also size-of-culture, but that's a waste of time/CPU since we only look at a few ;; turtles-per-patch ; This determines the number of neighbors, who are the turtles on your 8 adjacent patches ;; aging? ; are adults replaced after life-span? ;; years-as-child ; children learn without acting (well, everyone ignores their actions) ;; years-as-adolescent ; adolescents learn only from each other -- from Susan Perry, not implemented now ;; years-as-adult ; adults act ;; adults-learn? ; adults may learn -- I would say we normally do ;; setup-memory-bias ; how strongly culture is programmed into the first generation. ;; number-acts-per-agent-per-step ; how many times each agent broadcasts its value for a belief ;; which-belief-viewed ; which belief the view-value button shows the value of ;; selection? ; does the environment prefer a particular value? This is to allow experiments with "innovation" (errors in cultural evolution that happen to be useful) ;; selective-advantage ; this is the probability that an agent with the wrong value will fail to replace itself when it dies ;; rewarded-value ; this is the value the selective belief values ;; selective-belief ; No more than one belief is selective at at time. ;; num-modules ; only model the subset of modules viewed extensions [ array ] ; agents' memory is an array of arrays globals [ drinking-age ; beginning of adulthood life-span ; end of adulthood belief-list ; just saves time... ] turtles-own [ memory ; the values of its beliefs (or really, a record of the perceived values of its neighbours) age ; determines when you die, if aging?, and possibly other things if I code them ] to setup-globals let xxx 0 set drinking-age years-as-child + years-as-adolescent set life-span drinking-age + years-as-adult ; make a list of all the beliefs, to use when reporting & such like set belief-list [] while [xxx < size-of-culture] [ set belief-list lput xxx belief-list set xxx xxx + 1 ] end to setup ;; global stuff ca setup-globals ask patches [ sprout turtles-per-patch ] ask turtles [ grow-brain true ifelse aging? [ set age random life-span ] [ ; else no aging set age life-span ; make all agents adults when no aging ] ] ; what we asked turtles ; put down a line on the plot for what the culture starts out looking like plot-culture end to go [NNN] let JJJ 0 while [JJJ < NNN] [ one-step set JJJ JJJ + 1 ] end ; make a new brain -- just for new agents ; set up a 2-D memory array (why must this be so hard?) to grow-brain [ biased? ] set memory array:from-list n-values modules-modelled [0] let bbb 0 while [bbb < modules-modelled] [ array:set memory bbb array:from-list n-values size-of-culture [0] if biased? [ ; only true on initial start up! the first generation array:set (array:item memory bbb) bbb setup-memory-bias ; each belief has its number value to start out with ] ; initial culture is easy to recognize -- value == belief set bbb bbb + 1 ] end to one-step let yyy 0 let belief 0 let myvalue 0 if aging? [ ask turtles [ age-and-renew ] ] ; how newage while [yyy < number-acts-per-agent-per-step] [ set belief random modules-modelled ; pick a current context the turtles are all in ask turtles with [age >= drinking-age] [ ; only adults affect others' beliefs set myvalue value belief ; determine my action / value in this context if random-float 1 < prob-of-action-error [ ; but maybe I make a mistake expressing myself! set myvalue random size-of-culture ] ask turtles-on neighbors [ ; ask my neighbors to see me express my value / action for that belief / context ; random perception goes here ;; in a decent language the next line would be: self.memory[belief][myvalue]++ array:set (array:item memory belief) myvalue ((array:item (array:item memory belief) myvalue) + 1) ] ] set yyy yyy + 1 ] ; show us what the consequence is plot-culture view-value end ; without selection, could really skip the hatch & die but it makes the point clear -- nothing up my sleeve. to age-and-renew set age age + 1 if age >= life-span [ ifelse selection? [ reproduce-selectively ] [ hatch 1 [ be-born ] ] die ] ; if too old end to be-born set age 0 grow-brain false end to reproduce-selectively let emptyish nobody ifelse value selective-belief != rewarded-value [ if random-float 1 >= selective-advantage [ hatch 1 [ be-born ] ] ] [ ; else the environment supports your value... hatch 1 [ be-born ] ; reproduce twice if there's space around you set emptyish one-of neighbors with [count turtles-here < turtles-per-patch] if emptyish != nobody [ ask emptyish [ sprout 1 [ be-born ] ] ] ] end ; hassles with 2-D arrays again ; note -- if more than one is tied for max, randomly pick one to return. to-report value [ belief ] let xxx 0 let my-max 0 let max-index-list [0] let banf 0 while [xxx < size-of-culture] [ set banf array:item (array:item memory belief) xxx ifelse banf > my-max [ set my-max banf set max-index-list (list xxx) ] [if banf = my-max [ set max-index-list lput xxx max-index-list ]] set xxx xxx + 1 ] report one-of max-index-list ; care which possible belief is most valued, not what it's value is end to-report cultural-value [ belief ] report mean [value belief] of turtles end ; these are slow so don't call them too much to plot-culture let count-turtles count turtles set-current-plot "Stability of four initial beliefs" set-current-plot-pen "zero" plot 100 * (count turtles with [(value 0) = 0] ) / count-turtles set-current-plot-pen "one" plot 100 * (count turtles with [(value 1) = 1] ) / count-turtles set-current-plot-pen "two" plot 100 * (count turtles with [(value 2) = 2] ) / count-turtles set-current-plot-pen "three" plot 100 * (count turtles with [(value 3) = 3] ) / count-turtles end to plot-culture-histogram ; this plot was deleted from the current version of the IDE since it's not really that useful for the students ; It was more for debugging set-current-plot "Culture" set-histogram-num-bars size-of-culture ; this needs a list -- we want the average value of the max-valued value of each agent for each belief foreach belief-list [plotxy ? cultural-value ?] end ; not really a plot -- this updates the main display! But for this simulation, that kind of is a plot. to view-value ask turtles [ set heading 360 / size-of-culture * value which-belief-viewed ifelse age < years-as-child / 2 [ set color 46 ] [ ifelse age < years-as-child [ set color 26 ] [ ifelse age < drinking-age [ set color 66 ] [ ifelse age < drinking-age + (.5 * years-as-adult) [ set color 86 ] [ set color 106] ]]] ] end @#$#@#$#@ GRAPHICS-WINDOW 325 10 764 470 16 16 13.0 1 10 1 1 1 0 1 1 1 -16 16 -16 16 0 0 1 ticks CC-WINDOW 5 714 879 809 Command Center 0 BUTTON 6 10 72 43 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 81 14 144 47 NIL go 1 NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 36 81 309 114 prob-of-perception-error prob-of-perception-error 0 0 0 .01 1 not used right now HORIZONTAL SLIDER 36 117 223 150 prob-of-action-error prob-of-action-error 0 1 0.95 .01 1 NIL HORIZONTAL SLIDER 9 362 181 395 years-as-child years-as-child 0 100 10 1 1 NIL HORIZONTAL SLIDER 11 402 181 435 years-as-adolescent years-as-adolescent 0 100 0 1 1 NIL HORIZONTAL SLIDER 10 442 181 475 years-as-adult years-as-adult 0 100 30 1 1 NIL HORIZONTAL MONITOR 206 377 271 422 life span years-as-child + years-as-adolescent + years-as-adult 17 1 11 SWITCH 187 443 310 476 adults-learn? adults-learn? 0 1 -1000 SLIDER 7 531 180 564 size-of-culture size-of-culture 4 128 16 1 1 NIL HORIZONTAL SLIDER 158 614 293 647 turtles-per-patch turtles-per-patch 0 10 1 1 1 NIL HORIZONTAL TEXTBOX 12 288 307 330 The below (including to the right) are run-determined parameters. Do not change them during a run. 11 63.0 1 SLIDER 6 614 152 647 setup-memory-bias setup-memory-bias 1 100 5 1 1 NIL HORIZONTAL SLIDER 7 654 279 687 number-acts-per-agent-per-step number-acts-per-agent-per-step 1 1000 51 10 1 NIL HORIZONTAL BUTTON 148 14 219 47 NIL go 10 NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 595 477 674 510 NIL view-value NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 685 478 863 511 which-belief-viewed which-belief-viewed 0 modules-modelled - 1 1 1 1 NIL HORIZONTAL SWITCH 10 322 100 355 aging? aging? 0 1 -1000 PLOT 326 479 586 689 Stability of four initial beliefs time % agents conforming 0.0 20.0 0.0 100.0 true true PENS "zero" 1.0 0 -8053223 true "one" 1.0 0 -3844592 true "two" 1.0 0 -10899396 true "three" 1.0 0 -11881837 true BUTTON 231 14 305 47 just go go 1 T 1 T OBSERVER NIL NIL NIL NIL SWITCH 11 164 122 197 selection? selection? 1 1 -1000 SLIDER 129 164 306 197 selective-advantage selective-advantage 0 1 0.1 .05 1 NIL HORIZONTAL SLIDER 11 204 148 237 rewarded-value rewarded-value 0 size-of-culture - 1 3 1 1 NIL HORIZONTAL SLIDER 152 203 306 236 selective-belief selective-belief 0 modules-modelled - 1 0 1 1 NIL HORIZONTAL MONITOR 778 242 857 287 % capacity 100 * count turtles / (count patches * turtles-per-patch) 0 1 11 MONITOR 771 305 865 350 % true believers 100 * count turtles with [ value selective-belief = rewarded-value ] / count turtles 1 1 11 TEXTBOX 777 130 870 245 The below monitors are only applicable when selection is on. The `true' belief is the one rewarded. 11 63.0 1 SLIDER 7 569 179 602 modules-modelled modules-modelled 4 4 4 1 1 NIL HORIZONTAL TEXTBOX 594 602 814 700 If you want to view more modules, you need to edit this graph, and also edit the modules-modelled. If you aren't viewing more modules, it's silly to run them... 11 0.0 1 @#$#@#$#@ WHAT IS IT? ----------- This model was inspired by a talk by Dan Sperber, where he argued that modularity was a necessary componenent of cultural evolution, since errors needed to be biased to be recoverable from. I went down the wrong garden path and concluded that unbiased errors were in fact better, because the law of large numbers assumes the true signal would be recovered. This model looks at this. This version of the model, conformity+innovation, also allows you to see how an "innovation" spreads. You can pick one value for which the agents have a slightly higher probability of reproducing on death. This just means there are more agents near communities with this solution, not that the value is passed on directly to the children! This version is a more efficient version of the one used in Bryson AAAI 2008. HOW IT WORKS ------------ The key insight for this model is that cultural evolution, unlike biological, does not need to have its "cross-over" & inheritance event at one instant with two partners. Rather, you can gather information for rather longer. We start from the entire population having the same culture and see if it is preserved. Sliders allow you to control the probability of perception error (a single agent misperceives another's action) and action error (an agent mis-acts, so all its neighbours get that erroneous signal.) There is a fixed number of agents per patch (unless selection is on). When they die, they are replaced with utterly naive agents. There is no inheritance except cultural inheritance, and no parenting. If selection is on, then selection-bias determines the chance an agent with a "wrong" value will not be able to reproduce. If an agent with a "right" value sees a neighbour with space when it dies, it will fill that space as well as its own. HOW TO USE IT ------------- Children: Learn but don't act. Adolescents: Learn only from each other. Adults: Act and may learn (tick box.) THINGS TO NOTICE ---------------- The plot that shows the stability of beliefs over time always shows beliefs 0-3. So if you are going to play with selection, it makes sense to play with it for one of those four beliefs, so you can see the impact on stability compared to the non-selected beliefs. Remember that the original culture always supports a value equal to the belief's number, for each belief. THINGS TO TRY ------------- This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model. EXTENDING THE MODEL ------------------- This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc. NETLOGO FEATURES ---------------- This model uses two-dimensional arrays, even though NetLogo doesn't really provide a very good syntax for doing that. One-dimensional arrays with sloppy synatax are provided as an extension to NetLogo; this model assigns arrays as values of arrays, so the syntax is even worse. But it does work! RELATED MODELS -------------- See Cace & Bryson 2007 and also later Bryson work in that vein for models of the selection for cultural transmission in spatial models with finite food supplies. CREDITS AND REFERENCES ---------------------- The Sperber talk was held at the Konrad Lorenz Institute for Evolution and Cognition Research in Altenberg, Austria on 8 March 2008. The model was built from scratch by Joanna Bryson in the following two weeks. This version updated 22 September for the Cognitive Science postgraduate students visiting the KLI & the University of Vienna. Joanna J. Bryson (2008), ÒThe Role of Modularity in Stablizing Cultural Evolution: Conformity and Innovation in an Agent-Based ModelÓ, Proceedings of the Fall AAAI Symposium on Adaptive Agents in Cultural Contexts (AACC Õ08), Washington DC, to appear, October 2008. @#$#@#$#@ 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 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 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 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 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 4.0.2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ 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 @#$#@#$#@