<?xml version="1.0" encoding="utf-8"?>
<model version="NetLogo 7.0.4" snapToGrid="false">
  <code><![CDATA[globals
[
  a-site-changed?
  time-since-last-change
  ; test-output-on? Moved to switch on Interface
]

patches-own
[
  ; Patches have five "cultural feature" variables
  Var1
  Var2
  Var3
  Var4
  Var5

  mean-similarity  ; The mean similarity over four neighbor patches
]

to setup

  ca
  reset-ticks

  set test-output-on? false

  set time-since-last-change 0

  ask patches
  [
    set Var1 random 10
    set Var2 random 10
    set Var3 random 10
    set Var4 random 10
    set Var5 random 10
  ]

  if test-output-on?
  [
    if file-exists? "similarity-test-output.csv"
    [
      file-delete "similarity-test-output.csv"
      file-open "similarity-test-output.csv"
      file-print "My-var1,My-var2,My-var3,My-var4,My-var5,Their-var1,Their-var2,Their-var3,Their-var4,Their-var5,Similarity"
      file-close
    ]

    if file-exists? "update-test-output.csv"
    [
      file-delete "update-test-output.csv"
      file-open "update-test-output.csv"
      file-print "Neighbor1Similarity,Neighbor2Similarity,Neighbor3Similarity,Neighbor4Similarity,MeanSimilarity"
      file-close
    ]

    if file-exists? "interact-test-output.csv"
    [
      file-delete "update-test-output.csv"
      file-open "update-test-output.csv"
      file-print (word "Prob-interact,The-rand-number,"
        "My-var1,My-var2,My-var3,My-var4,My-var5,Their-var1,Their-var2,Their-var3,Their-var4,Their-var5,"
        "The-rand-var,New-var1,New-var2,New-var3,New-var4,New-var5")
      file-close
    ]
  ] ; if test-output-on?

  ask patches [ update-similarity ]

end


to go

  tick

  ask one-of patches [ interact ]

  ifelse a-site-changed?
  [ set time-since-last-change 0 ]
  [ set time-since-last-change time-since-last-change + 1 ]

  update-outputs

  if time-since-last-change >= 1000 [stop]

end


to interact  ; a patch procedure

  ; Create a string to hold one line of test output
  let a-test-output-string " "

  let the-neighbor one-of neighbors4

  let prob-interact similarity-with the-neighbor
  let the-rand-number random 1.0

  ; Add interaction probability and random number to test output
  if test-output-on?
  [
    set a-test-output-string (word prob-interact "," the-rand-number ",")
  ]

  ; if prob-interact is > 0.8, then you are already identical to neighbor
  ; if prob-interact is < 0.2, then prob-interact is zero and you cannot interact
  if (prob-interact < 0.9) and (prob-interact > 0.1) and (the-rand-number < prob-interact)
  [
    if test-output-on?
    [
      ; Add culture variable values of self and neighbor to output line
      set a-test-output-string (word a-test-output-string Var1 "," Var2 "," Var3 "," Var4 "," Var5 ","
      [Var1] of the-neighbor ","
      [Var2] of the-neighbor ","
      [Var3] of the-neighbor ","
      [Var4] of the-neighbor ","
      [Var5] of the-neighbor ",")
    ]

    ; Create a list containing the position (1-5) of all variables that are
    ; different between this patch and the selected neighbor
    let var-list (list)
    if (Var1 != [Var1] of the-neighbor) [set var-list fput 1 var-list]
    if (Var2 != [Var2] of the-neighbor) [set var-list fput 2 var-list]
    if (Var3 != [Var3] of the-neighbor) [set var-list fput 3 var-list]
    if (Var4 != [Var4] of the-neighbor) [set var-list fput 4 var-list]
    if (Var5 != [Var5] of the-neighbor) [set var-list fput 5 var-list]

    ; Now pick a random member of the list and modify that variable to
    ; match the neighbor's value
    let rand-var one-of var-list
    if (rand-var = 1) [set Var1 [Var1] of the-neighbor]
    if (rand-var = 2) [set Var2 [Var2] of the-neighbor]
    if (rand-var = 3) [set Var3 [Var3] of the-neighbor]
    if (rand-var = 4) [set Var4 [Var4] of the-neighbor]
    if (rand-var = 5) [set Var5 [Var5] of the-neighbor]

    set a-site-changed? true

    ; Add new culture variables to output line
    if test-output-on?
    [
      set a-test-output-string (word a-test-output-string rand-var "," Var1 "," Var2 "," Var3 "," Var4 "," Var5)
    ]

  ]

  update-similarity
  ask neighbors4 [ update-similarity ]

  if test-output-on?
  [
    file-open "interact-test-output.csv"
    file-print a-test-output-string
    file-close
  ]

end


to update-similarity   ; a patch procedure
  ; Set the patch's value of mean similarity with neighbors by summing
  ; similarity over the 4 neighbors, then dividing by 4.

  set mean-similarity 0

  ; Create a string to hold one line of test output
  let test-output-string " "

  ask neighbors4
  [
    let my-similarity similarity-with myself
    ask myself [set mean-similarity (mean-similarity + my-similarity)]
    ; Each neighbor patch adds its similarity to the output line
    set test-output-string (word test-output-string my-similarity ",")
  ]

  set mean-similarity (mean-similarity / 4)

  set pcolor scale-color red mean-similarity 0.0 1.0

  if test-output-on?
  [
    file-open "update-test-output.csv"
    file-print (word test-output-string mean-similarity)
    file-close
  ]

end

to-report similarity-with [a-patch]  ; a patch procedure

  let similarity 0.0
  if Var1 = [Var1] of a-patch [ set similarity similarity + 0.2 ]
  if Var2 = [Var2] of a-patch [ set similarity similarity + 0.2 ]
  if Var3 = [Var3] of a-patch [ set similarity similarity + 0.2 ]
  if Var4 = [Var4] of a-patch [ set similarity similarity + 0.2 ]
  if Var5 = [Var5] of a-patch [ set similarity similarity + 0.2 ]

  if test-output-on?
  [
    file-open "similarity-test-output.csv"
    file-print (word Var1 "," Var2 "," Var3 "," Var4 "," Var5 ","
      [Var1] of a-patch ","
      [Var2] of a-patch ","
      [Var3] of a-patch ","
      [Var4] of a-patch ","
      [Var5] of a-patch "," similarity)
    file-close
  ]

  report similarity

end

to update-outputs

  ; First update the line graph of mean similarity
  set-current-plot "Mean similarity of sites"
  plot mean [mean-similarity] of patches

  ; Histogram of the similarity of each patch with each of its neighbors
  ; This requires a list of all the similarity values
  ; ("histogram [([similarity-with myself] of neighbors4] of patches" does not
  ; work because it creates a list of lists instead of a big list of similarity values.)
  let a-similarity-list (list)
  ask patches
  [
    set a-similarity-list sentence a-similarity-list ([similarity-with myself] of neighbors4)
  ]
  set-current-plot "Similarity histogram"
  histogram a-similarity-list

end

to show-similarities
  ; A patch test procedure that can be executed from an Agent Monitor

  let output-string "North: "

  ifelse patch-at 0 1 = nobody
  [ set output-string (word output-string "nobody") ]
  [ set output-string (word output-string (similarity-with patch-at 0 1)) ]

  set output-string (word output-string " East: ")
  ifelse patch-at 1 0 = nobody
  [ set output-string (word output-string "nobody") ]
  [ set output-string (word output-string (similarity-with patch-at 1 0)) ]

  set output-string (word output-string " South: ")
  ifelse patch-at 0 -1 = nobody
  [ set output-string (word output-string "nobody") ]
  [ set output-string (word output-string (similarity-with patch-at 0 -1)) ]

  set output-string (word output-string " West: ")
  ifelse patch-at -1 0 = nobody
  [ set output-string (word output-string "nobody") ]
  [ set output-string (word output-string (similarity-with patch-at -1 0)) ]

  show output-string

end]]></code>
  <widgets>
    <view x="272" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="0" height="304" showTickCounter="true" patchSize="30.0" fontSize="10" wrappingAllowedY="false" width="304" tickCounterLabel="ticks" maxPycor="9" updateMode="0" maxPxcor="9" minPxcor="0"></view>
    <button x="11" y="20" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="67">setup</button>
    <button x="11" y="68" height="40" disableUntilTicks="false" forever="true" kind="Observer" width="63">go</button>
    <plot x="7" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Mean similarity" y="149" xMin="0.0" height="175" legend="false" xMax="10.0" yMin="0.0" width="230" xAxis="Tick" display="Mean similarity of sites">
      <setup></setup>
      <update></update>
      <pen interval="1.0" mode="0" display="default" color="-16777216" legend="true">
        <setup></setup>
        <update>plot count turtles</update>
      </pen>
    </plot>
    <plot x="606" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Number of site borders" y="74" xMin="0.0" height="195" legend="false" xMax="1.0" yMin="0.0" width="230" xAxis="Similarity with neighbor" display="Similarity histogram">
      <setup></setup>
      <update></update>
      <pen interval="0.2" mode="1" display="default" color="-16777216" legend="true">
        <setup></setup>
        <update>plot count turtles</update>
      </pen>
    </plot>
    <switch x="92" y="22" height="40" on="false" variable="test-output-on?" width="143" display="test-output-on?"></switch>
  </widgets>
  <info># Axelrod's 1997 Model of Dissemination of Culture
