CSC107 - Exam 2

Assigned Mar 14th 10am
Take-Home Due Mar 16th, 10am


You are not allowed to use the internet in general for this exam, except for the Starlogo TNG Documentation. You may use your notes and previous models we have written in class. You may use the computer to execute your model. You are bound by the Honor Code for this exam, which you need to sign.

Take Home

Question 1

You are an artist interested in creating collaborative abstract art. You have hired the turtles to paint their world and make paintings for you.

Question 2

You must next add code to have the turtles paint the world. The turtles follow a simple rule: if they see an empty (green) patch, paint it with their own color, then wiggle. You need to

Run this model and report on the resulting painting in the world.

Question 3

You hire another set of turtles, but they are not entirely reliable. As before, if they see a green patch, they color it with their color, but if they see a patch that is already colored but is not their own color, they change into that color and start painting with this new color. For example, a red turtle encounters a white patch, causing it to become a white turtle. This turtle is now painting green patches white.

Run this model. Discuss any differences between the paintings from the turtles in Question 2 and Question 3.

Question 4

You hire a third set of turtles, which follow a slightly different set of rules. If they encounter a green patch, they paint it their color, but if they encounter a colored patch that is not their own, they first change into that color then color this patch green. For example, a red turtle encounters a white patch, causing it to become a white turtle and paint the white patch green, and this turtle is now painting green patches white.

Run this model. Discuss any differences between this model and the models in Questions 2 and Questions 3. Why do you think this model behaves the way it does? Which pictures do you prefer and why?

You Must Turn In