Hunters

advertisement
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
ask patches [set pcolor green]
end
Day 1
to setup
ask patches [set pcolor green]
ask n-of 5 patches [set pcolor red]
end
Day 1
to setup
Day 1
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
end
to setup
Day 1
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue]
end
to setup
Day 1
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue]
end
to go
ask turtles [fd 1]
wait .3
end
to setup
Day 1
clear-all
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [fd 1]
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
end
to setup
Day 1
clear-all
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [set heading heading + random 20 – random 20 fd 1]
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
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [set heading heading + random 20 – random 20 fd 1]
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
end
to setup
Day 2
clear-all
reset-ticks
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue pen-down]
end
to go
ask turtles [set heading heading + random 20 – random 20 fd 1]
ask turtles [if pcolor = red [set pcolor yellow show “found one!”]]
wait .3
tick
end
turtles-own [memory]
to setup
clear-all
reset-ticks
ask patches [set pcolor green]
ask n-of 5 patches [ask n-of 10 patches in-radius 5 [set pcolor red]]
crt 2 [set size 3 set shape “person” set color blue pen-down set memory 999]
end
to go
ask turtles [search]
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
command: set heading 45
3. Change each group of mushrooms to have more
mushrooms in a smaller radius.
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
Download