;; SMALL MODEL 6 x 6 ;; LARGE MODEL 280 X 180 ;; MEDIUM MODEL 160 X 90 ;; slider variables - alpha beta gamma GridModel? globals[avg_steps rounds steps totalDistance score tx ty bx by boundary? nx ny newspace? object max_rounds memory gridWidth gridHeight currentX currentY bestX bestY numberOfObjects totalObjectsVisited object0x object0y object1x object1y object2x object2y object3x object3y object4x object4y object5x object5y ;; MODEL 0 GRID DATA x0y5 x1y5 x2y5 x3y5 x4y5 x5y5 x0y4 x1y4 x2y4 x3y4 x4y4 x5y4 x0y3 x1y3 x2y3 x3y3 x4y3 x5y3 x0y2 x1y2 x2y2 x3y2 x4y2 x5y2 x0y1 x1y1 x2y1 x3y1 x4y1 x5y1 x0y0 x1y0 x2y0 x3y0 x4y0 x5y0 ;; MODEL 0 GRID DATA for Exploration Test 1 E1x0y5 E1x1y5 E1x2y5 E1x3y5 E1x4y5 E1x5y5 E1x0y4 E1x1y4 E1x2y4 E1x3y4 E1x4y4 E1x5y4 E1x0y3 E1x1y3 E1x2y3 E1x3y3 E1x4y3 E1x5y3 E1x0y2 E1x1y2 E1x2y2 E1x3y2 E1x4y2 E1x5y2 E1x0y1 E1x1y1 E1x2y1 E1x3y1 E1x4y1 E1x5y1 E1x0y0 E1x1y0 E1x2y0 E1x3y0 E1x4y0 E1x5y0 ;; MODEL 0 GRID DATA for Exploration Test 2 E2x0y5 E2x1y5 E2x2y5 E2x3y5 E2x4y5 E2x5y5 E2x0y4 E2x1y4 E2x2y4 E2x3y4 E2x4y4 E2x5y4 E2x0y3 E2x1y3 E2x2y3 E2x3y3 E2x4y3 E2x5y3 E2x0y2 E2x1y2 E2x2y2 E2x3y2 E2x4y2 E2x5y2 E2x0y1 E2x1y1 E2x2y1 E2x3y1 E2x4y1 E2x5y1 E2x0y0 E2x1y0 E2x2y0 E2x3y0 E2x4y0 E2x5y0 ;; MODEL 0 GRID DATA for Exploration Test 3 E3x0y5 E3x1y5 E3x2y5 E3x3y5 E3x4y5 E3x5y5 E3x0y4 E3x1y4 E3x2y4 E3x3y4 E3x4y4 E3x5y4 E3x0y3 E3x1y3 E3x2y3 E3x3y3 E3x4y3 E3x5y3 E3x0y2 E3x1y2 E3x2y2 E3x3y2 E3x4y2 E3x5y2 E3x0y1 E3x1y1 E3x2y1 E3x3y1 E3x4y1 E3x5y1 E3x0y0 E3x1y0 E3x2y0 E3x3y0 E3x4y0 E3x5y0 done? ;;object? nearby totalExploreSteps1 totalExploreSteps2 totalExploreSteps3 totalExplorePatches1 totalExplorePatches2 totalExplorePatches3 open1 open2 open3 ] turtles-own[objectsDisutilityList objectsVisitedList objx objy targ_x targ_y bestTarget firstx firsty distanceFromFirst lastX lastY] patches-own[gridX gridY stepCount cost object? visitedPenalty footStep explorePatchUsed? ] to setup clear-all set gridWidth (max-pxcor + 1) set gridHeight (max-pycor + 1) set nearby moore-offsets 1 ask patches [ set gridX (pxcor) set gridY (pycor) set stepCount 0 set visitedPenalty 0 set footStep 0] set memory (n-values gridWidth[n-values gridHeight[0]]) set max_rounds 100 set rounds 0 newround ;set numberOfObjects 10 ;; Set the number of objects to the number represented in the field setup-turtle end to newround ct set numberOfObjects 5 set object0x 0 set object0y 1 set object1x 1 set object1y 4 set object2x 2 set object2y 2 set object3x 4 set object3y 1 set object4x 5 set object4y 4 set steps 0 set totalDistance 0 set object 0 ;set object? false set boundary? false set newspace? false ;import-pcolors "human.gif" ask patches [ set pcolor (4 + (random-float 1.5)) ] ask patch-at object0x object0y [set pcolor black set object? true] ask patch-at object1x object1y [set pcolor black set object? true] ask patch-at object2x object2y [set pcolor black set object? true] ask patch-at object3x object3y [set pcolor black set object? true] ask patch-at object4x object4y [set pcolor black set object? true] cct 1 [ setxy min-pxcor max-pycor set score 0 set color blue] ask turtle 0 [ask patch-here [set footStep footStep + 1]] cct 1 [ setxy object0x object0y set shape "cylinder" set color yellow] cct 1 [ setxy object1x object1y set shape "cylinder" set color yellow] cct 1 [ setxy object2x object2y set shape "cylinder" set color yellow] cct 1 [ setxy object3x object3y set shape "cylinder" set color yellow] cct 1 [ setxy object4x object4y set shape "cylinder" set color yellow] end to setup-turtle ask turtle 0 [ set objectsDisutilityList (n-values numberOfObjects[0]) set objectsVisitedList (n-values numberOfObjects[0]) set totalObjectsVisited 0 set targ_x 0 set targ_y 0 set bestTarget 0 ] end ;; GO FUNCTION // TWO VERSIONS - Grid + Adjacency search and Path + Target search to go calc-path-cost-grid useEnergyPlusMemoryHeuristic-neighborSearch if (done? = true) [ ;; Three Explorations Tests ask turtle 0 [setxy 0 4] exploration-test 1 object4x object4y object3x object3y object0x object0y collectGridData-for-Exploration-Test 1 ask turtle 0 [setxy 0 4] exploration-test 2 object2x object2y object1x object1y object4x object4y collectGridData-for-Exploration-Test 2 ask turtle 0 [setxy 0 4] exploration-test 3 object3x object3y object0x object0y object1x object1y collectGridData-for-Exploration-Test 3 ] end to optimalRoutes let i 0 set totalObjectsVisited 0 while [ i < numberOfObjects][ ask turtle 0 [ let start_x xcor let start_y ycor set targ_x 0.0 set targ_y 0.0 set bestTarget 0 ;; rule out objects that have already been visited ;; choose the object the has the lowest disutility, pulling out its index in the list ;; set first object id THIS IS THE OBJECT THAT THE AGENT WILL RETURN TO AS IT IS FINISHING ITS TOUR ifelse (totalObjectsVisited = 0) [set bestTarget 0 set targ_x object0x set targ_y object0y set firstx targ_x set firsty targ_y] [ set bestTarget i run "set targ_x object" + bestTarget + "x" run "set targ_y object" + bestTarget + "y" ] while [(xcor != targ_x) or (ycor != targ_y)] [ facexy targ_x targ_y fd 1 ;; precision coordinates used to check if the agent is at the target - if not, she stays at here exact previous trajectory/location ;; this avoids rounding errors and indirect paths let tempx xcor let tempy ycor setxy (precision xcor 0) (precision ycor 0) ;; place the agent at the center of their current patch if (xcor != targ_x and ycor != targ_y) [set xcor tempx set ycor tempy] record-a-step if (totalObjectsVisited != 0) [set steps steps + 1] ] setxy targ_x targ_y ;; make sure they are there if (totalObjectsVisited != 0) [set totalDistance (totalDistance + distancexy start_x start_y)] set pcolor green ;; set the object patch green set ObjectsVisitedList (replace-item bestTarget ObjectsVisitedList 1) run "ask (patch object" + bestTarget + "x object" + bestTarget + "y) [set visitedPenalty PENALTY]" set totalObjectsVisited totalObjectsVisited + 1 if (totalObjectsVisited = numberOfObjects) [ let last_x xcor let last_y ycor set targ_x firstx set targ_y firsty while [(xcor != targ_x) or (ycor != targ_y)] [ facexy targ_x targ_y fd 1 let tempx xcor let tempy ycor setxy (precision xcor 0) (precision ycor 0) ;; place the agent at the center of their current patch if (xcor != targ_x and ycor != targ_y) [set xcor tempx set ycor tempy] record-a-step set steps steps + 1 ] set totalDistance (totalDistance + distancexy last_x last_y) set done? true] ] set i i + 1 ] end to record-a-step ask turtle 0 [ set currentX gridX-of patch-here set currentY gridY-of patch-here ; ask neighbors [set stepCount (stepCount + 1) if (stepCount > 10) [(show stepCount + "SC")]] ask patch-here [set stepCount (stepCount + 1)] ask patch-here [set footStep (footStep + 1)] ask patches at-points nearby [set stepCount (stepCount + 1)] set memory (replace-matrix-element currentX currentY memory (stepCount-of patch-here)) ;; color the patch set pcolor red ] end to collectGridData let i 0 let j 0 while [i < gridWidth] [ set j 0 while [j < gridheight] [ run "set x" + i + "y" + j + " value-from patch i j [footStep] " set j j + 1 ] set i i + 1 ] end to collectGridData-for-Exploration-Test [test] let i 0 let j 0 while [i < gridWidth] [ set j 0 while [j < gridheight] [ run "set E" + test + "x" + i + "y" + j + " value-from patch i j [footStep] " set j j + 1 ] set i i + 1 ] end to-report disutility [distObj rSteps] report ((distObj ^ alpha) * ((1 + rSteps) ^ beta)) end to calc-path-cost-grid no-display ask turtle 0 [ let spotx min-pxcor let spoty min-pycor let startx (precision xcor 0) let starty (precision ycor 0) let distanceToSpot 0 let distanceFromSpotToFirst 0 let repeatedStepsSpot 0 let objectPenalty 0 set objx 0 set objy 0 while [spotx <= max-pxcor] [ set spoty min-pycor while [spoty <= max-pycor] [ set distanceToSpot 0 set repeatedStepsSpot 0 set objectPenalty 0 ;; calculate the distance to the spor in question set distanceToSpot distancexy spotx spoty; find the distance to the current object ;; hypothetically walk to the object to count the steps while [ (xcor != spotx) or (ycor != spoty)] [ facexy spotx spoty ;; face the current object fd 1 setxy (precision xcor 0) (precision ycor 0) ;; place the agent at the center of their current patch set repeatedStepsSpot (repeatedStepsSpot + mean values-from neighbors [stepCount]) ;set repeatedStepsSpot (repeatedStepsSpot + mean values-from patches at-points nearby [stepCount]) if (object? = true) [ set objectPenalty 0] ] set distanceFromSpotToFirst distancexy firstx firsty if (object? = true) [ set objectPenalty 0] ; ask patch spotx spoty [set cost ((distanceToSpot ^ alpha) + (repeatedStepsSpot ^ beta) + objectPenalty)] ask patch spotx spoty [set cost ((disutility distanceToSpot repeatedStepsSpot) + objectPenalty)] ; ask patch spotx spoty [show cost] set spoty spoty + 1 setxy startx starty ;; return the turtle to where he is starting the turn ] set spotx spotx + 1 setxy startx starty ;; return the turtle to where he is starting the turn ] ] display end to useEnergyPlusMemoryHeuristic-neighborSearch ask turtle 0 [ let start_x xcor let start_y ycor let i 0 set targ_x 0.0 set targ_y 0.0 set bestTarget 0 let globalBest 999999999 ;; rule out objects that have already been visited ;run "set targ_x object" + bestTarget + "x" ;; Choose the best spot neighboring a target while [i < numberOfObjects] [ run "setxy object" + i + "x object" + i + "y" ;; RANDOMIZE AMONGST NEIGHBORS TO BREAK TIES ask neighbors [set cost cost + ((random 1000) * 0.000000000001)] ;ask patches at-points nearby [set cost cost + ((random 1000) * 0.000000000001)] let localBest (value-from (min-one-of neighbors [cost]) [cost]) let localBestX (value-from (min-one-of neighbors [cost]) [pxcor]) let localBestY (value-from (min-one-of neighbors [cost]) [pycor]) if (localBestX = xcor) and (localBestY = ycor) [show "LOOKING UNDER TURTLE!"] ; let localBest (value-from (min-one-of patches at-points nearby [cost]) [cost]) ; let localBestX (value-from (min-one-of patches at-points nearby [cost]) [pxcor]) ; let localBestY (value-from (min-one-of patches at-points nearby [cost]) [pycor]) ; if (localBestX = xcor) and (localBestY = ycor) [show "LOOKING UNDER TURTLE!"] if (localBest < GlobalBest) and ((item i objectsVisitedList) = 0) [ set globalBest localBest set bestTarget i set targ_x localBestX set targ_y localBestY ] set i i + 1 ] setxy start_x start_y ;; set first object id THIS IS THE OBJECT THAT THE AGENT WILL RETURN TO AS IT IS FINISHING ITS TOUR if (totalObjectsVisited = 0) [set firstx targ_x set firsty targ_y] setxy (precision xcor 0) (precision ycor 0) ;show "best target " + bestTarget + " x " + targ_x + " y " + targ_y + " xcor " + xcor + " ycor " + ycor + " cost " + globalBest facexy targ_x targ_y while [value-from (patch-ahead 1) [object?] = true ] [ facexy targ_x targ_y let leftorright random 2 ifelse (leftorright = 1) [rt 45] [lt 45] if (value-from (patch-ahead 1) [object?] != true )[ fd 1 record-a-step set steps steps + 1 ] facexy targ_x targ_y ] while [(xcor != targ_x) or (ycor != targ_y)] [ facexy targ_x targ_y fd 1 setxy (precision xcor 0) (precision ycor 0) record-a-step set steps steps + 1 ] setxy targ_x targ_y ;; make sure they are there run "ask patch object" + bestTarget + "x object" + bestTarget + "y [set pcolor green]" set pcolor orange set ObjectsVisitedList (replace-item bestTarget ObjectsVisitedList 1) set totalObjectsVisited totalObjectsVisited + 1 if (totalObjectsVisited = numberOfObjects) [ ;set targ_x firstx set targ_y firsty ;while [(xcor != targ_x) or (ycor != targ_y)] [ ; facexy targ_x targ_y ; fd 1 ; setxy (precision xcor 0) (precision ycor 0) ; ;record-a-step ; set steps steps + 1 ;] ;;setxy firstx firsty collectGridData setxy 0 5 set done? true ] ] end to calc-path-cost-targets no-display ask turtle 0 [ let j 0 let startx (precision xcor 0) let starty (precision ycor 0) let distanceToObj 0 let distanceFromObjToFirst 0 let repeatedStepsObj 0 let penaltySum 0 set objx 0 set objy 0 while [j < numberOfObjects] [ set distanceToObj 0 set repeatedStepsObj 0 set penaltySum 0 ;; set up local variables for the cooridinates of the currently inspected object run "set objx object" + j + "x" run "set objy object" + j + "y" ;; calculate the distance to the object in question set distanceToObj distancexy objx objy ; find the distance to the current object ;; hypothetically walk to the object to count the steps while [ (xcor != objx) or (ycor != objy)] [ facexy objx objy ;; face the current object fd 1 ;; precision coordinates used to check if the agent is at the target - if not, she stays at here exact previous trajectory/location ;; this avoids rounding errors and indirect paths let tempx xcor let tempy ycor setxy (precision xcor 0) (precision ycor 0) ;; place the agent at the center of their current patch if (xcor != objx and ycor != objy) [set xcor tempx set ycor tempy] ;set repeatedStepsObj (repeatedStepsObj + mean values-from neighbors [stepCount]) set repeatedStepsObj (repeatedStepsObj + mean values-from patches at-points nearby [stepCount]) set penaltySum (penaltySum + value-from patch-here [visitedPenalty]) ; if (visitedPenalty > 0)[show visitedPenalty] ] set distanceFromObjToFirst distancexy firstx firsty ;; fill in slot i in the object list with the (dis)Utility of the of going to this object using a Cobb Douglas set objectsDisutilityList (replace-item j objectsDisutilityList ((disutility distanceToObj repeatedStepsObj) + penaltySum) ) ;show item j objectsDisutilityList set j j + 1 setxy startx starty ;; return the turtle to where he is starting the tur ] setxy startx starty ;; return the turtle to where he is starting the turn ] display end to useEnergyPlusMemoryHeuristic-targetSearch ask turtle 0 [ let i 0 let start_x xcor let start_y ycor set targ_x 0.0 set targ_y 0.0 set bestTarget 0 ;; rule out objects that have already been visited while [i < numberOfObjects] [if ((item i objectsVisitedList) = 1) [set objectsDisutilityList (replace-item i objectsDisutilityList 999999999) ] set i i + 1 ] ;; choose the object the has the lowest disutility, pulling out its index in the list ;; set first object id THIS IS THE OBJECT THAT THE AGENT WILL RETURN TO AS IT IS FINISHING ITS TOUR ifelse (totalObjectsVisited = 0) [set bestTarget 0 set targ_x object0x set targ_y object0y set firstx targ_x set firsty targ_y] [ set bestTarget (position (min objectsDisutilityList) objectsDisutilityList) run "set targ_x object" + bestTarget + "x" run "set targ_y object" + bestTarget + "y" ] while [(xcor != targ_x) or (ycor != targ_y)] [ facexy targ_x targ_y fd 1 ;; precision coordinates used to check if the agent is at the target - if not, she stays at here exact previous trajectory/location ;; this avoids rounding errors and indirect paths let tempx xcor let tempy ycor setxy (precision xcor 0) (precision ycor 0) ;; place the agent at the center of their current patch if (xcor != targ_x and ycor != targ_y) [set xcor tempx set ycor tempy] record-a-step if (totalObjectsVisited != 0) [set steps steps + 1] ] setxy targ_x targ_y ;; make sure they are there if (totalObjectsVisited != 0) [set totalDistance (totalDistance + distancexy start_x start_y)] set pcolor green ;; set the object patch green set ObjectsVisitedList (replace-item bestTarget ObjectsVisitedList 1) run "ask (patch object" + bestTarget + "x object" + bestTarget + "y) [set visitedPenalty PENALTY]" set totalObjectsVisited totalObjectsVisited + 1 if (totalObjectsVisited = numberOfObjects) [ let last_x xcor let last_y ycor set targ_x firstx set targ_y firsty while [(xcor != targ_x) or (ycor != targ_y)] [ facexy targ_x targ_y fd 1 let tempx xcor let tempy ycor setxy (precision xcor 0) (precision ycor 0) ;; place the agent at the center of their current patch if (xcor != targ_x and ycor != targ_y) [set xcor tempx set ycor tempy] record-a-step set steps steps + 1 ] set totalDistance (totalDistance + distancexy last_x last_y) set done? true] ] end ;; i = row, j = column, mm = matrix, xx is the value replacing the old value at i,j to-report replace-matrix-element [ i j mm xx] ; matrix-element replacement function ; works on matrices, if used with "set {matrix-name} replace-matrix-element i j {matrix-name} {new-value}" report (replace-item i mm (replace-item j (item i mm) xx)) end to-report moore-offsets [n] let dim n * 2 + 1 let result n-values (dim ^ 2) [list (? mod dim - n) (floor (? / dim) - n)] report result end to-report von-neumann-offsets [n include-center?] let dim n * 2 + 1 let result filter [sum map [abs ?] ? <= n] n-values (dim ^ 2) [list (? mod dim - n) (floor (? / dim) - n)] ifelse include-center? [ report result ] [ report remove [0 0] result ] end to exploration-test [testNumber targetX1 targetY1 targetX2 targetY2 targetX3 targetY3] set open1 true set open2 true set open3 true ask turtle 0 [ ;; as long as one of the patches is unexplored, keep going while [(open1 = true) or (open2 = true) or (open3 = true)] [ let distance1 ((distancexy targetX1 targetY1) + random-float(0.000000001)) let distance2 ((distancexy targetX2 targetY2) + random-float(0.000000001)) let distance3 ((distancexy targetX3 targetY3) + random-float(0.000000001)) ;; make sure that already test-visited objects do not factor into consideration if (open1 = false) [set distance1 distance1 + 9999999] if (open2 = false) [set distance2 distance2 + 9999999] if (open3 = false) [set distance3 distance3 + 9999999] let x targetX1 let y targetY1 let target 1 ;; find which open object is the closest if ((distance1 < distance2) and (distance1 < distance3) and (open1 = true)) [set x targetX1 set y targetY1 set target 1] if ((distance2 < distance1) and (distance2 < distance3) and (open2 = true)) [set x targetX2 set y targetY2 set target 2] if ((distance3 < distance1) and (distance3 < distance2) and (open3 = true)) [set x targetX3 set y targetY3 set target 3] show "target = " + target + open1 + open2 + open3 ;; move towards the target until the current target is reached set lastX xcor set lastY ycor if (target = 1) [ while [ open1 = true] [ exploration-test-move testNumber target x y ;run "show totalExploreSteps" + testNumber ] ] ;; move towards the target until the current target is reached if (target = 2) [ while [ open2 = true] [ exploration-test-move testNumber target x y ;run "show totalExploreSteps" + testNumber ] ] ;; move towards the target until the current target is reached if (target = 3) [ while [ open3 = true] [ exploration-test-move testNumber target x y ;run "show totalExploreSteps" + testNumber ] ] ] ;; once the task is done, return to the "door" setxy 0 4 ] ;; collect the number of different patches used statistic for this test run "set totalExplorePatches" + testNumber + " count patches with [explorePatchUsed? = true]" ;; reset patches used counter ask patches [set explorePatchUsed? false] end to exploration-test-move [testNumber target targetX targetY] let nextX xcor let nextY ycor ask turtle 0 [ let d 100000 ;; see which neighboring patch is nearest the current target let lX lastX let lY lastY ask neighbors [ ifelse ((pxcor = targetX) and (pycor = targetY)) [run "set open" + target + " false"] [ if (footstep > 0) and ((pxcor != lX) or (pycor != lY)) [ let hd distancexy targetX targetY ;; show "target " + target + " " + targetX + " " + targetY + " " + "patch" + pxcor + " " + pycor + " " + hd if (hd < d) [set d hd set nextX pxcor set nextY pycor ] ] ] ] ] ;;show nextX + " " + nextY ;; If it turns out we are not adjacent to the target, then move to the neighboring patch that is closest to the target run "if (open" + target + " = true) [ask turtle 0 [set lastX xcor set lasty ycor setxy nextX nextY] set totalExploreSteps" + testNumber + " totalExploreSteps" + testNumber + " + 1 ask patch-here [set explorePatchUsed? true]]" end @#$#@#$#@ GRAPHICS-WINDOW 100 13 410 344 -1 -1 50.0 1 20 1 1 1 0 0 0 1 0 5 0 5 CC-WINDOW 5 358 612 453 Command Center 0 BUTTON 14 16 80 49 NIL setup NIL 1 T OBSERVER T NIL BUTTON 15 53 82 88 go go\nif (done? = true) [stop]\n T 1 T OBSERVER T NIL MONITOR 16 107 73 156 NIL steps 0 1 SLIDER 431 11 603 44 alpha alpha 0 2 0.9 0.01 1 NIL SLIDER 431 48 603 81 beta beta 0 2 0.9 0.01 1 NIL MONITOR -2 178 84 227 NIL totalDistance\n 3 1 @#$#@#$#@ WHAT IS IT? ----------- This section could give a general understanding of what the model is trying to show or explain. HOW IT WORKS ------------ This section could explain what rules the agents use to create the overall behavior of the model. HOW TO USE IT ------------- This section could explain how to use the model, including a description of each of the items in the interface tab. THINGS TO NOTICE ---------------- This section could give some ideas of things for the user to notice while running the model. THINGS TO TRY ------------- This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model. EXTENDING THE MODEL ------------------- This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc. NETLOGO FEATURES ---------------- This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features. RELATED MODELS -------------- This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest. CREDITS AND REFERENCES ---------------------- This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 link true 0 Line -7500403 true 150 0 150 300 link direction true 0 Line -7500403 true 150 150 30 225 Line -7500403 true 150 150 270 225 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 3.1.5 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup set beta ( 1 - alpha) go done? = true steps totalDistance setup set beta (1 - alpha) go done? = true steps x0y5 x1y5 x2y5 x3y5 x4y5 x5y5 x0y4 x1y4 x2y4 x3y4 x4y4 x5y4 x0y3 x1y3 x2y3 x3y3 x4y3 x5y3 x0y2 x1y2 x2y2 x3y2 x4y2 x5y2 x0y1 x1y1 x2y1 x3y1 x4y1 x5y1 x0y0 x1y0 x2y0 x3y0 x4y0 x5y0 totalExploreSteps1 totalExploreSteps2 totalExploreSteps3 totalExplorePatches1 totalExplorePatches2 totalExplorePatches3 setup go done? = true steps totalExplorePatches1 totalExplorePatches2 totalExplorePatches3 x0y5 x1y5 x2y5 x3y5 x4y5 x5y5 x0y4 x1y4 x2y4 x3y4 x4y4 x5y4 x0y3 x1y3 x2y3 x3y3 x4y3 x5y3 x0y2 x1y2 x2y2 x3y2 x4y2 x5y2 x0y1 x1y1 x2y1 x3y1 x4y1 x5y1 x0y0 x1y0 x2y0 x3y0 x4y0 x5y0 @#$#@#$#@