Running the activity
- Show the students where to find the StarLogo TNG program (a shortcut icon on the desktop would be best, but may need to start it in the program files).
- Instruct the students how to open StarLogo TNG.
- Show the students some key features of StarLogo TNG: the code window, the drawers, the columns, Spaceland, and the cameras.
- Tell the students that StarLogo TNG always starts up with two turtle agents located near the center of Spaceland.
- Show that you can click on a turtle in Spaceland to find out more about it.
- Show Spaceland’s coordinate system in the Terrain Editor.
- Open a turtle’s monitor to see where it is located (xcor, ycor).
- Show how a forward block can be dragged onto the code area and double clicked to have all turtles execute the forward command.
- Show how the forward command takes an “argument” or number block to tell it how many steps to take forward.
- Show the students how to clear Spaceland with a clear everyone block
- Show students how to create 10 new agents using the create block (reiterate that the create block takes an “argument”, the number of turtles to create.)
- Ask the students to figure out how to get the new turtles to take 20 steps forward.
- Ask them why they think the turtles formed a circle?
- Introduce the concept of heading and degrees.
- Clear the screen again and create new agents using a Setup block.
- Show how to use the scatter block to scatter the agents. Describe how scatter works and what would be the analogous situation with dice.
- Next introduce a forever block and talk about the execution model. (Each time through the forever loop each turtle gets updated. Also if a number of commands gets executed before the end of the loop, the final position is what gets drawn.)
- Put a forward block into the forever block and watch what happens when the forever block is clicked.
- Now add a pen-down and see what happens. Do you see the trail drawn after each step the turtles take? Or do they seem to jump? What is happening?
- Next show how to make the agents “wiggle” describing the right turn and left turn blocks with a random number of degrees (try 20).
- Go into some detail about random and what is happening when random is called.
- Talk about probability? What if random is given a larger number as its argument? What will happen?
- Now run setup and forever and see the result.
- * if time allows, ask students to change the variables (number of turtles, number of steps or turn angle in the random function)_until they find an outcome they like. Then have them share their creations and setting during a pin-up or show and tell.
Concluding the activity:
Wrap up questions:
- What did you see happen?
- Is it a complex system? What’s missing? (sensing and reacting to other agents or the environment at the local scale)
- “Does the same pattern emerge regardless of the settings of the variable?”
- Review the new terms used in this activity: agent, simple rules, location, heading, steps, iteration, setup, runtime, patterns, random, initial condition.