Home Download Help Resources Extensions FAQ References Contact Us Donate Models: Library Community Modeling Commons User Manuals: Web Printable Chinese Czech Japanese Spanish

NetLogo Models Library: 
If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web 
This model simulates students' ideas about scattering, which takes place just before exercising in gym. The students in a class start out all bunched up, and the teacher asks them to spread out or scatter. This simulation shows the spread of the group when the individual students follow simple rules to decide whether to move and where. The scatterers move according to rules that were gleaned from several interviews with sixthgrade students.
The students were asked: "At the beginning of a Physical Education class, the students are standing close together. The teacher tells the students to scatter so they may perform calisthenics. What happens? Can you describe and explain?" The students described the scattering process verbally, using coins to simulate the process and drawing a series of pictures to depict the succeeding steps.
This model implements several scattering rules, which the user can mix and match:
RANDOMMIN: Move in a random direction until you are far enough away from all of your neighbors. Randommin turtles (the violet ones) set their heading and move in a random direction if and only if there are turtles that are too close.
OPENMIN: Move into the largest open nearby space until you are far enough away from all of your neighbors. Openmin turtles (blue) also stop when other turtles are too close. If there are turtles that are too close, they find the heading that will take them to the largest open space.
OPENMINMAX: Move into the largest open nearby space until you are far enough away, but not too far. If you're too close, move away. If you're too far, move closer. The openminmax turtles (orange) move to the largest open space if other turtles are too close. If the other turtles are too far away (that is, there aren't turtles within a certain space), the turtle in question moves to a more populated area.
Two of the scattering rules do not have stopping conditions, so they continue scattering indefinitely:
RANDOMAWAY: Move in a random direction away from the person that is closest too you. Randomaway turtles (pink) look at the turtle closest to them and move in the opposite direction.
RANDOM: Move about randomly, disregarding all other scatterers. Random turtles (brown) just run around in a random direction, never looking at the turtles around them.
The scattering students move at equal speeds, if they move at all. Two students cannot occupy the same location. Whether or not to move and where to move depends on each of the rules that are described. The color of the scattering students reflects the rule that they are following.
Use the sliders to the right of the view to specify the number of turtles to create with each rule.
With the first three rules, the TOOCLOSE slider sets the distance, in patches, that the turtles must be away from other turtles before stopping. The NUMRANDOMMIN slider indicates the number of turtles to create that move in a random direction, stopping when they are at least the distance specified by TOOCLOSE from other turtles. Use the NUMOPENMIN slider to specify how many turtles to create that move to the largest open space if there are turtles within TOOCLOSE.
NUMOPENMINMAX specifies the number of turtles to create that must have turtles within a certain range in order to stop. TOOCLOSE indicates how far away other turtles must be for a turtle to stop, and TOOFAR indicates how close the turtle in question must be to at least another turtle for it to stop.
The NUMRANDOMAWAY slider indicates the number of turtles to create that move away from the closest turtle, without ever stopping. NUMRANDOM indicates the number of turtles that move in random directions without stopping.
To indicate the radius within which you want the turtles to be initially scattered, use the INITIALRADIUS slider. INITIALRADIUS must be large enough to fit the number of turtles indicated by the above sliders. See NetLogo Features, below.
To vary the distance that a turtle moves each time step, change the STEPSIZE slider.
Press SETUP to create the number of turtles indicated, in the INITIALRADIUS specified. Press GO to start the model and the plots.
The plot AVERAGE DISTANCE FROM ORIGIN shows the average distance that turtles of a certain rule have moved from their original position over time. It is colorcoded to match the colors of the turtles. To observe the average distance of turtles of a certain rule, watch the line of the same color.
The MOBILITY OF SCATTERERS histogram displays the average total distance moved by turtles within a certain range away from the origin. Each of the bars plots the average total distance of turtles in five concentric circles radiating from the center patch. Note that this differs from that of the AVERAGE DISTANCE FROM ORIGIN plot, which measures the distance from the turtle's present spot to its original spot, in that it adds up each step taken by the turtle.
The TICKS monitor displays the number of clock cycles that GO has run.
While the group is spreading, notice the individual turtles' routes. You can use the "watch turtle" functionality (by clicking on a turtle) or pendowning a single turtle to observe its path. Try this with a number of turtles. How do the individual and group patterns relate?
Like two people walking towards each other down a hallway trying to avoid colliding, the rules of the turtles deciding their heading based on other turtles can conflict. For instance, several neighboring turtles moving to the largest open space may choose to move to the same open spot and, in doing so, move closer to the other turtles. This can form clusters of turtles, even while the group is spreading and even in the periphery of the group.
Certain rules get to a settled, or scattered, state more quickly than others do. Which rules are better for efficient scattering?
Observe the shape of the "Average distance from Origin" plot: Why is it shaped the way it is? What other phenomena behave in a similar way?
When observing the MOBILITY OF SCATTERERS plot, notice how scatterers farther on the outside will sometimes move a greater total distance or a smaller total distance, depending on the rule.
There are often threshold values where the scatterers will never settle down, and the model will not stop. For instance, if TOOCLOSE is too great and there are too many turtles, they will never have enough room to completely scatter.
Some of the rules produce a more ordered end formation than others. Why is this, and which ones exhibit this behavior? Do any regions show higher densities than others?
When certain rules are mixed together, segregation occurs. That is, turtles of a certain rule tend to be surrounded by more turtles of the same rule than not. Which combinations of rules produce this segregation more than others?
When experimenting with the moveintorange turtles, vary the TOOCLOSE and TOOFAR sliders concurrently with the STEPSIZE slider. If the step size is too big and the TOOCLOSE and TOOFAR values creating too narrow of a range, will the scatterers ever settle?
Try mixing rules to explore how turtles of different rules interact with each other.
Watch what happens when a few randomscatter turtles run around a set of turtles with stopping conditions, like movetoopenspace turtles.
Vary the STEPSIZE slider, and see what effect this has on the model. Does a bigger step size make for more or less efficient scattering?
Try varying INITIALRADIUS to make the starting formation tighter or more spread out.
Pendown one turtle, and watch its path as it moves about the world. How does it compare with the group?
Which rule seems to simulate real situations of scattering people?
Try to think of other rules that scatterers follow. For example, figure out rules to get the turtles to fill up the entire space. Alternatively, turtles could move towards a friend or away from an enemy. Also, try to think of stopping conditions other than being a certain distance from other turtles.
Turtles could have a variable stubbornness
, indicating how likely a turtle is to move or not. A dawdle
or friendliness
variable could indicate a likeliness to hang around other turtles.
Try giving the scatterers the ability to back track. For instance, if a scatterer moving to an open space finds that their movement takes them to a more populated area, they could move back to where they were before.
Allow turtle to have varying speeds or step sizes, simulating the differing stride lengths of individual scatterers
Devise other ways to model the scattering in the aggregate sense; for example, measure the density in a certain area.
What if there was a location (e.g. a fire) that people were trying to get away from while scattering? Devise a way to model such a situation. You can include physical structures, such as walls and doors.
The model creates turtles by asking patches to sprout
a turtle initialized with a certain rule. Because a patch can only sprout
one turtle, only a certain number of turtles can fit in a certain radius. The model verifies that the user hasn't asked for more turtles than can fit in the initialradius specified to avoid an error.
The study is described in Levy, S.T., & Wilensky, U. (2004). Making sense of complexity: Patterns in forming causal connections between individual agent behaviors and aggregate group behaviors. In U. Wilensky (Chair) and S. Papert (Discussant) Networking and complexifying the science classroom: Students simulating and making sense of complex systems using the HubNet networked architecture. The annual meeting of the American Educational Research Association, San Diego, CA, April 12  16, 2004.
Thanks to Stephanie Bezold for her work on this model.
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 2004 Uri Wilensky.
This work is licensed under the Creative Commons AttributionNonCommercialShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/byncsa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
This model was created as part of the projects: PARTICIPATORY SIMULATIONS: NETWORKBASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs)  grant numbers REC #9814682 and REC0126227.
(back to the NetLogo Models Library)