NCSI Talks

   

Hermit Crab Learning Scenario (Web)


Shodor > NCSI Talks > AgentSheets > Hermit Crab Learning Scenario (Web)

Learning Scenario - Hermit Crab (AgentSheets)

Basic Model:

Description

This is an agent model of hermit crabs responding to external stimuli. The model simulates the interaction between crabs, seagulls, and humans on an expanse of sand. The only parameter that can be changed is whether it is day or night, but users can also interact with the hermit crabs directly, either by clicking on them (simulating a human touch), or by moving seagulls with the arrow keys.

Background Information

Hermit crabs live near the ocean in tidal zones that are underwater at high tide, but out of the water during low tide. Their primary defense mechanism when scared or attacked is to retreat into their shell, hence the name. Most hermit crabs are nocturnal. The most common predator of the hermit crab is a seagull, so hermit crabs developed a unique defense mechanism - they go into their shell whenever they see a fast-moving or unexpected shadow. Naturally, such caution means that they also commonly go into shells when faced with the unexpected presence of a human. Shells are both for defense and for camouflage. In most hermit crab habitats, there are enough unoccupied shells that the crabs can simply blend in. If they are identified, however, seagulls can pick them up, carry them high into the air, and drop them on a flat rock to break open the shell and reveal the meat inside. Unlike many other crabs, hermit crabs can move equally well in all directions and can even climb effectively. Some types of crabs even climb trees to get to fruit. This is simulated in the applet by the fact that the hermit crabs can move in all directions with equal probability.

Science/Math

The fundamental principle behind this model is reactive evolution, the principle that the evolution of a single species doesn't occur in a vacuum. Instead, species evolve in response to their environment and other species. Hermit crabs evolved a shell and elaborate defense mechanisms in order to prevent themselves from being eaten by seagulls, fish, and other predators found in their natural habitat. Meanwhile, seagulls evolved better eyesight and the instinct to drop hermit crab shells on flat rocks to break them open. Both species continue to evolve in response to one another in a sort of evolutionary arms race. This model simulates the crabs' defensive behaviors as follows:

  1. When the user touches a crab, it will go into its shell for a period of time
  2. When a crab is next to a seagull, there is a chance that it will go into its shell, but there is also a chance that it will be eaten
  3. During the night, crabs roam the landscape aimlessly; during the day, they congregate near tall grass
  4. Seagulls cannot eat crabs in their shells

Teaching Strategies

An effective way of introducing this model is to ask students to put themselves in the place of the hermit crab and brainstorm what kinds of defensive mechanisms they would use against flying predators. Then, discuss the defenses that hermit crabs have and how they are used. Ask the following questions:

  1. Why do hermit crabs live in shells?
  2. Why do hermit crabs withdraw into their shells around humans?
  3. How can seagulls respond to the hermit crabs' defense mechanism?
  4. What would you expect to happen if seagulls were introduced to a hermit crab colony?
  5. Why do you think most hermit crabs are nocturnal?

Implementation

How to use the Model

This is a relatively simple model with only one modifiable parameter - day/night cycle - but there are a number of other ways that students can interact with the hermit crabs:

  1. Changing the day and night cycle will determine the behavior of the crabs: during they night, they will move randomly; during the day, they will cluster around the tall grass in the upper right-hand corner of the screen
  2. Using the finger tool, click on any of the hermit crabs to cause it to go into its shell. After a period of time, it will revert to back a mobile crab

All of the aforementioned actions can be taken using the tools bar on the left-hand side of the screen alongside the Gallery at the top left. The day/night cycle can be changed by clicking on the sun or moon agent at the right with the hand tool, or by clicking the dropdown arrow at the top right, selecting simulation properties, and changing the cycle manually. For more information about Agentsheets reference the Agentsheets tutorial at: http://shodor.org/tutorials/agentSheets/Introduction.

