This page was automatically generated by NetLogo 3.1.3. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.


In order for this to work, this file, your model file (billings3.nlogo), and the file NetLogoLite.jar must all be in the same directory. (You can copy NetLogoLite.jar from the directory where you installed NetLogo.)

On some systems, you can test the applet locally on your computer before uploading it to a web server. It doesn't work on all systems, though, so if it doesn't work from your hard drive, please try uploading it to a web server.

You don't need to include everything in this file in your page. If you want, you can just take the HTML code beginning with <applet> and ending with </applet>, and paste it into any HTML file you want. It's even OK to put multiple <applet> tags on a single page.

If NetLogoLite.jar and your model are in different directories, you must modify the archive= and value= lines in the HTML code to point to their actual locations. (For example, if you have multiple applets in different directories on the same web server, you may want to put a single copy of NetLogoLite.jar in one central place and change the archive= lines of all the HTML files to point to that one central copy. This will save disk space for you and download time for your user.)

created with NetLogo

view/download model file: billings3.nlogo

WHAT IS IT?

This model is of an agent that can observe things about its environment and, based on the information it gets, change things.

In this scenario, a turtle who can't swim is wandering around the world. If it encounters water, it changes direction to aviod it. However, it eventually looses patience and builds a bridge to cross the water.


HOW IT WORKS

The agent has three main behaviors that it does depending on the color of the patch one space in front of it.

If the patch is not blue (a bridge or grass), it moves forward then turns in a random direction (shown in the "wander" function).

Every time the turtle sees a blue patch, it's "wet" variable increases by one (it gets wetter and more annoyed). If it encounters a blue patch while it's wet variable is at or less than three, it turns to avoid the water ("avoid-water" function). If it encounters water with a wet variable above three, it builds a bridge ("build-bridge" function).

The "build-bridge" function is recursive. As long as the patch ahead of the turtle is blue, it continues turning the patches gray and moving forward. This means that it builds an entire bridge from one side of the body of water to the other.


HOW TO USE IT

The interface is simple. The "step" button goes through the program once, moving or turnign the turtle, depending on the patch it is facing. The "wander" button allows the turtle to wander around the environment. The "irritation" button shows the turtle's rising and falling irritation, showing when it is going to build a bridge.


THINGS TO NOTICE

There's nothing particularly interesting to notice, except that it's fun to watch the turtle try to find a way around the water then give up and just build a bridge.


THINGS TO TRY

There are no sliders or switches.


EXTENDING THE MODEL

One extension would be to have the turtle try to find a nearby bridge before creating another one. More or less water could also be added.


NETLOGO FEATURES

One thing discovered was the pcolor-of patch-ahead function, which is what allows the turtle to see if it is about to walk into water and drown itself.


RELATED MODELS

There are no related models that I know of.


CREDITS AND REFERENCES

Jessica Billings
Emergence - CS361
Spring, 2007