Computer Languages From A to Z: Netlogo

´╗┐by Gary L. Ratliff, Sr. (eronstuc)

In this article, we are ready for some fun. At the half time break, I mentioned that the system has KTurtle, which uses logo and a turtle to draw various lines on a canvas. Now imagine that the number of turtles and the number of canvases was allowed to increase. And that these turtles and canvases were allowed to be interconnected into a model of some real world behavior. Then you would have a hint at what Netlogo has to offer.

Netlogo was authored in 1999 by Uri Wilensky. It has been developed and used since that time at the Center for Connected Learning and Computer-Based Modeling of Northwestern University. It is available as freeware from the netlogo website:

ccl.northwestern.edu/netlogo

The most recent version was released on Dec. 20, 2009. It is available for Windows, the Mac, and other operating systems. The Windows version is 62 megs, the app for the Mac is 42 megs, and the one which can be used in Linux is only 41 megs in length. Just click the download link and fill in a simple form, which asks for your name and email address. You want the file: netlogo-4.1.tar.gz. This download will take just a few minutes, and will be placed in your home folder. It is a very simple matter to unpack it with the command: tar zxf netlogo-4.1.tar.gz. Once this has been done, change into the directory, which it will create, using: cd netlogo-4.1. This will yield the following area:

pic

Your next move should be to read the readme.txt file, which will show you how to use the application. However, you can also launch this from within the netlogo directory, using the terminal and giving the command: ./netlogo.sh. Once inside the netlogo system, click on the Help menu and select the User manual, which will produce the following:

pic

As you can see, this provides a set of tutorials for learning the basics of the system. It is suggested that you begin exploring the system by running the Model Party. In my last article, I mentioned that it was written about Christmas time and that there was a movie called "Christmas in July" playing at that time. It is only appropriate that we have New Years in August, so this is a model of a cocktail party which many of you may have attended around New Years Eve. The model shows what happens to the tolerance level of people to form various groups changes.

This model introduces the concept of using the sliders and the buttons to setup the model. The model also produces graphs of the changes of the people throughout the life of the model.

pic

The "setup button" is used to set the initial conditions. Here, the tolerance level means the percentage of people who are comfortable if the level of members of the opposite sex in their group rises above a certain level. The "go once" button shows which groups change at each step, and the "go" button runs these steps until a conclusion is reached.

There are very many models to use, and they are setup and run in a similar manner. Just follow the tutorials in order to advance in learning more and more about the system, until you learn how to construct your own models.

The main menu item, Information, shows various facts about the model and its uses. And the Procedures item shows the code for the model. The models are used in education, and as mentioned on the initial page of the user manual, Yahoo! has two groups devoted to this system. One group is specifically for teachers:

Meanwhile, the system should provide many hours to explore the provided models. And the tutorials should have you ready to create your own models in fairly short order.