Learning Objectives

  1. Understand how the behavior of different species can affect their interaction patterns
  2. Examine how short-run and long-run conditions can be different in unstable environments

Objective 1

To accomplish this objective, have students place a seagull on the game board and come up with several different strategies for how a seagull might move. Examples might include no movement at all, moving towards the nearest hermit crab, or moving randomly. Then, have students step through the simulation, carrying out their algorithm, and discuss the effects it has on the final outcomes. Ask the following questions:

  1. Which algorithm seemed to be the most successful at catching hermit crabs? Why do you think that was?
  2. How did your algorithm deal with hermit crabs in the shell? Did you ignore them, or did you try to wait around and catch them as soon as they spawned?
  3. What would be a realistic algorithm for seagulls trying to catch hermit crabs? How could you define that within the context of this AgentSheets model?

Objective2

To accomplish this objective, have students place anywhere from 1 to 10 seagulls on the game board, choose a movement algorithm, and then count how many steps it takes before all of the hermit crabs are dead. Repeat the experiment with different numbers of hermit crabs and different day/night cycle choices. Ask the following questions:

  1. Was there a difference between kill rates during the day and during the night? How might you modify your algorithm to make it more effective at one or both times?
  2. Which algorithm was the most efficient at the beginning, when there were lots of hermit crabs on the board? Which was most efficient at the end? If these answers were different, why do you think some algorithms are more efficient at the beginning, and some more efficient at the end?
  3. Is there a situation in which hermit crabs can survive indefinitely even with seagulls on the board? What settings/algorithm are required? Why are the seagulls so ineffective in that situation?

Extensions

  1. Program in behavior for the seagulls as well as the hermit crabs
  2. Allow hermit crabs to reproduce

Extension 1

Have students work with the source files for the AgentSheets model to implement one of their algorithms for the seagulls. Ask the following questions:

  1. How can you translate a command like "move towards the nearest crab" into something AgentSheets can understand?
  2. Should seagulls move together as a group, or individually? How does your answer to that question affect the algorithm you use?
  3. What should seagulls do in response to hermit crabs in the shell?
  4. We saw earlier that different algorithms may be more or less effective during the day or at night. How can you have your seagulls consider that in their movement choices?

Extension 2

Discuss with students the ways in which this model is not realistic, with emphasis on the long-run state of the world that it yields. Ask the following questions:

  1. In the long run, what happens to the population of hermit crabs when there is at least one seagull present? Is this realistic?
  2. How can we model the fact that hermit crabs don't all die out over time?
  3. When hermit crabs are allowed to reproduce, what possible long-run states are there for the model? Which do you think will occur with 1 seagull? Which will occur with 10 seagulls? Why?

Related Models

Rabbits and Wolves

This is a much more feature-rich predator-prey model, allowing reproduction for both predator and prey as well as a resource constraint in the form of grass. However, the agents in this model are unintelligent, simply moving around at random rather than intelligently reacting to and/or avoiding one another. This is a great way to discuss with students to what degree it is worthwhile to model agents as intelligent. Giving them complex behavior may make the model more realistic, but it often yields the same end result as a simpler algorithm. For large agent models, it may be necessary to use a simpler algorithm just for the sake of computability. Taking this a step further, population models are so simple that they don't even model the individual agents; they just assume that some proportion of predators manage to eat prey during each time step, and some portion of the prey manages to escape.

Baitfish

This model gives a different example of an agent model in which the agents exhibit rudimentary intelligence. In Baitfish, the prey fish swim in a circular pattern with groups of other fish, or schools. The predator fish hover around outside of the circles, and then swoop in to try to catch a target fish. When the predator swoops in, the other fish immediately scatter and try to escape. Using this model, you can discuss with students how modeling intelligent behavior adds to the realism of an agent model, and any conclusions that can be drawn from the interaction of these creatures. You can also use this as a springboard to discuss how agents might interact with one another as a group rather than as a collection of individuals.