Rock Paper Scissors (.doc)

advertisement
P R O J E CT G U T S
CL I M AT E C H AN G E U NI T
Rock/Paper/Scissors
Review of CAS concepts (randomness and unpredictability)
and of StarLogo programming skills (collisions and hatch)
Off-line activity
Climate Change in a Bottle
Assign each student a “breed” of rock, paper, or scissors, making the groups as
equal as possible. Have each student choose a classmate at random and play
one round of the game (paper covers rock, rock crushes scissors, scissors cut
paper). Have each student who loses the first round sit down, and the remaining
students continue to play until a single student is left standing. Play again (with
students reassigned in equal groups), and encourage students to choose
partners at random. If there are enough students and the groups are roughly
equal, the “winner” should not be predictable.
If time allows, have students play where the loser of each round changes to the
winner’s breed for the next round. For example, in a round one match between
paper and scissors, the student who was paper (and the student who was
scissors) plays round 2 as scissors. Students may need a pencil and paper to
keep track of their breed in each round. Continue to play until one breed wins
(or is in a large majority) – again, with a large enough group and even
beginning groups, the winner should not be predictable.
On-line activity – build “Rock/Paper/Scissors” program
First, discuss modeling with students – what are the benefits of creating a
computer model of the game we just played? What can we do with a model
that is impossible in the real world? What are the limits or assumptions behind
such a model? This is an opportunity to review or re-teach the uses of computer
models.
In StarLogo, use the “Edit Breeds” button to choose and name three breeds (rock,
paper, and scissors) – be sure to choose “skin off” models because we will be
setting their color. Create a set-up procedure (clear all, create 30 of each breed
using the “Create/num-do” block from the My Blocks screen), set the color of
each breed in the “do”, and use the set size block (from the traits drawer) to get
each breed to be roughly the same size. Scatter all turtles and add a “reset
clock” (from the set-up drawer) to the end of the set-up block, as we will be
adding monitors and a graph later.
Remember to have students save their model frequently.
PAGE 2
CLIMATE CHANGE UNIT
Create a “wiggle” procedure (right random 30, left random 30, forward 1),
name it “wiggle”, and place it in the “everyone” column. Get a “forever” block
from the set-up and run drawer, put it into the runtime column, and call the
procedure (from the My Blocks screen, everyone drawer) for each agent. Test
the program and see that you have about 30 of each breed walking around in
Space Land.
Collisions and hatch
Drag the 3 relevant collision blocks into the collision column. [While it is easy to
have one breed simply change into the other in a collision, this exercise is
intended to review collisions and hatch, as we will use both later in the
semester.] In the collision, have the losing breed die (logic drawer), and the
winning breed hatch a new agent (use the “hatch/do” block from the logic
drawer). Be sure to add the set color and if appropriate, set size blocks to the
“do” in the hatch, so the new agent will look like the original agent. For
example, in the example program, when paper collides with scissors, paper will
die, and scissors will hatch a new breed that is red and size 3.
Test the program – you should see one breed win, fairly quickly. It should not be
the same breed each time.
Once the program is working, add a monitor for each breed (the monitor
button is at the bottom of the set-up and run drawer, the “count breed” button
is in the breed drawer, in My Blocks), and label them. Then add a line graph
(same process), and label it. Unfortunately in StarLogo, you cannot choose the
colors used in the graph – whatever you put in the first line (for example, count
scissors) will be graphed as a red line, the second slot shows green, and the third
shows blue. It can be helpful to use those colors to match your agent colors, at
least for red and blue. Be sure to name the graph and label the colors with the
name of the breed being counted.
Save and test your program. Have the students note in the monitors that
StarLogo does not create exactly 30 of each agent, and the number differs
each time. Students should run the model several times, noting whether the
breed with the highest initial number always wins (it shouldn’t) and discussing
why the outcome is unpredictable. If time allows, run an experiment to see if
the results are different with a different initial number of agents (remember not
to create more than 2000 total agents or the program will run too slowly).
Another possible experiment is to see whether giving one breed a greater initial
number of agents will cause it to always win, and what that size advantage
must be to get the desired result.
Download