Information


 Introduction

Welcome to the StarLogo 2.2 release of StarLogo, a programmable modeling environment designed to help you model and explore the workings of decentralized systems, such as bird flocks, traffic jams, and market economies.

A Macintosh-only version of StarLogo has been available for several years. In February 2000, we released the first Java-based version of StarLogo, designed to run on all different types of computers. We called this new version StarLogo 1.0, and we renamed the Macintosh-only version MacStarLogo. (While the Java-based version of StarLogo runs on Macintosh computers, Mac users with older 68K and PowerMac computers might prefer to use MacStarLogo for performance reasons.) In August 2000 we released version 1.1. It included updated features and bug fixes, and in 2001 we made another update to version 1.2, in 2002 we updated to 2.0, and 2004 we updated to 2.1.

The latest version is 2.2, and it includes some bug fixes that are outlined below in the New Features section. This document will discuss how to run StarLogo, new features in version 2.2, the differences between StarLogo and traditional MacStarLogo, the system requirements for running this version, and some implementation issues.

As you use StarLogo 2.2, please let us know what you think. Please send suggestions and bug reports to bug-starlogo@media.mit.edu (Be sure to include system details, including your operating system, so we can easily pin down any problems).

Thanks again for trying out this new version of StarLogo!


 How to Run StarLogo

To use StarLogo, you will need to have a version of Java 1.4 installed on your computer (it should also work correctly with Java 1.5 aka Java 5).

Our installer for Windows includes a Java 1.4 runtime from Sun Microsystems. This version will not interfere with any other versions of Java installed on your machine, and you won't have to worry about compatability. We do not use or require any other version of Java to be installed on your computer.

We support MacOS X 10.2.6 and higher (best results with OS X 10.4) with the Java 1.4.2 update installed. There are still few problems with MacOS X Java, on some older verrsions of Mac OS X, so feel free to email at bug-starlogo@media.mit.edu when bad things happen. StarLogo will no longer runs on MacOS 9 (because it does not support Java 1.4).

On Unix, we recommend using your vendor's Java, as long as it is compatible with Java 1.4 (Java 5, aka 1.5 does not work properly with StarLogo on Unix. Please use version 1.4 ). We include a shell script to run StarLogo, and include a special shell script for Solaris. On Linux, we recommend Sun's JDK over IBM's because of far fewer bugs in the AWT implementation. A note: there are interactions between some window managers and Java which cause new windows to open in a really small size. You might try a different window manager first, to see if it is the problem, but if not, tell your window manager to allow you to place the window manually when it pops up, rather than automatically. This will give you the opportunity to resize it.

After you have succesfully installed StarLogo, follow these instructions to run StarLogo on your computer:

On a Windows PC
  • In the Start Menu, look for the StarLogo 2.2 program group. Click on the StarLogo application file to run StarLogo.
  • StarLogo should start up and pop two windows up on the screen. If you don't see them, they might be hidden behind other windows. Check your taskbar for them.

On a Mac
  • Double-click on the StarLogo application.
  • StarLogo should start up and pop two windows up on the screen.
On Unix
  • Install your favorite Java 1.4.x (not compatible with Java 5).
  • Go to the StarLogo distribution directory.
  • Execute the unix-run-starlogo shell script. (Note: If you use Solaris, execute the solaris-run-starlogo shell script instead).
  • Note: We've seen that StarLogo requires that you set Java to use a larger stack size. This is necessary with Sun's Java; we're not sure whether this is necessary on other Unixes.

 Adventures in Modeling and The StarLogo Design Discussion Area
