NetLogo User Community Models
(back to the NetLogo User Community Models)
by Derek Rush
HILLWALKER is a model inspired by the Tutorial Model 3 and it uses the random terrain creating code
of that model, but a little modified. The sliders 'smoothness' and 'topping' plus the 'setup terrain'
button create the terrain of green valleys, brown hills and grey tops.
An offwhite color 7 patch appears as a 'topping' on some hills to simulate greater height --- snow if
you like. Also in each quadrant of the screen there is a single patch of color 7.1, usually "invisible"
being impossible to see if against offwhite.
The "invisible" patch is used as the peak that the walker sees and aims for during the climb but first
the walker must look around and across the terrain to find it. The walker's search begins from a random
heading but the look around proceeds clockwise.
The 'climb' procedure uses sub-procedures 'increment-heading', 'increment-distance', 'color-ahead'
The 'setup / clear' button followed by the 'start' button runs these procedures which starts with the
walker in the center of the display. The walker will walk to the top of one hill and mark the hilltop
white before descending to a nearby valley where it marks yellow. The walking continues to three more
hilltops and valleys. Each sector counts as a walk, 8 in all. The descent to a valley procedure is
similar to the climb but looks for a valley closeby up to distance 50.
The plot shows the profile of the climbs in red and the descents in green.
If a terrain proves to be particularly interesting, the walker may be returned to the display center
and the model may be cleared of plots and marks by the 'setup / clear' button. Then the model may be run
again using the 'start' button.
The model produces a print of the heights of the 8 marks in the Command Center.
The work was first done to investigate a "guidance procedure" for NetLogo. The procedures include code
to avoid wrap. It is possible that models such as this may have some value in sharing procedures among
the NetLogo Users and for this reason it is offered.
The Author Derek Rush may be contacted by Email at firstname.lastname@example.org 10th June 2002