extensions [ sound ] breed [ songs song ] breed [ syllables syllable ] breed [ balloons balloon ] breed [ frontrows frontrow ] songs-own [ positions ;; list of positions fitness mistakes stored-color ] syllables-own [ start-time ] globals [ correct-song-syllables correct-song-notes correct-song-durations correct-song-positions headerturtle winner ;; song that currently has the best solution fewest-mistakes ] to setup clear-all set correct-song-syllables ["On" "The" "Ori-" "" " " "gin" "of" "Species," "" " " "what" "a" "good" "" " " "book" "you" "wrote," "" " " "We" "re-" "mem-" "" " " "ber" "you" "Dar" "" " " "win," "and" "your" "birth-" "" " " "day" "we" "" " " "note!" "" " " ] set correct-song-notes [0 0 2 -3 -7 0 5 4 -2 -12 0 0 2 -2 -12 0 7 5 -3 -7 0 0 12 -3 -7 9 5 4 -2 -7 2 10 10 9 -3 -7 5 7 -2 -12 5 -3 -7 ] set correct-song-positions [0 3 4 4 4 8 12 16 16 16 24 27 28 28 28 32 36 40 40 40 48 51 52 52 52 56 60 64 64 64 68 76 79 80 80 80 84 88 88 88 92 92 92] set correct-song-durations [3 1 4 12 12 4 4 8 12 12 3 1 4 12 12 4 4 8 12 12 3 1 4 12 12 4 4 4 16 16 8 3 1 4 8 8 4 4 4 4 8 12 12] ask patches with [ pxcor > 27 ] [ set pcolor white ] create-turtles 1 [ set headerturtle self setxy 16 max-pycor - 0.3 set label "\"Fittest\" song in the initial population of random songs:" set size 0 set label-color sky + 1.5 st ] create-turtles 1 [ setxy max-pxcor min-pycor set label "--------------- no mistakes --------------- " set size 0 set label-color sky st ] create-turtles 1 [ setxy max-pxcor max-pycor - 0.3 set label "--------------- all mistakes -------------- " set size 0 set label-color sky st ] set-default-shape songs "music song" create-songs population-size [ set positions n-values (length correct-song-positions) [random 93] calculate-fitness position-song ] update-display play-music? false do-plotting end to go if (count turtles = 1) [ stop ] if [fitness] of winner = 0 [ if (play-music?) [ celebrate-victory ] stop ] create-next-generation tick ask headerturtle [ set label (word "\"Fittest\" song in the population at generation # " ticks ":") ] update-display (play-music? and ticks mod play-music-every = 0) false do-plotting end to celebrate-victory update-display true false ask headerturtle [ set label "ONCE MORE, WITH CONFIDENCE!" set heading 90 bk 3 repeat round (world-width / 24 * 100) [ fd 0.04 display ] ] let prev-instrument instrument if (use-random-instruments?) [ set instrument "BRIGHT ACOUSTIC PIANO" ] update-display true true set instrument prev-instrument wait 5 reset end to reset ask turtles with [ self != headerturtle ] [ die ] ask headerturtle [ set label "Press \"Start/Restart\" to run again." ] end to update-display [ with-music? with-balloons?] set winner min-one-of songs [fitness] set fewest-mistakes min [mistakes] of songs ask syllables [ die ] ask winner [ (foreach positions correct-song-positions correct-song-syllables correct-song-durations [ hatch-syllables 1 [ set start-time ?1 set xcor 1 + (?1 mod 24) if (?1 > 74) [ set xcor xcor - 4 ] if (xcor = 4) [ set xcor xcor - 0.5 ] set ycor world-height - 2.5 - 2.5 * floor (?1 / 24) set label word ?3 " " ifelse (?4 < 4) [ set shape "music notes 3" ] [ set shape "music notes 2" ] if (?3 = "") ; chord part 1 [ set ycor ycor - 0.75 set shape "music bass note 1" ] if (?3 = " ") ; chord part 2 [ set ycor ycor - 0.75 set shape "music bass note 2" ] set size 0.8 ifelse (?1 = ?2) [ set color magenta ] [ set color gray ] set label-color gray set xcor xcor + 1 st ] ]) display ] if (with-music?) [ ask winner [ hatch-frontrows 1 [ set shape [shape] of myself set size 2.5 ] ] ask songs [ set stored-color color ;set color lput 40 (extract-rgb color) ; make transparent set color scale-color color 8 0 10 ] if (use-random-instruments? and not with-balloons?) [ set instrument one-of get-reasonable-instrument-list ] ifelse (with-balloons?) [ play-music 0.9 127 true ] [ play-music music-tempo 60 false ] ask frontrows [ die ] ask songs [ set color stored-color ] ] end to play-music [ the-tempo volume with-balloons? ] play-song the-tempo volume 57 [positions] of winner reset-timer let delay ((max [positions] of winner) / the-tempo * 1 / 8 ) + 1.5 ; print word "waiting " delay if (with-balloons?) [ repeat 10 [ make-balloon ]] while [ timer < delay ] [ ask syllables [ if (start-time / the-tempo * 1 / 8) < timer [ set label-color white ] ] if (with-balloons?) [ if (random 5 = 0) [ make-balloon ] ask balloons [ fd 0.1 rt random 8 lt random 8 if (heading < 180 and heading > 45) [ set heading 45 ] if (heading < 315 and heading > 180) [ set heading 315 ] ] ] display wait 0.1 ] ; wait delay end to make-balloon create-balloons 1 [ setxy random-xcor min-pycor - 0.4 set heading random 30 - random 30 set shape "balloon" set size 2.8 carefully [ ; for earlier NetLogo versions, which don't support transparency. set color lput 128 extract-rgb color ] [ ] ] end to position-song set xcor (28 + ((sum positions) / 16) mod 12) set ycor 0.5 + (world-height - 1.8) * (mistakes / (length correct-song-notes)) if (count songs with [ color = [color] of myself ] > (count songs / 2)) [ set color one-of base-colors ] if (size != 1) [ set size 1] end ;; ===== Generating Solutions ;; Each solution has its "fitness score" calculated. ;; Lower scores are "more fit", since we're measuring error ;; The lower a fitness score, the more likely that this solution ;; will be chosen to reproduce and create offspring solutions ;; in the next generation. ;; to calculate-fitness ;; song procedure set mistakes sum (map [ ifelse-value (?1 = ?2) [ 0 ] [ 1 ] ] positions correct-song-positions) set fitness sum (map [ ln (1 + (?1 - ?2) * (?1 - ?2)) ] positions correct-song-positions) end ;; This procedure does the main work of the genetic algorithm. ;; We start with the old generation of solutions. ;; We choose solutions with good fitness to produce offspring ;; through crossover (sexual recombination), and to be cloned ;; (asexual reproduction) into the next generation. ;; There is also a chance of mutation occurring in each individual. ;; After a full new generation of solutions has been created, ;; the old generation dies. to create-next-generation ; The following line of code looks a bit odd, so we'll explain it. ; if we simply wrote "LET OLD-GENERATION SONGS", ; then OLD-GENERATION would mean the set of all songs, and when ; new solutions were created, they would be added to the breed, and ; OLD-GENERATION would also grow. Since we don't want it to grow, ; we instead write "SONGS WITH [TRUE]", which makes OLD-GENERATION ; an agentset, which doesn't get updated when new solutions are created. let old-generation songs with [true] ; Some number of the population is created by crossover each generation ; we divide by 2 because each time through the loop we create two children. let crossover-count (floor (population-size * crossover-rate / 100 / 2)) repeat crossover-count [ ; We use "tournament selection", with tournament size = 3. ; This means, we randomly pick 3 solutions from the previous generation ; and select the best one of those 3 to reproduce. let parent1 min-one-of (n-of 3 old-generation) [fitness] let parent2 min-one-of (n-of 3 old-generation) [fitness] let child-positions-pair crossover ([positions] of parent1) ([positions] of parent2) ; create the two children, with their new genetic material ask parent1 [ hatch 1 [ set positions item 0 child-positions-pair ] ] ask parent2 [ hatch 1 [ set positions item 1 child-positions-pair ] ] ] ; the remainder of the population is created by cloning ; selected members of the previous generation repeat (population-size - crossover-count * 2) [ ask max-one-of (n-of 3 old-generation) [fitness] [ hatch 1 ] ] ask old-generation [ die ] ; now we're just talking to the new generation of solutions here ask songs [ ; there's a chance of mutations occurring mutate ; finally we update the fitness value for this solution calculate-fitness position-song ] end ;; ===== Mutations ;; This reporter performs one-point crossover on two lists of bits. ;; That is, it chooses a random location for a splitting point. ;; Then it reports two new lists, using that splitting point, ;; by combining the first part of bits1 with the second part of bits2 ;; and the first part of bits2 with the second part of bits1; ;; it puts together the first part of one list with the second part of ;; the other. to-report crossover [bits1 bits2] let split-point 1 + random (length bits1 - 1) report list (sentence (sublist bits1 0 split-point) (sublist bits2 split-point length bits2)) (sentence (sublist bits2 0 split-point) (sublist bits1 split-point length bits1)) end to mutate ;; song procedure set positions map [ifelse-value (random-float 100.0 < mutation-rate) [(? + random 10 - random 10) mod 93] [?]] positions end ;; ====== Plotting to do-plotting let fitness-list [fitness] of songs let best-fitness min fitness-list let avg-fitness mean fitness-list let worst-fitness max fitness-list set-current-plot "Population Fitness Plot" set-current-plot-pen "avg" plot avg-fitness set-current-plot-pen "best" plot best-fitness set-current-plot-pen "worst" plot worst-fitness end to play-song [ the-tempo volume transpose assigned-positions ] (foreach correct-song-notes assigned-positions correct-song-durations [ note the-tempo volume (?1 + transpose) ?2 ?3 ]) end to note [ the-tempo volume pitch pos duration ] sound:play-note-later (pos / the-tempo * 1 / 8) instrument pitch volume (duration * 1 / 8) / the-tempo end to birthday-song let velocity 100 let transpose 57 set correct-song-notes [0 0 2 -3 -7 0 5 4 -2 -12 0 0 2 -2 -12 0 7 5 -3 -7 0 0 12 -3 -7 9 5 4 -2 -7 2 10 10 9 -3 -7 5 7 -2 -12 5 -3 -7 ] set correct-song-positions [0 3 4 4 4 8 12 16 16 16 24 27 28 28 28 32 36 40 40 40 48 51 52 52 52 56 60 64 64 64 68 76 79 80 80 80 84 88 88 88 92 92 92] set correct-song-durations [3 1 4 12 12 4 4 8 12 12 3 1 4 12 12 4 4 8 12 12 3 1 4 12 12 4 4 4 16 16 8 3 1 4 8 8 4 4 4 4 8 12 12] (foreach correct-song-notes correct-song-positions correct-song-durations [ note music-tempo 127 ?1 + transpose ?2 ?3 ]) end ; only give back instruments that are semi-reasonable to-report get-reasonable-instrument-list report ["ACOUSTIC GRAND PIANO" "BRIGHT ACOUSTIC PIANO" "ELECTRIC GRAND PIANO" "HONKY-TONK PIANO" "ELECTRIC PIANO 1" "ELECTRIC PIANO 2" "HARPSICHORD" "CLAVI" "CELESTA" "GLOCKENSPIEL" "MUSIC BOX" "VIBRAPHONE" "MARIMBA" "XYLOPHONE" "TUBULAR BELLS" "DULCIMER" "DRAWBAR ORGAN" "PERCUSSIVE ORGAN" "ROCK ORGAN" "CHURCH ORGAN" "REED ORGAN" "ACCORDION" "HARMONICA" "TANGO ACCORDION" "NYLON STRING GUITAR" "STEEL ACOUSTIC GUITAR" "JAZZ ELECTRIC GUITAR" "CLEAN ELECTRIC GUITAR" "MUTED ELECTRIC GUITAR" "OVERDRIVEN GUITAR" "DISTORTION GUITAR" "GUITAR HARMONICS" "ACOUSTIC BASS" "FINGERED ELECTRIC BASS" "PICKED ELECTRIC BASS" "FRETLESS BASS" "SLAP BASS 1" "SLAP BASS 2" "SYNTH BASS 1" "SYNTH BASS 2" "VIOLIN" "VIOLA" "CELLO" "CONTRABASS" "TREMOLO STRINGS" "PIZZICATO STRINGS" "ORCHESTRAL HARP" "TIMPANI" "STRING ENSEMBLE 1" "STRING ENSEMBLE 2" "SYNTH STRINGS 1" "SYNTH STRINGS 2" "CHOIR AAHS" "VOICE OOHS" "SYNTH VOICE" "ORCHESTRA HIT" "TRUMPET" "TROMBONE" "TUBA" "MUTED TRUMPET" "FRENCH HORN" "BRASS SECTION" "SYNTH BRASS 1" "SYNTH BRASS 2" "SOPRANO SAX" "ALTO SAX" "TENOR SAX" "BARITONE SAX" "OBOE" "ENGLISH HORN" "BASSOON" "CLARINET" "PICCOLO" "FLUTE" "RECORDER" "PAN FLUTE" "BLOWN BOTTLE" "SHAKUHACHI" "WHISTLE" "OCARINA" "SQUARE WAVE" "SAWTOOTH WAVE" "CALLIOPE" "CHIFF" "CHARANG" "VOICE" "FIFTHS" "BASS AND LEAD" "NEW AGE" "WARM" "POLYSYNTH" "CHOIR" "BOWED" "METAL" "HALO" "SWEEP" "RAIN" ;"SOUNDTRACK" "CRYSTAL" "ATMOSPHERE" "BRIGHTNESS" ;"GOBLINS" "ECHOES" "SCI-FI" "SITAR" "BANJO" "SHAMISEN" "KOTO" "KALIMBA" "BAG PIPE" "FIDDLE" "SHANAI" "TINKLE BELL" "AGOGO" "STEEL DRUMS" "WOODBLOCK" "TAIKO DRUM" "MELODIC TOM" ;"SYNTH DRUM" "REVERSE CYMBAL" ;"GUITAR FRET NOISE" "BREATH NOISE" "SEASHORE" ;"BIRD TWEET" "TELEPHONE RING" "HELICOPTER" "APPLAUSE" "GUNSHOT" ] end @#$#@#$#@ GRAPHICS-WINDOW 5 10 958 317 -1 -1 23.0 1 12 1 1 1 0 0 0 1 0 40 0 11 1 1 1 ticks BUTTON 15 405 185 438 Evolve the songs! go T 1 T OBSERVER NIL NIL NIL NIL BUTTON 15 365 185 398 Start / Restart setup NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 15 465 187 498 population-size population-size 5 1000 500 5 1 NIL HORIZONTAL PLOT 665 370 943 520 Population Fitness Plot generation # error amount 0.0 30.0 0.0 101.0 true true PENS "worst" 1.0 0 -7500403 true "avg" 1.0 0 -14454117 true "best" 1.0 0 -7858858 true SLIDER 15 545 187 578 mutation-rate mutation-rate 0 10 1.5 0.1 1 % HORIZONTAL SLIDER 15 505 187 538 crossover-rate crossover-rate 0 100 70 1 1 % HORIZONTAL SLIDER 355 545 595 578 music-tempo music-tempo 0 2 1.2 0.1 1 NIL HORIZONTAL MONITOR 715 525 900 578 fewest mistakes fewest-mistakes 0 1 13 SWITCH 400 365 546 398 play-music? play-music? 0 1 -1000 CHOOSER 355 460 595 505 instrument instrument "ACOUSTIC GRAND PIANO" "BRIGHT ACOUSTIC PIANO" "ELECTRIC GRAND PIANO" "HONKY-TONK PIANO" "ELECTRIC PIANO 1" "ELECTRIC PIANO 2" "HARPSICHORD" "CLAVI" "CELESTA" "GLOCKENSPIEL" "MUSIC BOX" "VIBRAPHONE" "MARIMBA" "XYLOPHONE" "TUBULAR BELLS" "DULCIMER" "DRAWBAR ORGAN" "PERCUSSIVE ORGAN" "ROCK ORGAN" "CHURCH ORGAN" "REED ORGAN" "ACCORDION" "HARMONICA" "TANGO ACCORDION" "NYLON STRING GUITAR" "STEEL ACOUSTIC GUITAR" "JAZZ ELECTRIC GUITAR" "CLEAN ELECTRIC GUITAR" "MUTED ELECTRIC GUITAR" "OVERDRIVEN GUITAR" "DISTORTION GUITAR" "GUITAR HARMONICS" "ACOUSTIC BASS" "FINGERED ELECTRIC BASS" "PICKED ELECTRIC BASS" "FRETLESS BASS" "SLAP BASS 1" "SLAP BASS 2" "SYNTH BASS 1" "SYNTH BASS 2" "VIOLIN" "VIOLA" "CELLO" "CONTRABASS" "TREMOLO STRINGS" "PIZZICATO STRINGS" "ORCHESTRAL HARP" "TIMPANI" "STRING ENSEMBLE 1" "STRING ENSEMBLE 2" "SYNTH STRINGS 1" "SYNTH STRINGS 2" "CHOIR AAHS" "VOICE OOHS" "SYNTH VOICE" "ORCHESTRA HIT" "TRUMPET" "TROMBONE" "TUBA" "MUTED TRUMPET" "FRENCH HORN" "BRASS SECTION" "SYNTH BRASS 1" "SYNTH BRASS 2" "SOPRANO SAX" "ALTO SAX" "TENOR SAX" "BARITONE SAX" "OBOE" "ENGLISH HORN" "BASSOON" "CLARINET" "PICCOLO" "FLUTE" "RECORDER" "PAN FLUTE" "BLOWN BOTTLE" "SHAKUHACHI" "WHISTLE" "OCARINA" "SQUARE WAVE" "SAWTOOTH WAVE" "CALLIOPE" "CHIFF" "CHARANG" "VOICE" "FIFTHS" "BASS AND LEAD" "NEW AGE" "WARM" "POLYSYNTH" "CHOIR" "BOWED" "METAL" "HALO" "SWEEP" "RAIN" "SOUNDTRACK" "CRYSTAL" "ATMOSPHERE" "BRIGHTNESS" "GOBLINS" "ECHOES" "SCI-FI" "SITAR" "BANJO" "SHAMISEN" "KOTO" "KALIMBA" "BAG PIPE" "FIDDLE" "SHANAI" "TINKLE BELL" "AGOGO" "STEEL DRUMS" "WOODBLOCK" "TAIKO DRUM" "MELODIC TOM" "SYNTH DRUM" "REVERSE CYMBAL" "GUITAR FRET NOISE" "BREATH NOISE" "SEASHORE" "BIRD TWEET" "TELEPHONE RING" "HELICOPTER" "APPLAUSE" "GUNSHOT" 12 SWITCH 355 510 595 543 use-random-instruments? use-random-instruments? 1 1 -1000 SLIDER 360 405 600 438 play-music-every play-music-every 1 50 20 1 1 generations HORIZONTAL TEXTBOX 195 375 325 395 <-- (click this first) 13 94.0 1 TEXTBOX 195 415 325 433 <-- (then click this) 13 94.0 1 TEXTBOX 75 320 320 346 Correct musical notes are shown in purple. 11 123.0 1 TEXTBOX 320 320 495 338 Mistakes are shown in gray. 11 3.0 1 TEXTBOX 740 320 890 338 population-level view 11 0.0 1 @#$#@#$#@ WHAT IS IT? ----------- This model demonstrates a genetic algorithm evolving a correct version of the "Happy Birthday", as seems an appropriate way to honor Darwin on the event of his birthday. Genetic algorithms (GAs) are a biologically-inspired computer science technique that combines notions from Mendelian genetics and Darwinian evolution to search for good solutions to a given problem. The GA works by generating a random population of solutions to a problem, evaluating those solutions and then using cloning, recombination (crossover) and mutation to create new solutions to the problem. HOW IT WORKS ------------ To start with, songs are randomly generated. Each song contains all of the pieces of "Happy Birthday", but they are randomly temporally located, rather than in their correct locations to make the familiar tune. These randomly generated songs are interbred to create a new generation of songs, wherein songs are more likely to be chosen for breeding if they are more "fit" (closer to correct) than the other songs in the population. Fitness is measured by both the number and severity of the "mistakes" that a song has, when compared to the correct version. For more information about how genetic algorithms work in general, see the "Simple Genetic Algorithm" model in the NetLogo Models Library. HOW TO USE IT ------------- Press the SETUP button to create an initial random population of solutions. Press the STEP button to have one new generation created from the old generation. Press the GO button to have the genetic algorithm run until a solution has been found. Genetic Algorithm Parameters: The POPULATION-SIZE slider controls the number of songs that are present in each generation. The CROSSOVER-RATE slider controls what percent of each new generation is created through sexual reproduction (recombination or crossover between two parents' genetic material), and what percent (100 - CROSSOVER-RATE) is created through asexual reproduction (cloning of one parent's genetic material). The MUTATION-RATE slider controls the percent chance of mutation. This chance controls the likelihood that each note of the song will be randomly moved to a nearby (temporal) location. Music Parameters: If you don't want to hear any music, but just watch the visual representations of the song, turn the PLAY-MUSIC? switch off. Using the PLAY-EVERY slider, you can control how often (in generations) you get to listen to the fittest song in the population. You can choose a specific instrument to have the song played with using the INSTRUMENT chooser. If you set the PLAY-RANDOM-INSTRUMENT? switch to ON, then the instrument will be chosen randomly each time the song is played. The MUSIC-TEMPO slider determines the tempo at which the music will be played. The FITNESS PLOT is used to show the best, average, and worst fitness values of the solutions at each generation. The current population of songs is displayed in the right part of the view, where songs with more mistakes are placed closer to the top of the view, and songs with fewer mistakes are placed closer to the bottom. Songs are placed horizontally such that songs that have similar genetic material are often placed closer together. Also, the number of mistakes in the song that has the fewest mistakes, from the current generation, is shown in the FEWEST MISTAKES monitor. Note that the song with the fewest mistakes may NOT be the same as the "fittest" song, since fitness takes into account both the number of mistakes and the severity of the mistakes (i.e. how far away from the correct location a note is being played). RELATED MODELS -------------- Simple Genetic Algorithm Sound Machine CREDITS AND REFERENCES ---------------------- There is some question as to the precise origin of the "Happy Birthday" lyrics which apparently appeared in the late 19th century or early 20th century and were copyrighted in 1935 by Jessica Hill, though the copyright is currently held by Time Warner, and probably won't expire until 2030. To avoid any concerns of copyright infringement, I wrote some new alternate lyrics to substitute in place of the traditional Happy Birthday lyrics. The melody for Happy Birthday is currently in the public domain. @#$#@#$#@ 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 balloon true 5 Circle -10899396 true true 75 15 150 Line -7500403 false 150 180 150 195 Line -7500403 false 150 195 135 225 Line -7500403 false 135 225 135 240 Line -7500403 false 135 240 150 270 Line -7500403 false 150 270 180 285 Polygon -10899396 true true 150 165 135 180 165 180 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 music bass note 1 false 0 Rectangle -7500403 true true 120 60 135 285 Polygon -7500403 true true 180 30 201 32 223 38 236 49 240 58 240 63 236 71 223 81 201 88 180 90 160 88 138 82 124 71 120 62 120 58 124 49 138 38 159 32 music bass note 2 false 0 Polygon -7500403 true true 180 120 201 122 223 128 236 139 240 148 240 153 236 161 223 171 201 178 180 180 160 178 138 172 124 161 120 152 120 148 124 139 138 128 159 122 Rectangle -7500403 true true 120 150 135 285 music notes 1 false 0 Polygon -7500403 true true 75 210 96 212 118 218 131 229 135 238 135 243 131 251 118 261 96 268 75 270 55 268 33 262 19 251 15 242 15 238 19 229 33 218 54 212 Rectangle -7500403 true true 120 90 135 255 Polygon -7500403 true true 225 165 246 167 268 173 281 184 285 193 285 198 281 206 268 216 246 223 225 225 205 223 183 217 169 206 165 197 165 193 169 184 183 173 204 167 Polygon -7500403 true true 120 60 120 105 285 45 285 0 Rectangle -7500403 true true 270 15 285 195 music notes 2 false 0 Polygon -7500403 true true 135 195 156 197 178 203 191 214 195 223 195 228 191 236 178 246 156 253 135 255 115 253 93 247 79 236 75 227 75 223 79 214 93 203 114 197 Rectangle -7500403 true true 180 30 195 225 music notes 3 false 0 Polygon -7500403 true true 135 195 156 197 178 203 191 214 195 223 195 228 191 236 178 246 156 253 135 255 115 253 93 247 79 236 75 227 75 223 79 214 93 203 114 197 Rectangle -7500403 true true 180 30 195 225 Polygon -7500403 true true 194 66 210 80 242 93 271 94 293 84 301 68 269 69 238 60 213 46 197 34 193 30 music song false 0 Rectangle -7500403 true true 59 142 74 247 Polygon -7500403 true true 60 139 60 154 135 124 135 109 Circle -7500403 true true 27 230 34 Circle -7500403 true true 40 230 34 Rectangle -7500403 true true 42 230 58 264 Rectangle -7500403 true true 120 116 135 221 Rectangle -7500403 true true 101 205 117 239 Circle -7500403 true true 101 205 34 Circle -7500403 true true 87 205 34 Rectangle -7500403 true true 212 50 228 180 Polygon -7500403 true true 209 50 231 50 241 61 254 71 267 74 281 70 278 85 257 88 246 83 232 76 217 61 217 49 217 52 Circle -7500403 true true 188 155 40 Circle -7500403 true true 179 155 40 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.1beta2pre2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ 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 @#$#@#$#@ 1 @#$#@#$#@