### Hunters

```Goal: To create a model of people hunting in the forest
for mushrooms and then start working on improving
their mushroom hunting ability mathematically.
Day 1
to setup
end
Day 1
to setup
ask n-of 5 patches [set pcolor red]
end
Day 1
to setup
Day 1
end
to setup
Day 1
crt 2 [set size 3 set shape “person” set color blue]
end
to setup
Day 1
crt 2 [set size 3 set shape “person” set color blue]
end
to go
wait .3
end
to setup
Day 1
clear-all
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
end
to setup
Day 1
clear-all
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
end
Try doing the following:
Day 1
1. Change the size, color, and shape of your hunters.
2. Change the number of groups of mushrooms, mushrooms in
each group, and radius of the groups.
6. Change the number of hunters.j
Goal: To work on improving their mushroom hunting
ability mathematically.
Day 2
to setup
Day 2
clear-all
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
end
to setup
Day 2
clear-all
reset-ticks
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
tick
end
turtles-own [memory]
to setup
clear-all
reset-ticks
crt 2 [set size 3 set shape “person” set color blue pen-down set memory 999]
end
to go
wait .3
tick
end
to search
ifelse memory < 20 [right (random 181) – 90][right (random 21) – 10]
fd 1
ifelse pcolor = red [set memory 0 set pcolor yellow][set memory memory + 1]
end
Day 2
Day 2
to search
ifelse memory < 20 [right (random 181) – 90][right (random 21) – 10]
fd 1
ifelse pcolor = red [set memory 0 set pcolor yellow][set memory
memory + 1]
end
Try doing the following:
Day 2
1. Change the number of hunters to 1, then to 5.
2. Try setting the hunters’ initial heading to 45˚ by using the
3. Change each group of mushrooms to have more
Try doing the following:
Day 2
4. Have the hunters say “Found one!” using the command:
show “found one!”
5. Instead of turning by -10 to 10 degrees when they haven’t
found a mushroom for awhile, change it to -45 to 45.
6. Change where the hunters start by using the command:
setxy 10 10
Challenge:
Day 2
Have the hunters count how many mushrooms they have
found.
You need to define: turtles-own [counter]
You’ll need to use the command: set counter 0
And every time they pick up a mushroom the command: set
counter counter + 1
Instead of saying show “found one!” have them: show counter
```