In 2001, we published a book, Adventures in Modeling (http://education.mit.edu/starlogo/adventures), that inroduces learners of all ages to designing, creating and exploring models in StarLogo. Adventures in Modeling focuses on a series of open ended design challenges that build in complexity. It comes with a series of sample projects, that are available inside of your StarLogo download folder.

The StarLogo Design Discussion Area (http://education.mit.edu/dda) is an online forum for posting and discussing StarLogo projects. It may be used in conjunction with Adventures in Modeling, or simply to share StarLogo models with other users. There are already hundreds of proejcts available there to browse and to search. Through the DDA, you can look at other user's code and use StarLogo models as applets in a compatible browser.


 New Features in Version 2.2

Bugs Fixed

  • Rewrote tail recursion detection to actually work.
  • Fixed numerous hanging bugs that plagued the MacOSX version of StarLogo.
  • Fixed display of error dialog boxes when running StarLogo as an applet.
  • StarLogo is properly ported to running on Intel-based Macintosh computers when they come out.
  • Eliminated ugly redraws of widgets on the Macintosh version of StarLogo. Text widgets look much better now.
  • Fixed a bug in scatter plots where the generated StarLogo code was wrong.
  • Found and fixed a bug that sometimes let the turtles escape their StarLogo world and scribble on the widgets nearby.
  • Resize the patch canvas back to default values when you do New Project.
  • Fixed bug where leaving output window open while outputting caused a deadlock.
  • Fixed numerous bugs in documentation.

Additional Bugs Fixed in 2.21

  • Fixed deadlock problem when closing turtle monitors
  • Fixed problems with legends running in applets
  • Updated about box and splash screen to reflect 2.21
  • Note to Unix Users: Please do not use the "Calibrate Graphics" method on that platform. This routine runs very slowly on Unix.
 New Features in Version 2.1

New Features

  • Added count-turtles-here-with, one-of-turtles-here-with, list-of-turtles-here-with, count-turtles-at-with, count-turtles-towards-with, one-of-turtles-at-with, one-of-turtles-towards-with, list-of-turtles-at-with, list-of-turtles-towards-with
  • Added export-picture-patches, export-picture-turtles-and-patches, export-picture-interface, export-picture-patches-name, export-picture-turtles-and-patches-name, export-picture-interface-name
  • Added pc-ahead-one-step, pc-ahead-one-patch. pc-ahead is the same as pc-ahead-one-step. pc-ahead-one-patch is a new command that looks ahead at least one patch to make sure that even if 'fd 1' wouldn't bring the turtle to a new patch (remember that patches are 1.414 steps long on their diagonal) pc-ahead-one-patch will look one patch ahead.
    • pc-ahead = pc-towards 0 1
      pc-ahead-one-step = pc-towards 0 1
      pc-ahead-one-patch = pc-at round dx round dy
  • Added sum-of-list command
  • Added splash screen when StarLogo starts up to mask the fact that Java applications take a while to load.
  • Added Calibrate Graphics to automatically choose the fastest drawing on your platform. Requires write access to your disk to save the calibration data. Won't work for applets (there, we'll just make our best guess).
  • Updated StarLogo applet HTML template to the latest code to get the Sun JVM on all browsers.
  • On Windows, press the Escape key to stop everything from running. On Macs, use Command-.
  • If a turtle's stack overflows, don't just silently stop running. Now we show a dialog box that tells you where the stack overflow happened.
    This error occurs when you call a non-tail recursive function (or many nested function calls) too often.
  • Added support to plot wizard for plotting median, mode and standard deviation of a variable (we used to only have number, average, min, max, and average)
  • Added support to plot wizard for plotting slider values.
  • Plot line connectedness is now associated with each plot pen, not just each plot.
  • When using the Template feature, the initial dialog box should open in the Templates directory.
  • Internalization support all throughout StarLogo. Initial support for Spanish (will be announced when ready). Projects are now saved in UTF-8 encoding to support proper translation of code pages between different languages. (Old projects will be read in using the platform's native code page and saved out with the new UTF-8 encoding).

Removed Features

  • switch-patches command (Use Calibrate Graphics instead)
  • Java 1.1, 1.2, 1.3 support (We require Java 1.4.x or higher. now)
  • MacOS 9 support (We require Java 1.4.x now)

 

Bugs Fixed

  • Rewrote entire command reference with improved examples, related commands, and descriptions.
  • Check if the user writes code with output where not all code paths through the function exit via output. That is illegal. If one code path uses output, all code paths must use output.
  • Made the Help menu on non-MacOSX prettier.
  • Properly detect and reject the use of stop and output from the command center.
  • If you cancel a polygon draw operation by clicking outside the StarLogo patches, StarLogo will continue to run properly and not freeze up.
  • Plot widgets are now the proper size when you drag out a rectangle on the interface to create it.
  • Histogram plots save more accurately in the project file. In the old way, they used to load incorrectly.
  • When you add or remove variables from turtles-own, patches-own or globals, make sure that the plot dialog box knows about it.
  • Fixed the math functions that determine what patch a turtle steps onto when moving. Now a turtle can't get 'lost' where he's not really on any patch.
  • Fixed painting with turtles. Now turtles are only created when the painting is 'committed' (usually releasing the mouse button; for polygon, when the polygon is closed).
  • Updated FAQ.
  • sdev-of-turtles-with now returns the standard deviation. It used to return the variance.
  • Made it harder to move an interface widget (button, slider, monitor, text box) when you click and drag on it. This should help those mouse-dextrously challenged people.
  • Rewrote printing support to work properly on all platforms. Can print the command center, interface, info and output windows.
  • When you edit the turtles-own, patches-own or globals lists in your project, we now make sure that any values that had been assigned into these variables are preserved across the re-compile.
  • Pause StarLogo when editing a shape.
  • Fixed tail recursion detection in the StarLogo compiler. Should be completely accurate now for tail calls to the current procedure. (StarLogo does not optimize tail calls to different procedures).
  • Using the paint tools to erase a patch with a turtle on it now redraws the patch properly.
  • Fixed misspellings in the Control Center's print dialog box.
  • StarLogo window now exports to PNG, rather than GIF. No more "too many colors to export as GIF" errors.
  • Removed red outline on rotated shape in the Shape Editor window.
  • Added tooltips to the Shape Editor window.
  • Properly handle the case when a turtle being asked to do something by another turtle is asked to die. Dead turtles no longer run code after they die. For example,
    • ask-turtle 0 [ask-turtle 1 ask-turtle 2 [kill 1 fd 10] fd 10] fd 10]
      Turtle 1 dies, and only turtle 0 moves fd 10. After turtle 1 dies, the process that is running ask-turtle 2 is stopped, therefore killing the process that turtle #2 is running so it will never proceed past the kill 1 to its own fd 10. Since turtle 1 is dead, he can't run fd 10. That leaves turtle 0 to run his own fd 10.
  • If you stop StarLogo from running, any grabbed turtles are released.
  • If you ask a dead turtle to do something, nothing should happen.
  • If a turtle dies while asking another turtle to do something, stop the ask process.
  • If you pop a button, any grabbed turtles will no longer remain grabbed forever.
  • If you try to set any variable of a dead turtle, just skip it.
  • Turtle monitors are better at reading and displaying variables of turtles who are in the middle of dying.
  • Fixed deadlock problems in the turtle and patch monitors.
  • Fixed off-by-1 bug when loading images into StarLogo. All pictures were loaded one pixel to the left.
  • If you try to define a run procedure (or kind or parent), pop up an error message because that's illegal.
  • StarLogo now accepts file paths in Windows UNC format (e.g. \\server\directory)
  • When StarLogo starts up on Windows, the Control Center has the text focus and is now on top of the StarLogo window.
  • All dialog boxes show OK and Cancel in the proper order depending on platform.
  • If you had a file with a dot in the name (on PCs), StarLogo would change the suffix to .slogo. Now it adds the .slogo suffix instead.
  • Completely rewrote the paint tools implementation. The pencil tool should appear to be much smoother now. Also supports Undo.
  • Font menu on MacOSX scrolls properly now (requires Java 1.4.1).
  • Don't allow an empty text widget to be created.
  • random-gaussian now produces random numbers with a mean around 0. It used to be below 0.
  • Drawing StarLogo speed on MacOS X is now much much faster than before.
  • When listed in the Windows/Plot menu, plot widgets now have their plot-id prepended to them.
  • The compile progress bar is much prettier now.
  • Sliders cannot be called run. Detect this and pop up and error dialog box.
  • Plots can now have some pens plot 'connected points' and other pens plot separate points.
  • StarLogo projects are now saved in the UTF-8 string format. This enables projects to contain non-ASCII characters (such as those from character sets outside the USA) and load properly into StarLogo running in any language.
  • Histograms now auto-scale their axes by default now.
  • Plot widgets will now draw even when their associated plot windows are not yet visible.
  • Widget drawing bugs due to clipping errors have been eliminated on MacOS X.
  • who-min-of-turtles and who-max-of-turtles are now properly treated as reporters by the compiler.
  • StarLogo does not compile anything until you try to run a button or command center item. If compilation fails, however, if what you try to run in the command center compiles successfully, it will still run. If compilation fails, no buttons will run.
  • If a turtle leaps forward less than a single patch, he will move properly as long as there is no other turtle on the patch. Previously, the turtle would not move at all.

 Implementation

StarLogo is based partly on Java code and partly on a language we created called YoYo. YoYo is a variant of Logo that is built on Java and allows you to construct Logo/Java hybrid programs and put them on the Web. We've used YoYo here to write the StarLogo compiler and script our user interface.


Getting Started | Download | Community | Tutorial
Commands | Projects | FAQ | Info