Introduction to Algorithms via Rock-Paper-Scissors

This workshop introduces programming via a simple rock-paper-scissors game. Participants will think about the rules of the game in terms of algorithms.

Target group
All
Age group
All
Proficiency level i
Level 1
Format
Activity sheet
Copyright i
Creative Commons (BY-SA)
Language
English, French , Français

General Objective

Knowledge acquisition

Preparation time for facilitator

less than 1 hour

Competence area

3 - Digital content creation

Time needed to complete activity (for learner)

1 - 2 hours

Name of author

Adrien Tellier - BSF Belgique

Support material needed for training

Paper Pens, pencils.

Resource originally created in

French
Workshop directions

Tournament (10mins)

To ensure everyone knows what they are doing for the following sections, start by holding a basic rock-paper-scissors tournament. Ask participants to split into pairs and play one round.
The loser is eliminated and the winner will face another winner and so on until only one person is left.
Those eliminated can watch the following rounds and try to guess the winner.

Writing the rules in groups (10mins)

Divide participants in groups of 3-4 people and ask them to write the rules of rock-paper-scissors together (disregarding tournament rules) in the most precise way – using the fewest words – possible. Leave them 5 minutes, then ask each group to present their result.
The goal is to create debate between participants regarding which rules to keep. Are there superfluous rules ? Which details are missing in which version? Help them think about all aspects by asking them questions, such as ‘can we play with more than two players ?’, ‘how many times do we play?’, etc.

Write the final version together completed and succinct.
Keep in mind these essential elements :

  • 2 players only
  • Several rounds can be played with each bringing 1 point; the player with the most points at the end wins
  • The choice to play rock, paper or scissors is not made visibly
  • In the case of the same choice, the round starts again
  • Rock beats scissor
  • scissor beats paper
  • Paper beats rock

Linking to more advanced ideas (5mins)

Discuss with participants the links between this exercise on rule implementation and what will follow this workshop:

  • For a workshop based on making a game, emphasise that:
    • Even a simple game can have ‘many’ rules
    • All possible situations must be anticipated, including how games are won, lost, drawn, and nullified
    • Game variants should be considered
    • Rules must be finalised before programming begins to know what we will need to work (variables, event chains, etc.)
    • Is the game balanced as it is? What is balance and how do we achieve it?
  • For a workshop on algorithms :
    • Compare the first versions of the rules with the final ones: which are detailed enough for humans and which for computers?
    • why do we need to be so precise when we ‘talk’ to a computer?