This is an implementation of the culture dissemination model described by: Axelrod R. 1997. The dissemination of culture: a model with local convergence and global polarization. Journal of Conflict Research 41: 203-226.

This version has not been tested for software errors.

Following is an ODD description developed from Axelrod (1997).

This ODD description and the NetLogo program were prepared by S. Railsback and are copyrighted 2019 by Steven Railsback and Volker Grimm as part of the instructional materials for _Agent-Based and Individual-Based Modeling 2nd edition_; see http://www.railsback-grimm-abm-book.com.

## 1. Purpose and patterns

The model’s purpose is stated as being “to show the consequences of a few simple assumptions about how people (or groups) are influenced by those around them.” These assumptions are about how people learn culture from each other and, therefore, how culture spreads and how societies influence each others’ culture. In particular, the model assumes that people or societies share culture locally, and share more with others that are more similar to themselves.

The model is abstract and not designed to explain any specific patterns observed in particular real systems, but its author states one general pattern that the model is intended to explore: that, even if peole tend to become more alike when they interact, differences in culture persist over time.

## 2. Entities, state variables, and scales

The entities in this model are agents that “can be thought of as homogeneous villages”. The villages are represented by sites (patches) on a grid.

The sites have state variables for each of five cultural “features” (characteristics). Each of these five cultural feature variables has a value that is an integer between 0 and 9. A site’s culture is defined as its set of values for the five feature variables, concatenated together as a five-digit string, e.g., 93209. 

The grid of sites is 10 × 10 patches in extent, with the space not wrapped. The distance between sites is not stated, and in fact it is not clear that the grid represents geographic space. Time is represented only by the number of “ticks” (times that the schedule is executed); each tick does not represent a specific amount of time. Model runs continue until the system is stable, defined as executing 1000 consecutive ticks with no change in site state variables. Reaching this stable end can take more than 80,000 ticks.

