Lesson 4 Activity 2 - Colliding Turtles

In this activity, students will create a colliding turtles project in which turtles react to other turtles upon collision.  The wrap up discussion covers what probability is used for in computer modeling and simulation.
  • Watch the video introduction to Colliding Turtles
  • Read the guidelines for creating the Colliding Turtles project
  • Learn new CS concepts
  • Create your own version of Colliding Turtles
  • Upload a screen shot and a link to you model in your portfolio

Video introduction to the Challenge:

Colliding Turtles Challenge:

In this activity we are going to implement agents interacting with other agents upon collision. Collisions occur when two agents bump into one another.  (They do not need to be centered on the same patch, just touching.)  This is different from bumper turtles – In bumper turtles, agents were responding to colored patches in their environment, not other agents.  Collision blocks generally are used in an agent's page or in this case, the Turtle page.

We will use a collision block that looks like this.  Use the pull down arrow to select what to type of object to collide with.  Then put the commands that should run or execute when the collision occurs in the area below the notch.


Here’s an example:

 Here’s another example with a conditional instruction.  The set color command only executes if the condition is true.


Your challenge is to make the turtles react to another agent upon collision.

  • Remix the Colliding Turtles Starter model and read the description of what to implement.
  • Implement each part. For example, start by creating 50 turtles
  • Have the turtles change their color after colliding with another turtle.  
  • Test your project and revise as needed.

New CS Concepts: (Collisions and Detection)

Upload your project:
When you are done, save and share your project by uploading a screen shot and a link to your project in your portfolio in "SLNova Projects->SL Nova - intro" under the heading "Colliding Turtles."

Reflect on using the collision block and the count-within block. Post your reflection to your portfolio in "Reflections->CS Concepts" under the heading "Collision Detection."