Language Change
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
A model of language change over an area of space. Patches reprsent speakers, and their language is coded as their color.
HOW IT WORKS
Each tick, each patch mutates its own language by MUTATION-RATE and tries to talk to NUM-INTERACTIONS other patches around it. If the language of a patch it tries to talk to is within THRESHOLD-OF-INTELLIGIBILITY percent of the maximum distance, it succeeds, and both patches move their language closer together by the lexical distance between them times INFLUENCE-FACTOR.
HOW TO USE IT
"setup-uniform" makes all patches have the same random language. "setup-random" makes all patches have different random languages. "setup-contact" makes the left side of the landscape have one language and the right side have another; how far apart they can be is determined by the CONTACT-MAX-DISTANCE slider.
Other than that, play around with sliders and see what happens.
THINGS TO NOTICE
If NUMBER-OF-ATTRIBUTES is not 3, the way the color is represented will change, and so the display will change pretty radically. I don't recommend moving this slider for this reason.
Many of the measures are dependent on THRESHOLD-OF-INTELLIGIBILITY. If any patch can understand any other patch, it's no surprise that every patch can understand all its neighbors.
The sides of the landscape do not wrap.
THINGS TO TRY
Play with MUTATION-RATE and INFLUENCE-FACTOR and see how they interact. Also, the effect of NUM-INTERACTIONS and THRESHOLD-OF-INTELLIGIBILITY isn't very well represented by the charts but is fairly clear if you mess with them yourself.
Try playing with SPREAD-OBSTACLE-WITH-MOUSE. The black patches it produces do not talk to other languages and essentially act like walls. What happens when you isolate a small region? What happens when you divide the landscape in half? In quarters?
RELATED MODELS
Although it's not related directly, the Hotellier's Law, Rumor Mill, and Voting models are all space-control models like this one. Also, there is a Language Change model in the model library but the implementation is radically different from this one.
CREDITS AND REFERENCES
At the Modelling Commons: http://modelingcommons.org/account/models/1511
by Brian Bowyer for EECS 372, taught by Prof. Uri Wilensky
Comments and Questions
globals [ distances average-language most-distinctive distance-between-edges avg-intelligible-neighbors ;distinct-languages max-possible-distance ] patches-own[ language ;;list with three numbers ] to-report distance-between-languages [lang1 lang2] let squares (map [(?2 - ?1) ^ 2] lang2 lang1) report sqrt (sum squares) end to-report is-obstacle? [lang] ifelse (sum lang) < 0 [report true] [report false] end to-report compute-max-possible-distance report distance-between-languages (n-values number-of-attributes [0]) (n-values number-of-attributes [255]) end to-report intelligible-dist ;computes maximum intelligible distance report ((threshold-of-intelligibility + 0.0001) / 100) * max-possible-distance end to-report compute-average-language let languages [language] of patches let simplified_mean mean (map mean languages) report first [language] of patches with-min [abs((mean language) - simplified_mean)] end to-report compute-distance-between-edges let max-language first [language] of patches with-max [mean language] let min-language first [language] of patches with-min [mean language] report distance-between-languages max-language min-language end to-report most-average [languages] let simplified map mean languages let sl map [abs((mean ?1) - mean simplified)] languages let min_sl min sl report item (position min_sl sl) languages end to-report intelligible-to-average report (count patches with [distance-between-languages average-language language < intelligible-dist])/(count patches) * 100 end to-report compute-most-distinctive report first [language] of patches with-max [distance-between-languages language average-language] end to-report distinctiveness ;distinctiveness = distance between the average and the furthest edge of the distribution of languages report distance-between-languages most-distinctive average-language end to-report unintelligible? [a b] ;method written relatively late: many times in code I do the check directly instead of calling this function report ((distance-between-languages a b) > intelligible-dist) end to-report distinct-languages ;this method runs very slowly and should be not be called every tick, particularly on a very non-uniform set of languages let languages [language] of patches let lang-list (list average-language) set languages (filter [unintelligible? average-language ?] languages) while [not empty? languages] [ let new-lang most-average languages set lang-list fput new-lang lang-list set languages (filter [unintelligible? new-lang ?] languages) ] report lang-list end to-report compute-avg-intelligible-neighbors report mean [count intelligible-neighbors] of patches end to update-metrics ;this procedure exists to avoid having multiple outside calls to an expensive reporter per tick set average-language compute-average-language set most-distinctive compute-most-distinctive set distance-between-edges compute-distance-between-edges set avg-intelligible-neighbors compute-avg-intelligible-neighbors end to setup-uniform ca let starting-language (n-values number-of-attributes [random 255]) ask patches [ set language starting-language reset-patch-color ] set max-possible-distance compute-max-possible-distance update-metrics reset-ticks end to setup-random ca ask patches [ set language (n-values number-of-attributes [random 255]) reset-patch-color ] set max-possible-distance compute-max-possible-distance update-metrics reset-ticks end to setup-contact ca let lang_1 (n-values number-of-attributes [random 255]) let lang_2 map [? + random contact-max-distance] lang_1 let divider 0 ask patches [ ifelse pxcor > divider [ set language lang_1] [ set language lang_2] reset-patch-color ] set max-possible-distance compute-max-possible-distance update-metrics reset-ticks end to spread-obstacle-with-mouse if mouse-down? [ ask patch mouse-xcor mouse-ycor [ set language (n-values number-of-attributes [-1]) reset-patch-color ] display ] end to go ask patches [ mutate-self talk-to-neighbors reset-patch-color ] update-metrics tick end ;; ;;patch procedures ;; to-report scaled-color [lang] let not-negative (max (list lang 0)) let squished (min (list not-negative 255)) report 0 + squished end to-report intelligible-neighbors report neighbors with [not (unintelligible? language [language] of myself)] end to reset-patch-color if is-obstacle? language [ set pcolor black stop] ifelse length language = 3 [ let new-color map scaled-color language ;show language ;show new-color set pcolor new-color stop ] [ set pcolor scaled-color mean language stop ] end to mutate-self if is-obstacle? language [stop] ;;don't mutate obstacles let new-language (list) foreach language [ set new-language lput (min list 255 (max list 0 (? + ((random-float (mutation-rate) ) * (one-of (list 1 -1)))))) new-language ] set language new-language end to talk-to-neighbors let possible-neighbors patches with [distance myself <= speech-radius] let num-possible-neighbors (length sort possible-neighbors) ask n-of (min (list num-interactions num-possible-neighbors)) possible-neighbors [ if is-obstacle? language or is-obstacle? [language] of myself [ stop] ;;don't talk to obstacles talk-crawl myself ] end to talk-average [target] if not (distance-between-languages language ([language] of target) < threshold-of-intelligibility) [stop] ;;don't talk if the languages are too unrelated let mean-language mean (list language [language] of target) set language mean-language ask target [set language mean-language] end ;move-towards1 moves lang1 towards lang2 ;move-towards2 moves lang2 towards lang1 ;they're two different procedures because you can't return two values from a procedure ;without some kludge like bundling the values into a list, or having two almost identical procedures to-report move-towards1 [lang1 lang2 influence] let new-lang1 (list) (foreach lang1 lang2 [ ifelse (?1 > ?2) [ set new-lang1 lput (max (list (?1 - influence) ?2 0)) new-lang1] [ set new-lang1 lput (min (list (?1 + influence) ?2 255)) new-lang1] ]) report new-lang1 end to-report move-towards2 [lang1 lang2 influence] let new-lang2 (list) (foreach lang1 lang2 [ ifelse (?1 > ?2) [ set new-lang2 lput (min (list (?2 + influence) ?1 255)) new-lang2] [ set new-lang2 lput (max (list (?2 - influence) ?1 0)) new-lang2] ]) report new-lang2 end to talk-crawl [target] ;named talk-crawl because of a procedure I took out called talk-average ;this one, in contrast to that one, moves ("crawls") towards the target language instead of averaging their languages let target-language [language] of target let dist (distance-between-languages language target-language) if dist > intelligible-dist [stop] ;; don't talk if the languages are too unrelated let influence dist * (influence-factor / 100) ;divided by 100 so I get at states that don't behave like high influence-factor does set language move-towards1 language target-language influence ask target [set language move-towards2 ([language] of myself) language influence] end
There are 4 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
BrianBowyer_June1.doc | word | Progress update for June 1st. | almost 9 years ago, by Brian Bowyer | Download |
BrianBowyer_May18.doc | word | Progress update for May 18th. | almost 9 years ago, by Brian Bowyer | Download |
BrianBowyer_May25.doc | word | Progress update for May 25th. | almost 9 years ago, by Brian Bowyer | Download |
Final Project Report.pdf | Final Paper | almost 9 years ago, by Brian Bowyer | Download | |
Language Change.png | preview | Preview for 'Language Change' | almost 9 years ago, by Brian Bowyer | Download |
Poster - Language Change.pdf | poster | almost 9 years ago, by Brian Bowyer | Download | |
Poster Session Slides.odp | powerpoint | Poster Session Slides - Original File Format | almost 9 years ago, by Brian Bowyer | Download |
Poster Session Slides.pdf | Poster Session Slides - PDF | almost 9 years ago, by Brian Bowyer | Download |
This model does not have any ancestors.
This model does not have any descendants.