## 3. Process overview and scheduling

The schedule has only two actions per tick. First is a single cultural interaction of one site. On each tick, one of the 100 sites is chosen randomly, and that site then executes the cultural interaction trait described below at “Submodels”. 

The second action is to update the outputs described below at the "Observation" design concept.

## 4. Design concepts

**Basic principles:** The author states that the study is based on three principles. One is agent-based modeling, so that consequences of simple mechanisms emerge. Second is the lack of central authority, so that changes in culture arise from local interactions instead of being imposed by central authority. Third is adaptive rather than rational agents, with agents making decisions simply in response to their neighbors instead of by attempting to calculate the best choice.

**Emergence:** The key results of the model are the presence or absence of regions of different, but stable, culture. These results emerge from the adaptive trait of the village sites.

**Adaptation:** The sites adapt their culture state variables to be more similar to neighbors, using the cultural interaction submodel described below. This trait does not explicitly seek to increase a measure of site success; instead, the trait seems to implicitly assume that being more like a neighbor in culture is better. 

**Objectives:** This concept is not relevant because the adaptive trait for cultural interaction does not seek a specific objective.

**Learning, prediction:** These concepts are not used.

**Sensing:** Village sites are assumed able to sense the culture variables of the neighbor sites that they interact with. Sites are assumed to simply know their neighbor’s variable values.

**Interaction:** The model represents one kind of interaction: spreading of culture. These are direct interactions, with the culture of one site directly affecting the culture of another.

**Stochasticity:** Random processes are used to initialize the model (see “Initialization” below), presumably so that simulations start with no pattern of cultural similarity among neighbors. The cultural interaction trait is highly stochastic, with random choice of which site acts each tick, which neighbor it interacts with, and which cultural variable it changes. The reason why these processes were made stochastic was not provided, but presumably it was to minimize the level of mechanistic detail in the model.

**Collectives:** This model does not include collectives. Regions of culturally similar sites do emerge, but these regions do not affect the individual sites (because sites are affected only by neighbor sites).

**Observation:** Because this model is about the spread and similarity of culture, the key results from the model are not the values of the sites’ culture variables but how similar these variables are over the grid of sites. In Axelrod's original implementation, these results were observed via a “map of cultural similarities” that displayed the borders among sites, shaded from black between highly dissimilar sites to white between sites with identical culture variables. (Calculation of cultural similarity is explained below at “Submodels”.)  This map therefore displayed the boundaries between regions within which culture is similar or identical. 

In this NetLogo implementation, cultural similarity is observed via three outputs. First is by shading each site (patch) by the mean similarity of the site it represents with its neighboring sites. This mean similarity for a patch is the mean of the patch's cultural similarity with all the neighbors it can potentially interact with (see the cultural interaction submodel below). Patch color is shaded from black to white as mean cultural similarity ranges from 0.0 to 1.0. It is critical to understand that mean similarity values greater than zero and less than 1.0 often result from similarity values of 0.0 with some neighbors and values of 1.0 with the other neighbors, while no neighbors have intermediate similarity.

The second similarity output is a plot of mean similarity over all patches: the mean, over all patches, of the mean similarity with all neighbors. This value ranges from 0.0 to 1.0 and approaches 1.0 as the variability among sites in culture disappears.

The third similarity output is a histogram of the similarity values of all borders among sites. The histogram includes one value for each border of each patch, that value being the cultural similarity between the patch and the patch adjacent at the border.

## 5. Initialization

The model is initialized by setting the five culture variables of each site to a random digit between 0 and 9. (This method was implied but not stated explicitly by Axelrod 1997.)

## 6. Input data

The model uses no input data.

## 7. Submodels

The single submodel is the trait a site uses to interact culturally with a neighbor site. It has these steps (“the site” refers to the patch executing this trait):

1.    Randomly select one neighbor site to interact with. These “neighbors” are the four (or fewer, for sites on the edge of the grid) sites to the north, east, south, and west. 

2.    Calculate the “cultural similarity” between the site and the selected neighbor. Cultural similarity is the fraction of the five culture variables for which both sites have the same value. For example, if the cultures of the site and its neighbor are 64892 and 16852 then their similarity is 0.4 (two of the five digits are the same). 

3.    Decide whether to interact with the neighbor. This decision is made randomly with the probability of interacting equal to the cultural similarity calculated in step 2. Hence, if culture similarity is zero, the sites never interact. If the sites are already similar (cultural similarity of 0.6 to 1.0), they are likely to interact.

