|
|||
Home Page Download Models Community Models Extensions User Manual:![]() Web version![]() Printable version FAQ Resources Contact Us |
NetLogo Models Library: | ||
|
Run Heatbugs in your browser uses NetLogo 4.0.2 requires Java 1.4.1+ (system requirements) Note: If you download the NetLogo application, every model in the Models Library (besides the Community Models) is included. If you have trouble running this model in your browser, you may wish to download the application instead. |
WHAT IS IT?
Heatbugs is an abstract model of the behavior of biologically-inspired agents that attempt to maintain an optimum temperature around themselves. It demonstrates how simple rules defining the behavior of agents can produce several different kinds of emergent behavior.
Heatbugs has been used as a demonstration model for many agent-based modeling toolkits. We provide a NetLogo version to assist users in learning and comparing different toolkits. It demonstrates coding techniques in NetLogo and may be useful as a starting point for building other models.
While this NetLogo model attempts to match the Repast and Swarm versions (see "Credits" below), we haven't done a rigorous comparative analysis of the different versions, so it is possible that there are small inadvertent differences in the underlying rules and behavior.
HOW IT WORKS
The bugs move around on a grid of square "patches". A bug may not move to a patch that already has another bug on it.
Each bug radiates a small amount of heat. Heat gradually diffuses through the world; some heat is lost to cooling.
Each bug has an "ideal" temperature it wants to be. The bigger the difference between the temperature of the patch where the bug is and the bug's ideal temperature, the more "unhappy" the bug is. When a bug is unhappy, it moves. If it is too hot, it moves to the coolest adjacent empty patch. Conversely, if a bug is too cold, it moves to the warmest adjacent empty patch. (Note that these bugs aren't smart enough to always move to the best available patch.)
HOW TO USE IT
After choosing the number of bugs to create, and setting the model variables, press the GO button to set the heatbugs into motion.
BUG-COUNT: The number of bugs that will inhabit the model
EVAPORATION-RATE: The percentage of the world's heat that evaporates each cycle. A lower number means a world which cools slowly, a higher number is a world which cools quickly.
DIFFUSION-RATE: How much heat a patch (a spot in the world) diffuses to its neighbors. A higher number means that heat diffuses through the world quickly. A lower number means that patches retain more of their heat.
MIN/MAX-IDEAL-TEMP: The minimum and maximum ideal temperatures for heatbugs. Each bug is given an ideal temperature between the min and max ideal temperature.
MIN/MAX-OUTPUT-HEAT: The minimum and maximum heat that heatbugs generate each cycle. Each bug is given a output-heat value between the min and max output heat.
RANDOM-MOVE-CHANCE: The chance that a bug will make a random move even if it would prefer to stay where it is (because no more ideal patch is available).
DEEP-FREEZE: This button removes all heat from the world.
HEAT-UP: This button adds MAX-OUTPUT-HEAT to every patch in the world.
Beneath the View Window are two "Color By:" buttons. The IDEAL-TEMP button colors the bugs according to their IDEAL-TEMP value. Bugs with higher IDEAL-TEMP values will be brighter. The HAPPINESS button does the same, but is based upon the HAPPINESS value of each agent, with happier bugs being brighter.
The WATCH-HAPPIEST and WATCH-SADDEST buttons will highlight the happiest or saddest bug at the time the button is pressed.
THINGS TO NOTICE
Depending on their ideal temperatures, some bugs will tend to clump together, while others will tend to avoid all other bugs, and others still flutter around the edges of clumps. All of these behaviors are affected as well by the evaporation rate.
The diffusion rate affects the cohesiveness of clumps. If diffusion-rate is slow, many tiny clumps form. Why?
Most interesting behaviors occur when the number of bugs, how much heat they generate, and how quickly the world cools are balanced such that excessive heat does not build up.
THINGS TO TRY
Vary DIFFUSION-RATE.
Vary EVAPORATION-RATE in relation to the output-heat range of the bugs.
Use the HEAT-UP button to scramble clumped heatbugs and watch as they re-assemble into new clumps.
EXTENDING THE MODEL
Randomize the amount of heat bugs generate each cycle.
Allow users to introduce heat into the system with the mouse.
NETLOGO FEATURES
N-OF and SPROUT together let us initially place each bug on its own patch with a minimum of code.
Notice how the code does not make any use of X and Y coordinates. The NEIGHBORS and MOVE-TO primitives take care of sensing and motion on a toroidal grid without the need for any explicit coordinate math.
The DIFFUSE command is used to diffuse the heat around the patch grid.
RELATED MODELS
Slime
CREDITS AND REFERENCES
Swarm version of Heatbugs -- http://www.swarm.org/wiki/Examples_of_Swarm_applications
RePast version of Heatbugs -- http://repast.sourceforge.net/examples/index.html
To refer to this model in academic publications, please use: Wilensky, U. (2004). NetLogo Heatbugs model. http://ccl.northwestern.edu/netlogo/models/Heatbugs. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
In other publications, please use: Copyright 2004 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/Heatbugs for terms of use.
(back to the NetLogo Models Library)