Part 3 Model Observation and Decoding


Welcome back! Now that you’ve observed and decoded, it’s time to share!
Please share the following:

  1. A link to your complete Model Observation Form
  2. A screen shot of the chunk of code from the mystery model that you chose to decode
  3. Your summary of what your chosen chunk of code is doing
  4. Your thoughts on how to use Mystery Models and decoding in your own classroom.


  2. It looks like the magenta agents are infected and when they interact with a turtle that is not magenta it turns it magenta. When the infection time countdown reaches zero (which is instant when the contact happens) the magenta turtle deletes itself.

  3. Mystery models are a great way to encourage critical thinking and creativity among students.


3.See annotation on the image.

  1. I think the students would love to decode mysteries (most of them - the ones that like everything spelled out and cut and dried might find it frustrating).


Observation Form Mystery Model Myers

The code I choose is calling the procedure terrain. In this code we are setting up the different regions that the agents will live in. The set my x to 40 is of course starting the agent at positive 40 on the x coordinate. The y is set to negative 10. This first section is setting the parameters for the orange region. The size is setting up the orange region to 50 and setting the placement in the south region (-90). The forward is moving each agent by 1 and then the repeat is how many time the agent will move forward.

I can see many uses of the Mystery Model in the classroom. It is my favorite model so far. You can use many different variables based on the unit of study and have students predict the outcomes based on what has already been covered. Or you could use the model to introduce a unit to engage the interests of the students before you begin.



Turtles Code.pdf (225.9 KB)


  2. setting the parameters for the orange section of the background

  3. great experience in critical thinking and problem solving


In this section of code it will turn a turtle magenta if it hits another magenta turtle. Simulating an infection spread. Infected turtles will also turn purple.

The terrain is really different for this model. I had not seen color stamps like that using a graph/grid.


Great observations and inferences!


Great observations! I also love the way you shared this–I like to have my students write things on paper, then scan them in or take photos to turn them in. That way they get the learning benefits of handwriting but I don’t have a ton of paper laying around.

Of course you were correct–we were dealing with infected agents. Great work!


Great observations!
Remember, every time through a forever loop is a single iteration. Usually, the turtles are taking a step, changing their angle, and then checking for collisions or conditionals.

Great catch on the different method for editing terrain!


Great observations and decoding!
Glad you enjoyed the Mystery Models–kids love them, too.


You’re right–most kids love them and I think all kids can learn to love them, once they are given permission to explore and taught a few skills in taking chances. Loved your description of the decoding–very clear, just the way students would need it. Great work!


  2. I was looking at the collision code. Upon collision with a turtle, if the color of the collide is magenta, and if a random value within 100 is less than or = to the slider value, the turtle’s color is set to magenta.

  3. I agree that mysteries are a great way to pique interest. My problem still is how to incorporate coding into a drop-in space where I only have 15-30 minutes with the students. A lot of the ideas I’ve had are more suitable for long-term classroom projects.


link to doc:


Synopsis of the code: The code linked about is setting up the movement and the change in color of the turtles. It established the rules for staying within the boundaries and for the infection or transmission rates.

Use in the class: I felt like this is a great place for teachers to introduce modeling and to work on modeling. The way we ran the simulation it allowed for a really good analysis of the parts, relationships, scale, cause/effects, and patterns with in a system model.


link to doc:

The code I chose was looking at the background painting procedure. They are creating a turtle, defining its size as 50, and then having it stamp a particular color. They also place the turtle with x and y coordinates. They can repeat this procedure with different colors to get the different colored blocks in the background.


  2. The set of code that I selected creates a block of terrain color. The turtle is set at a specific point, then draws the terrain color in a specific section.

  3. I think this would be a good activity to have students evaluate code and try to figure out which piece of code is controlling what part.


This section of code sets up the count boxes and the time to count the numbers of purple turtles and black turtles.

I think that the different colored backgrounds shown in this model could be used to model and compare and contrast closed systems such as varying ecosystems, effectiveness of animal adaptations in different environments, or movement of particles according to different temperatures.


Here is my link to the observation form for Mystery Model:

Here is the screenshot of the code and my interpretation:

I think it would be a great model for adaptations in the 7th grade core. It could model how organisms adapted to their environment survive, while organisms who aren’t, don’t survive. The colored sections could represent ecosystems or habitats.


Link to my Mystery Model Observations:

Turtle tab. How long they live with infection.
Keep them in the box - heading 180 degrees - bounces directly off edge.

It helps to do the observation first then to look at the code. It helps students make connections and self-assess.
This mystery model could be used very well in using scientific process and using Scientific Talk and Argument. Students work together in small groups, make observations, and claims, then come together as a class to state their claims using evidence. It’s a great practice for students to see that, depending on your focus, different claims can be made and they can all be correct. It’s great to have them make connections to real world.