4.    If there is an interaction with the neighbor, randomly select one of the culture variables for which the site and its neighbor differ, and set the site’s value to that of its neighbor. For example, a site and its neighbor could have cultures of 64892 and 16852 before the interaction and 66892 and 16852 after it.</info>
  <turtleShapes>
    <shape name="default" rotatable="true" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="5"></point>
        <point x="40" y="250"></point>
        <point x="150" y="205"></point>
        <point x="260" y="250"></point>
      </polygon>
    </shape>
    <shape name="airplane" rotatable="true" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="0"></point>
        <point x="135" y="15"></point>
        <point x="120" y="60"></point>
        <point x="120" y="105"></point>
        <point x="15" y="165"></point>
        <point x="15" y="195"></point>
        <point x="120" y="180"></point>
        <point x="135" y="240"></point>
        <point x="105" y="270"></point>
        <point x="120" y="285"></point>
        <point x="150" y="270"></point>
        <point x="180" y="285"></point>
        <point x="210" y="270"></point>
        <point x="165" y="240"></point>
        <point x="180" y="180"></point>
        <point x="285" y="195"></point>
        <point x="285" y="165"></point>
        <point x="180" y="105"></point>
        <point x="180" y="60"></point>
        <point x="165" y="15"></point>
      </polygon>
    </shape>
    <shape name="arrow" rotatable="true" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="0"></point>
        <point x="0" y="150"></point>
        <point x="105" y="150"></point>
        <point x="105" y="293"></point>
        <point x="195" y="293"></point>
        <point x="195" y="150"></point>
        <point x="300" y="150"></point>
      </polygon>
    </shape>
    <shape name="box" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="285"></point>
        <point x="285" y="225"></point>
        <point x="285" y="75"></point>
        <point x="150" y="135"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="135"></point>
        <point x="15" y="75"></point>
        <point x="150" y="15"></point>
        <point x="285" y="75"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="15" y="75"></point>
        <point x="15" y="225"></point>
        <point x="150" y="285"></point>
        <point x="150" y="135"></point>
      </polygon>
      <line endX="150" startY="285" marked="false" color="255" endY="135" startX="150"></line>
      <line endX="15" startY="135" marked="false" color="255" endY="75" startX="150"></line>
      <line endX="285" startY="135" marked="false" color="255" endY="75" startX="150"></line>
    </shape>
    <shape name="bug" rotatable="true" editableColorIndex="0">
      <circle x="96" y="182" marked="true" color="-1920102913" diameter="108" filled="true"></circle>
      <circle x="110" y="127" marked="true" color="-1920102913" diameter="80" filled="true"></circle>
      <circle x="110" y="75" marked="true" color="-1920102913" diameter="80" filled="true"></circle>
      <line endX="80" startY="100" marked="true" color="-1920102913" endY="30" startX="150"></line>
      <line endX="220" startY="100" marked="true" color="-1920102913" endY="30" startX="150"></line>
    </shape>
    <shape name="butterfly" rotatable="true" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="165"></point>
        <point x="209" y="199"></point>
        <point x="225" y="225"></point>
        <point x="225" y="255"></point>
        <point x="195" y="270"></point>
        <point x="165" y="255"></point>
        <point x="150" y="240"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="165"></point>
        <point x="89" y="198"></point>
        <point x="75" y="225"></point>
        <point x="75" y="255"></point>
        <point x="105" y="270"></point>
        <point x="135" y="255"></point>
        <point x="150" y="240"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="139" y="148"></point>
        <point x="100" y="105"></point>
        <point x="55" y="90"></point>
        <point x="25" y="90"></point>
        <point x="10" y="105"></point>
        <point x="10" y="135"></point>
        <point x="25" y="180"></point>
        <point x="40" y="195"></point>
        <point x="85" y="194"></point>
        <point x="139" y="163"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="162" y="150"></point>
        <point x="200" y="105"></point>
        <point x="245" y="90"></point>
        <point x="275" y="90"></point>
        <point x="290" y="105"></point>
        <point x="290" y="135"></point>
        <point x="275" y="180"></point>
        <point x="260" y="195"></point>
        <point x="215" y="195"></point>
        <point x="162" y="165"></point>
      </polygon>
      <polygon color="255" filled="true" marked="false">
        <point x="150" y="255"></point>
        <point x="135" y="225"></point>
        <point x="120" y="150"></point>
        <point x="135" y="120"></point>
        <point x="150" y="105"></point>
        <point x="165" y="120"></point>
        <point x="180" y="150"></point>
        <point x="165" y="225"></point>
      </polygon>
      <circle x="135" y="90" marked="false" color="255" diameter="30" filled="true"></circle>
      <line endX="195" startY="105" marked="false" color="255" endY="60" startX="150"></line>
      <line endX="105" startY="105" marked="false" color="255" endY="60" startX="150"></line>
    </shape>
    <shape name="car" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="300" y="180"></point>
        <point x="279" y="164"></point>
        <point x="261" y="144"></point>
        <point x="240" y="135"></point>
        <point x="226" y="132"></point>
        <point x="213" y="106"></point>
        <point x="203" y="84"></point>
        <point x="185" y="63"></point>
        <point x="159" y="50"></point>
        <point x="135" y="50"></point>
        <point x="75" y="60"></point>
        <point x="0" y="150"></point>
        <point x="0" y="165"></point>
        <point x="0" y="225"></point>
        <point x="300" y="225"></point>
        <point x="300" y="180"></point>
      </polygon>
      <circle x="180" y="180" marked="false" color="255" diameter="90" filled="true"></circle>
      <circle x="30" y="180" marked="false" color="255" diameter="90" filled="true"></circle>
      <polygon color="255" filled="true" marked="false">
        <point x="162" y="80"></point>
        <point x="132" y="78"></point>
        <point x="134" y="135"></point>
        <point x="209" y="135"></point>
        <point x="194" y="105"></point>
        <point x="189" y="96"></point>
        <point x="180" y="89"></point>
      </polygon>
      <circle x="47" y="195" marked="true" color="-1920102913" diameter="58" filled="true"></circle>
      <circle x="195" y="195" marked="true" color="-1920102913" diameter="58" filled="true"></circle>
    </shape>
    <shape name="circle" rotatable="false" editableColorIndex="0">
      <circle x="0" y="0" marked="true" color="-1920102913" diameter="300" filled="true"></circle>
    </shape>
    <shape name="circle 2" rotatable="false" editableColorIndex="0">
      <circle x="0" y="0" marked="true" color="-1920102913" diameter="300" filled="true"></circle>
      <circle x="30" y="30" marked="false" color="255" diameter="240" filled="true"></circle>
    </shape>
    <shape name="cow" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="200" y="193"></point>
        <point x="197" y="249"></point>
        <point x="179" y="249"></point>
        <point x="177" y="196"></point>
        <point x="166" y="187"></point>
        <point x="140" y="189"></point>
        <point x="93" y="191"></point>
        <point x="78" y="179"></point>
        <point x="72" y="211"></point>
        <point x="49" y="209"></point>
        <point x="48" y="181"></point>
        <point x="37" y="149"></point>
        <point x="25" y="120"></point>
        <point x="25" y="89"></point>
        <point x="45" y="72"></point>
        <point x="103" y="84"></point>
        <point x="179" y="75"></point>
        <point x="198" y="76"></point>
        <point x="252" y="64"></point>
        <point x="272" y="81"></point>
        <point x="293" y="103"></point>
        <point x="285" y="121"></point>
        <point x="255" y="121"></point>
        <point x="242" y="118"></point>
        <point x="224" y="167"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="73" y="210"></point>
        <point x="86" y="251"></point>
        <point x="62" y="249"></point>
        <point x="48" y="208"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="25" y="114"></point>
        <point x="16" y="195"></point>
        <point x="9" y="204"></point>
        <point x="23" y="213"></point>
        <point x="25" y="200"></point>
        <point x="39" y="123"></point>
      </polygon>
    </shape>
    <shape name="cylinder" rotatable="false" editableColorIndex="0">
      <circle x="0" y="0" marked="true" color="-1920102913" diameter="300" filled="true"></circle>
    </shape>
    <shape name="dot" rotatable="false" editableColorIndex="0">
      <circle x="90" y="90" marked="true" color="-1920102913" diameter="120" filled="true"></circle>
    </shape>
    <shape name="face happy" rotatable="false" editableColorIndex="0">
      <circle x="8" y="8" marked="true" color="-1920102913" diameter="285" filled="true"></circle>
      <circle x="60" y="75" marked="false" color="255" diameter="60" filled="true"></circle>
      <circle x="180" y="75" marked="false" color="255" diameter="60" filled="true"></circle>
      <polygon color="255" filled="true" marked="false">
        <point x="150" y="255"></point>
        <point x="90" y="239"></point>
        <point x="62" y="213"></point>
        <point x="47" y="191"></point>
        <point x="67" y="179"></point>
        <point x="90" y="203"></point>
        <point x="109" y="218"></point>
        <point x="150" y="225"></point>
        <point x="192" y="218"></point>
        <point x="210" y="203"></point>
        <point x="227" y="181"></point>
        <point x="251" y="194"></point>
        <point x="236" y="217"></point>
        <point x="212" y="240"></point>
      </polygon>
    </shape>
    <shape name="face neutral" rotatable="false" editableColorIndex="0">
      <circle x="8" y="7" marked="true" color="-1920102913" diameter="285" filled="true"></circle>
      <circle x="60" y="75" marked="false" color="255" diameter="60" filled="true"></circle>
      <circle x="180" y="75" marked="false" color="255" diameter="60" filled="true"></circle>
      <rectangle endX="240" startY="195" marked="false" color="255" endY="225" startX="60" filled="true"></rectangle>
    </shape>
    <shape name="face sad" rotatable="false" editableColorIndex="0">
      <circle x="8" y="8" marked="true" color="-1920102913" diameter="285" filled="true"></circle>
      <circle x="60" y="75" marked="false" color="255" diameter="60" filled="true"></circle>
      <circle x="180" y="75" marked="false" color="255" diameter="60" filled="true"></circle>
      <polygon color="255" filled="true" marked="false">
        <point x="150" y="168"></point>
        <point x="90" y="184"></point>
        <point x="62" y="210"></point>
        <point x="47" y="232"></point>
        <point x="67" y="244"></point>
        <point x="90" y="220"></point>
        <point x="109" y="205"></point>
        <point x="150" y="198"></point>
        <point x="192" y="205"></point>
        <point x="210" y="220"></point>
        <point x="227" y="242"></point>
        <point x="251" y="229"></point>
        <point x="236" y="206"></point>
        <point x="212" y="183"></point>
      </polygon>
    </shape>
    <shape name="fish" rotatable="false" editableColorIndex="0">
      <polygon color="-1" filled="true" marked="false">
        <point x="44" y="131"></point>
        <point x="21" y="87"></point>
        <point x="15" y="86"></point>
        <point x="0" y="120"></point>
        <point x="15" y="150"></point>
        <point x="0" y="180"></point>
        <point x="13" y="214"></point>
        <point x="20" y="212"></point>
        <point x="45" y="166"></point>
      </polygon>
      <polygon color="-1" filled="true" marked="false">
        <point x="135" y="195"></point>
        <point x="119" y="235"></point>
        <point x="95" y="218"></point>
        <point x="76" y="210"></point>
        <point x="46" y="204"></point>
        <point x="60" y="165"></point>
      </polygon>
      <polygon color="-1" filled="true" marked="false">
        <point x="75" y="45"></point>
        <point x="83" y="77"></point>
        <point x="71" y="103"></point>
        <point x="86" y="114"></point>
        <point x="166" y="78"></point>
        <point x="135" y="60"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="30" y="136"></point>
        <point x="151" y="77"></point>
        <point x="226" y="81"></point>
        <point x="280" y="119"></point>
        <point x="292" y="146"></point>
        <point x="292" y="160"></point>
        <point x="287" y="170"></point>
        <point x="270" y="195"></point>
        <point x="195" y="210"></point>
        <point x="151" y="212"></point>
        <point x="30" y="166"></point>
      </polygon>
      <circle x="215" y="106" marked="false" color="255" diameter="30" filled="true"></circle>
    </shape>
    <shape name="flag" rotatable="false" editableColorIndex="0">
      <rectangle endX="75" startY="15" marked="true" color="-1920102913" endY="300" startX="60" filled="true"></rectangle>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="90" y="150"></point>
        <point x="270" y="90"></point>
        <point x="90" y="30"></point>
      </polygon>
      <line endX="90" startY="135" marked="true" color="-1920102913" endY="135" startX="75"></line>
      <line endX="90" startY="45" marked="true" color="-1920102913" endY="45" startX="75"></line>
    </shape>
    <shape name="flower" rotatable="false" editableColorIndex="0">
      <polygon color="1504722175" filled="true" marked="false">
        <point x="135" y="120"></point>
        <point x="165" y="165"></point>
        <point x="180" y="210"></point>
        <point x="180" y="240"></point>
        <point x="150" y="300"></point>
        <point x="165" y="300"></point>
        <point x="195" y="240"></point>
        <point x="195" y="195"></point>
        <point x="165" y="135"></point>
      </polygon>
      <circle x="85" y="132" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="130" y="147" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="192" y="85" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="85" y="40" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="177" y="40" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="177" y="132" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="70" y="85" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="130" y="25" marked="true" color="-1920102913" diameter="38" filled="true"></circle>
      <circle x="96" y="51" marked="true" color="-1920102913" diameter="108" filled="true"></circle>
      <circle x="113" y="68" marked="false" color="255" diameter="74" filled="true"></circle>
      <polygon color="1504722175" filled="true" marked="false">
        <point x="189" y="233"></point>
        <point x="219" y="188"></point>
        <point x="249" y="173"></point>
        <point x="279" y="188"></point>
        <point x="234" y="218"></point>
      </polygon>
      <polygon color="1504722175" filled="true" marked="false">
        <point x="180" y="255"></point>
        <point x="150" y="210"></point>
        <point x="105" y="210"></point>
        <point x="75" y="240"></point>
        <point x="135" y="240"></point>
      </polygon>
    </shape>
    <shape name="house" rotatable="false" editableColorIndex="0">
      <rectangle endX="255" startY="120" marked="true" color="-1920102913" endY="285" startX="45" filled="true"></rectangle>
      <rectangle endX="180" startY="210" marked="false" color="255" endY="285" startX="120" filled="true"></rectangle>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="15" y="120"></point>
        <point x="150" y="15"></point>
        <point x="285" y="120"></point>
      </polygon>
      <line endX="270" startY="120" marked="false" color="255" endY="120" startX="30"></line>
    </shape>
    <shape name="leaf" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="210"></point>
        <point x="135" y="195"></point>
        <point x="120" y="210"></point>
        <point x="60" y="210"></point>
        <point x="30" y="195"></point>
        <point x="60" y="180"></point>
        <point x="60" y="165"></point>
        <point x="15" y="135"></point>
        <point x="30" y="120"></point>
        <point x="15" y="105"></point>
        <point x="40" y="104"></point>
        <point x="45" y="90"></point>
        <point x="60" y="90"></point>
        <point x="90" y="105"></point>
        <point x="105" y="120"></point>
        <point x="120" y="120"></point>
        <point x="105" y="60"></point>
        <point x="120" y="60"></point>
        <point x="135" y="30"></point>
        <point x="150" y="15"></point>
        <point x="165" y="30"></point>
        <point x="180" y="60"></point>
        <point x="195" y="60"></point>
        <point x="180" y="120"></point>
        <point x="195" y="120"></point>
        <point x="210" y="105"></point>
        <point x="240" y="90"></point>
        <point x="255" y="90"></point>
        <point x="263" y="104"></point>
        <point x="285" y="105"></point>
        <point x="270" y="120"></point>
        <point x="285" y="135"></point>
        <point x="240" y="165"></point>
        <point x="240" y="180"></point>
        <point x="270" y="195"></point>
        <point x="240" y="210"></point>
        <point x="180" y="210"></point>
        <point x="165" y="195"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="135" y="195"></point>
        <point x="135" y="240"></point>
        <point x="120" y="255"></point>
        <point x="105" y="255"></point>
        <point x="105" y="285"></point>
        <point x="135" y="285"></point>
        <point x="165" y="240"></point>
        <point x="165" y="195"></point>
      </polygon>
    </shape>
    <shape name="line" rotatable="true" editableColorIndex="0">
      <line endX="150" startY="0" marked="true" color="-1920102913" endY="300" startX="150"></line>
    </shape>
    <shape name="line half" rotatable="true" editableColorIndex="0">
      <line endX="150" startY="0" marked="true" color="-1920102913" endY="150" startX="150"></line>
    </shape>
    <shape name="pentagon" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="15"></point>
        <point x="15" y="120"></point>
        <point x="60" y="285"></point>
        <point x="240" y="285"></point>
        <point x="285" y="120"></point>
      </polygon>
    </shape>
    <shape name="person" rotatable="false" editableColorIndex="0">
      <circle x="110" y="5" marked="true" color="-1920102913" diameter="80" filled="true"></circle>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="105" y="90"></point>
        <point x="120" y="195"></point>
        <point x="90" y="285"></point>
        <point x="105" y="300"></point>
        <point x="135" y="300"></point>
        <point x="150" y="225"></point>
        <point x="165" y="300"></point>
        <point x="195" y="300"></point>
        <point x="210" y="285"></point>
        <point x="180" y="195"></point>
        <point x="195" y="90"></point>
      </polygon>
      <rectangle endX="172" startY="79" marked="true" color="-1920102913" endY="94" startX="127" filled="true"></rectangle>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="195" y="90"></point>
        <point x="240" y="150"></point>
        <point x="225" y="180"></point>
        <point x="165" y="105"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="105" y="90"></point>
        <point x="60" y="150"></point>
        <point x="75" y="180"></point>
        <point x="135" y="105"></point>
      </polygon>
    </shape>
    <shape name="plant" rotatable="false" editableColorIndex="0">
      <rectangle endX="165" startY="90" marked="true" color="-1920102913" endY="300" startX="135" filled="true"></rectangle>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="135" y="255"></point>
        <point x="90" y="210"></point>
        <point x="45" y="195"></point>
        <point x="75" y="255"></point>
        <point x="135" y="285"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="165" y="255"></point>
        <point x="210" y="210"></point>
        <point x="255" y="195"></point>
        <point x="225" y="255"></point>
        <point x="165" y="285"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="135" y="180"></point>
        <point x="90" y="135"></point>
        <point x="45" y="120"></point>
        <point x="75" y="180"></point>
        <point x="135" y="210"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="165" y="180"></point>
        <point x="165" y="210"></point>
        <point x="225" y="180"></point>
        <point x="255" y="120"></point>
        <point x="210" y="135"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="135" y="105"></point>
        <point x="90" y="60"></point>
        <point x="45" y="45"></point>
        <point x="75" y="105"></point>
        <point x="135" y="135"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="165" y="105"></point>
        <point x="165" y="135"></point>
        <point x="225" y="105"></point>
        <point x="255" y="45"></point>
        <point x="210" y="60"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="135" y="90"></point>
        <point x="120" y="45"></point>
        <point x="150" y="15"></point>
        <point x="180" y="45"></point>
        <point x="165" y="90"></point>
      </polygon>
    </shape>
    <shape name="sheep" rotatable="false" editableColorIndex="0">
      <rectangle endX="180" startY="225" marked="true" color="-1920102913" endY="285" startX="151" filled="true"></rectangle>
      <rectangle endX="75" startY="225" marked="true" color="-1920102913" endY="285" startX="47" filled="true"></rectangle>
      <rectangle endX="210" startY="75" marked="true" color="-1920102913" endY="225" startX="15" filled="true"></rectangle>
      <circle x="135" y="75" marked="true" color="-1920102913" diameter="150" filled="true"></circle>
      <circle x="165" y="76" marked="false" color="255" diameter="116" filled="true"></circle>
    </shape>
    <shape name="square" rotatable="false" editableColorIndex="0">
      <rectangle endX="270" startY="30" marked="true" color="-1920102913" endY="270" startX="30" filled="true"></rectangle>
    </shape>
    <shape name="square 2" rotatable="false" editableColorIndex="0">
      <rectangle endX="270" startY="30" marked="true" color="-1920102913" endY="270" startX="30" filled="true"></rectangle>
      <rectangle endX="240" startY="60" marked="false" color="255" endY="240" startX="60" filled="true"></rectangle>
    </shape>
    <shape name="star" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="151" y="1"></point>
        <point x="185" y="108"></point>
        <point x="298" y="108"></point>
        <point x="207" y="175"></point>
        <point x="242" y="282"></point>
        <point x="151" y="216"></point>
        <point x="59" y="282"></point>
        <point x="94" y="175"></point>
        <point x="3" y="108"></point>
        <point x="116" y="108"></point>
      </polygon>
    </shape>
    <shape name="target" rotatable="false" editableColorIndex="0">
      <circle x="0" y="0" marked="true" color="-1920102913" diameter="300" filled="true"></circle>
      <circle x="30" y="30" marked="false" color="255" diameter="240" filled="true"></circle>
      <circle x="60" y="60" marked="true" color="-1920102913" diameter="180" filled="true"></circle>
      <circle x="90" y="90" marked="false" color="255" diameter="120" filled="true"></circle>
      <circle x="120" y="120" marked="true" color="-1920102913" diameter="60" filled="true"></circle>
    </shape>
    <shape name="tree" rotatable="false" editableColorIndex="0">
      <circle x="118" y="3" marked="true" color="-1920102913" diameter="94" filled="true"></circle>
      <rectangle endX="180" startY="195" marked="false" color="-1653716737" endY="300" startX="120" filled="true"></rectangle>
      <circle x="65" y="21" marked="true" color="-1920102913" diameter="108" filled="true"></circle>
      <circle x="116" y="41" marked="true" color="-1920102913" diameter="127" filled="true"></circle>
      <circle x="45" y="90" marked="true" color="-1920102913" diameter="120" filled="true"></circle>
      <circle x="104" y="74" marked="true" color="-1920102913" diameter="152" filled="true"></circle>
    </shape>
    <shape name="triangle" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="30"></point>
        <point x="15" y="255"></point>
        <point x="285" y="255"></point>
      </polygon>
    </shape>
    <shape name="triangle 2" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="150" y="30"></point>
        <point x="15" y="255"></point>
        <point x="285" y="255"></point>
      </polygon>
      <polygon color="255" filled="true" marked="false">
        <point x="151" y="99"></point>
        <point x="225" y="223"></point>
        <point x="75" y="224"></point>
      </polygon>
    </shape>
    <shape name="truck" rotatable="false" editableColorIndex="0">
      <rectangle endX="195" startY="45" marked="true" color="-1920102913" endY="187" startX="4" filled="true"></rectangle>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="296" y="193"></point>
        <point x="296" y="150"></point>
        <point x="259" y="134"></point>
        <point x="244" y="104"></point>
        <point x="208" y="104"></point>
        <point x="207" y="194"></point>
      </polygon>
      <rectangle endX="195" startY="60" marked="false" color="-1" endY="105" startX="195" filled="true"></rectangle>
      <polygon color="255" filled="true" marked="false">
        <point x="238" y="112"></point>
        <point x="252" y="141"></point>
        <point x="219" y="141"></point>
        <point x="218" y="112"></point>
      </polygon>
      <circle x="234" y="174" marked="false" color="255" diameter="42" filled="true"></circle>
      <rectangle endX="214" startY="185" marked="true" color="-1920102913" endY="194" startX="181" filled="true"></rectangle>
      <circle x="144" y="174" marked="false" color="255" diameter="42" filled="true"></circle>
      <circle x="24" y="174" marked="false" color="255" diameter="42" filled="true"></circle>
      <circle x="24" y="174" marked="true" color="-1920102913" diameter="42" filled="false"></circle>
      <circle x="144" y="174" marked="true" color="-1920102913" diameter="42" filled="false"></circle>
      <circle x="234" y="174" marked="true" color="-1920102913" diameter="42" filled="false"></circle>
    </shape>
    <shape name="turtle" rotatable="true" editableColorIndex="0">
      <polygon color="1504722175" filled="true" marked="false">
        <point x="215" y="204"></point>
        <point x="240" y="233"></point>
        <point x="246" y="254"></point>
        <point x="228" y="266"></point>
        <point x="215" y="252"></point>
        <point x="193" y="210"></point>
      </polygon>
      <polygon color="1504722175" filled="true" marked="false">
        <point x="195" y="90"></point>
        <point x="225" y="75"></point>
        <point x="245" y="75"></point>
        <point x="260" y="89"></point>
        <point x="269" y="108"></point>
        <point x="261" y="124"></point>
        <point x="240" y="105"></point>
        <point x="225" y="105"></point>
        <point x="210" y="105"></point>
      </polygon>
      <polygon color="1504722175" filled="true" marked="false">
        <point x="105" y="90"></point>
        <point x="75" y="75"></point>
        <point x="55" y="75"></point>
        <point x="40" y="89"></point>
        <point x="31" y="108"></point>
        <point x="39" y="124"></point>
        <point x="60" y="105"></point>
        <point x="75" y="105"></point>
        <point x="90" y="105"></point>
      </polygon>
      <polygon color="1504722175" filled="true" marked="false">
        <point x="132" y="85"></point>
        <point x="134" y="64"></point>
        <point x="107" y="51"></point>
        <point x="108" y="17"></point>
        <point x="150" y="2"></point>
        <point x="192" y="18"></point>
        <point x="192" y="52"></point>
        <point x="169" y="65"></point>
        <point x="172" y="87"></point>
      </polygon>
      <polygon color="1504722175" filled="true" marked="false">
        <point x="85" y="204"></point>
        <point x="60" y="233"></point>
        <point x="54" y="254"></point>
        <point x="72" y="266"></point>
        <point x="85" y="252"></point>
        <point x="107" y="210"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="119" y="75"></point>
        <point x="179" y="75"></point>
        <point x="209" y="101"></point>
        <point x="224" y="135"></point>
        <point x="220" y="225"></point>
        <point x="175" y="261"></point>
        <point x="128" y="261"></point>
        <point x="81" y="224"></point>
        <point x="74" y="135"></point>
        <point x="88" y="99"></point>
      </polygon>
    </shape>
    <shape name="wheel" rotatable="false" editableColorIndex="0">
      <circle x="3" y="3" marked="true" color="-1920102913" diameter="294" filled="true"></circle>
      <circle x="30" y="30" marked="false" color="255" diameter="240" filled="true"></circle>
      <line endX="150" startY="285" marked="true" color="-1920102913" endY="15" startX="150"></line>
      <line endX="285" startY="150" marked="true" color="-1920102913" endY="150" startX="15"></line>
      <circle x="120" y="120" marked="true" color="-1920102913" diameter="60" filled="true"></circle>
      <line endX="79" startY="40" marked="true" color="-1920102913" endY="269" startX="216"></line>
      <line endX="269" startY="84" marked="true" color="-1920102913" endY="221" startX="40"></line>
      <line endX="269" startY="216" marked="true" color="-1920102913" endY="79" startX="40"></line>
      <line endX="221" startY="40" marked="true" color="-1920102913" endY="269" startX="84"></line>
    </shape>
    <shape name="x" rotatable="false" editableColorIndex="0">
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="270" y="75"></point>
        <point x="225" y="30"></point>
        <point x="30" y="225"></point>
        <point x="75" y="270"></point>
      </polygon>
      <polygon color="-1920102913" filled="true" marked="true">
        <point x="30" y="75"></point>
        <point x="75" y="30"></point>
        <point x="270" y="225"></point>
        <point x="225" y="270"></point>
      </polygon>
    </shape>
  </turtleShapes>
  <linkShapes>
    <shape name="default" curviness="0.0">
      <lines>
        <line x="-0.2" visible="false">
          <dash value="0.0"></dash>
          <dash value="1.0"></dash>
        </line>
        <line x="0.0" visible="true">
          <dash value="1.0"></dash>
          <dash value="0.0"></dash>
        </line>
        <line x="0.2" visible="false">
          <dash value="0.0"></dash>
          <dash value="1.0"></dash>
        </line>
      </lines>
      <indicator>
        <shape name="link direction" rotatable="true" editableColorIndex="0">
          <line endX="90" startY="150" marked="true" color="-1920102913" endY="180" startX="150"></line>
          <line endX="210" startY="150" marked="true" color="-1920102913" endY="180" startX="150"></line>
        </shape>
      </indicator>
    </shape>
  </linkShapes>
  <previewCommands>setup repeat 75 [ go ]</previewCommands>
</model>
