On-line activity – build “Rock/Paper/Scissors” program

advertisement
P R O J E CT G U T C
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, play again but have the loser of each round change 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?
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. Use the set-up procedure to create 30 of each breed, making
each a different color and using set size block to make each breed roughly the
same size. Scatter all turtles and add a “reset clock” 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 in the “everyone” column, and call the procedure
for each breed in a “forever” block. Test the program and see that you have
about 30 of each breed walking around in Space Land.
CLIMATE CHANGE UNIT
PAGE 3
Drag the 3 relevant collision blocks into the collision column. [Rather than
having one breed simply change into the other in a collision, this exercise is
intended to review collisions and hatch]. In the collision, have the losing breed
die and the winning breed hatch a new agent. Be sure to add the set color
and if appropriate, set size blocks so the new agent will look like the originals.
Test the program – you should see one breed win, fairly quickly. It should not be
the same breed each time.
Collisions and hatch
Once the program is working, add a monitor for each breed, and add a line
graph. Unfortunately in StarLogo, you cannot choose the colors used in the
graph – whatever you put in the first slot will be graphed using a red line, the
second slot green, and the third blue. Be sure to name the graph and label the
colors with the name of the breed being counted.
Save and test your program.
PAGE 4
CLIMATE CHANGE UNIT
Notice that StarLogo does not create exactly 30 of each agent, and the
number differs each time. Run the model several times, noting whether the
breed with the highest initial number always wins (it shouldn’t) and discuss 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