This page was automatically generated by NetLogo 3.1.3. Questions, problems? Contact

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 (koropkin3.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: koropkin3.nlogo


This program paints a certain percentage of patches yellow, and then sends a turtle through the grid to count the number of yellow patches. a large brown square is generated in the center of the grid that the turtle must navigate around. the turtle uses its senses and memory to evaluate the world that it is in (counting squares) and to overcome obstacles (the brown square), which it does by remembering its original position.


set-up: goes through the patches, turns the center into a large brown square and for each remaining patch generates a random number between 1 and 100. if that number is less than the given percentage it paints the patch yellow. the turtle is set to be alive at the bottom left with a counter of zero.

go: if the turtle is alive,

it looks to see if it is on a yellow square.
if it is: it increases its counter
and reports it to the global counter

it looks at its position.
if it's below the brown square it goes around it

else if it's at the top of a line, it starts the next line
if it's at the top right, it sets its life variable to dead
if it's neither, it just goes up one

go around
if the turtle goes right until the end of the square
then goes up the side of the square
then returns to the column, which it was at


adjust the slider to the desired % of yellow squares
hit set-up to set-up
hit go to go


rob korobkin hc '08
march 26, 2006