Lesson 2 Activity 1 - Decode the model

In this activity students will USE the Rabbits and Grass model.  They will look under the hood at the model to understand what was included and left out of the model (abstraction) and run the model repeatedly to observe and write about the behavior of the system.
  • Watch a video on "How to Decode" a model
  • Review the CS concepts you've learned
  • Run and decode the model yourself.
  • Check your understanding
  • Observe and write about the behavior of the system.


Watch a video on how to decode and trace a program's execution



Review CS Concepts:

Review the CS concepts you learned in Module 1 using these two documents (see abstraction, agents and traits).
then review these new concepts:

Breeds or subclasses of agents
Breeds are subclasses, or types, of agents.  Turtles are a type of agent.  Users can also create other types of agents, called breeds, using the edit breeds dialog in the Spaceland area.  Click on "edit breeds" to open the dialog. Then click "add breed" to add a new breed.  Once you've added a new breed, you will see a new page in the Blocks area of StarLogo Nova.  This new page is where you will write the code for behaviors that the new breed will perform.

User-defined traits
Every agent is created with a set of variables called "traits" in StarLogo Nova. 
These default traits are: x, y, z, heading, color, shape, size, breed, and agent ID number.  In addition to the default traits that every agent is born with, users can create other traits for agents. The "edit breeds" dialog is used to create new traits for agents.  Find the breed you are looking for then click on "Edit Traits" next to that breed.  Name your trait here and specify the type of the trait (see below).



    

The delete block deletes the current agent.

The delete agent block deletes the agent referenced. 

The set my (trait) to (value) block is used to set the current agent’s trait to some value.  In this case, Energy is a new trait created by the user.

 

The user created the Rabbits trait “Energy” using the Edit Breeds panel.  Click on “Edit Breeds” in the Spaceland panel. Then click on the “Edit Traits” button next to Rabbits.  From here you can give an agent a new trait by clicking on “Add Trait”

 

Then specify a trait name and type.  The type can either be “data”, “snapshot”, or “list”.

For Energy, we want to store a value or number, so choose “data” and click OK.

In computer science, this is called declaring a variable. The variable in this case is a number variable called “Energy”.



Run and decode the model yourself: 
Here's a link to the Rabbits and Grass model and some decoding sheets to use while decoding.  Make a copy of the decoding sheets and save your notes to your portfolio in the section "SL Nova Projects- Life."

Check your understanding by watching this video that decodes the Rabbits and Grass model.



For written instructions on decoding a line graph, see the document Decoding a Line Graph.


Quiz questions:
1 point
Which rabbit procedures are called when the forever button is toggled on?

1 point
What are the major abstractions that exist in any agent-based model?


Reflection:
Is the Rabbits and Grass ecosystem a complex system?  Why or why not?
Reflect on this question in your portfolio in the section "Reflections->Complex Adaptive Systems" under the heading "Rabbits and Grass ecosystem."