Today's blog combines two hot topics in education right now: coding and gamification. In case you are not familiar with these two ideas, I offer some definitions from Wikipedia:
Definitions
Gamification is the use of game thinking and game mechanics in non-game contexts to engage users in solving problems.
Computer programming is the comprehensive process that leads from an original formulation of a computing problem to executable programs. It involves activities such as analysis, understanding, and generically solving such problems resulting in an algorithm, verification of requirements of the algorithm including its correctness and its resource consumption, implementation (or coding) of the algorithm in a target programming language.
What I love about today's post is that it begins with the simplest of all well-known games: Rock, Paper, Scissors (RPS) and then, with some well-placed edtech, turns it into something fabulous!
Most of us in the U.S. learned RPS as a child, and some of us employ it as adults to determine who gets to make important decisions like where to go for dinner. :) Just in case you've never played, here's how it works.
What you may NOT know is that there is some wonderful mathematics behind RPS involving "clock arithmetic" (more accurately known as "modular arithmetic") AND that there is a society (!) dedicated to the game and its winning strategies.
You also may not know that variants of the game abound, the arguably most famous of which may be the 5-sign version: Rock, Paper, Scissors, Lizard, Spock.
This version of the game was invented by Sam Kass and his equally geeky wife, Karen Bryla in the 90's and made widely known because of an episode of The Big Bang Theory that aired in 2008.
Sidebar: for the geeks reading this, please note that I give you links to all the above-mentioned details in the References section below. You're welcome! :-)
Now, you may be asking, why 5 signs? Why not 4 or 6? Excellent questions, my dear reader! The answer, as it turns out, is where the wonderful math comes in. Mathematician Alan Yuille explains: “You select an odd number of objects (e.g., rock, Spock) and arrange them in order on a circle (like numbers on a clock),” writes Yuille. “Say that there are 7 objects. Then you make each object beat the next 3 objects clockwise and lose to the 3 objects counterclockwise (more generally, replace 7 by 2n +1 and 3 by n). This means that each object wins half the time (so no object is favored).” If there were four objects (or 6 or any other even number), there is no "middle" (much like what happens when trying to find the median value of a data set with an even number), thus one object would have more favorable outcomes and the game would not be fair.
Sidebar: Educators interested in yet more connections between this post and probability and statistics (especially involving "fair games") are encouraged to email me.
Of course you can just use the game itself in a math class with instructions to have your students determine whether or not the game is fair and that can lead to a wonderful discussion by itself. However, if you are looking to "kick it up" a notch, I offer this: add coding! Regular readers may recall previous blog posts where I discussed taking a programming MOOC and what I learned about Python in the process. Python is a wonderful language for beginning coders and programming a version of this game is a fabulous way to connect math and technology with those aspects of gamification that cause our students to be really engaged with the assignment.
In my class, we were assigned the Rock-Paper-Scissors-Lizard-Spock game in Week 1 (if that gives you any idea of how quickly you can have your students up and running in the language). As I mentioned in the other posts on the subject, we used CodeSkulptor which I have been highly recommending to all the teachers I work with ever since because (a) it's free! and (b) it's web-based so you don't have to worry about installation issues (no worries about your school blocking anything or not having rights to download and install software or apps). Here's the game I coded (I got a perfect score BTW *holla at your girl coder!*). Notice that it's not interactive (remember it was only week 1!), but that would be a great addition for those of you looking for fun STEM assignments for your students.
As always, I'd love to hear from you. Happy Gaming & Coding!
References:
See the video of Janken, the robot that always wins at RPS
The secret to winning at RPS every time
Article about learning from games like chess
Code.org Anybody can Learn to Code
CodeAcademy (A great resource to learn to code)
Learn Python at CodeAcademy
Nice article on the math behind Rock, Paper, Scissors, Lizard, Spock
The Coursera course on Python from Rice (I HIGHLY recommend this course -- it is excellent!)
The Solver Blog
Author: Dr. Diana S. Perdue

