In this lesson, students explore more deeply how communication between
multiple computers can work over the Internet. They do this by playing a simplified game of
Hangman, in which the first game is played unplugged, in their table groups, and the second
game is played using a Silent Message Network, so that multiple students can connect to each
other and see each other's messages. Students must devise a messaging protocol that makes it
clear who is sending the message and who the intended recipient is. Students then devise a
binary protocol for playing this game which will entail developing an addressing system for
players, as a well as a formal packet structure for transmitting data about the state of the
IP Address: A number assigned to any item that is connected to the Internet
Packets: Small chunks of information that have been carefully formed from larger chunks of information
Protocol: A set of rules governing the exchange or transmission of data between devices
Students will be able to:
Explain why messages need to contain addressing information (sender/recipient identification).
Invent an informal addressing protocol for use in the Battleship game
Recall that browsing the Internet entails computers sending each other requests
and sending back data to satisfy those requests.
This lesson builds up to students learning about the
"Internet Protocol" addressing system, commonly known as IP Addresses.
Up to this point in the course, we have only used point-to-point
communication. The "protocols" students were inventing mostly had to
do with encoding information in binary, rather than also encoding communication information
required for successful delivery of the message.
The lesson mimics a real problem that designers of the internet had
to solve. Many computers are connected together by networks. So if a computer sends some
bits out, those bits pass through many computers. How does a computer know who those bits
are for? If a response is necessary, how does it send it back? This is a complicated question,
but the first part of the answer is that you need an addressing system, and some kind of fixed
structure for messages that everyone agrees on (a protocol) so messages can be interpreted
properly. (We'll get to routing later).
In this lesson we will use a simulation that is setup to "broadcast" every message to every person in the group. Since everyone receives any bits that were
sent by anyone else, a method for identifying the intended sender and receiver of the message is
needed. Students will invent a protocol for addressing messages.
Many network systems, such as local ethernet and WiFi, rely on addressing
schemes to make sure bits are received by the correct computer based on address and for other
computers to simply ignore messages not intended for them.
So far we have only solved Internet problems when you are
connected to one other person (so-called "point-to-point" communication).
Obviously, the Internet is bigger than that, and today we're going to look at problems that
involve multiple people.
We will start by playing a game that simulates some issues that arise when constructing the Internet
We will play a crazy game of Hangman where instead of playing against one other person you will play multiple games against multiple other people simultaneously
In our version today, you will play in groups of 3 (4 is OK)
To make it easier to track, try to keep the number of letters in a word to 5, but you may use more if you would like a challenge
And we'll just play with paper and pencil, or a tactile material
Form groups of 3 (a group of 4 is OK, but not recommended). Then read through the Broadcast Hangman Rules resource.
Review the rules for the multi-player version as a class, and answer any logistical questions.
If you are non-visual learner, use an accessible document to keep track of the letters that have already been guessed and for possible word guesses.
Broadcast Hangman Round 1 - Unplugged
Start the Game Unplugged.
Spend a couple minutes to play the game.
You might not finish the game, but you should get a good feel for how the game works and what the mechanics of the game are.
Pause the Game after 5 minutes - make sure you are recording the progress of the game (which letters are already called by the opponent, and which calls made hits.)
You will return to playing in a minute - You record you current spot in the game if necessary to pick up where you left off.
Once you figured out how to play this game, we are ready to face the next challenge - playing silently.
In the high school level Computer Science Principles curriculum in Code.org, we use a silent message network in this part of the lesson.
One of the participants of the game would send a group email message to all players. Common screen readers such as JAWS, NVDA and VoiceOver are compatible with major email software.
If you are skilled in texting on your phone, you may choose to use group texting over phone service if they are allowed in your class.
You may choose to create a google doc for this purpose and share it with all players. In this case, using Chrome browser and Chromevox screen reader may provide the best screen reading functionality for you.
The Silent Message Network
Spend 5-10 minutes to finish your game using the silent message network.
Enforce the no-talking rule.
You should quickly discover that you need to "address" your messages. That is, you need to indicate the sender (yourselves) and the intended recipient somewhere in the message, in order for the game to work.
Different tables (and different player pairs) may invent different ways of doing this. Some examples: "Hi, Tom, it's Mary", "Mary to Tom", "Mary -> Tom", "To Tom, From Mary", "Mary is asking Tom right now", etc.
Some methods may be more informal, or buried in content of the message: "Tom, Letter Q. This is Mary, by the way", "That T message was for Tom. It's Mary", "I just sent that message. This is Tom. No, the other message."
Hangman was chosen because it has several properties that force concepts of internet protocols to come out. Hangman has a relatively fixed size message length, a need to encode information (e.g. letters), to and from addressing, and a verification message (hit or miss).
This activity should be done with absolutely NO TALKING.
Without talking, communication protocols will organically come out as we try to play the game in the silent message network.
After students finish the Silent Message Network round, give them a brief opportunity to refine their protocols by considering the following questions.
What protocol have you been using? Did you have a protocol at all?
How can you standardize your communication?
How do you make your message as clear as possible?
How do you make your message as efficient (short/easy to interpret) as possible?
Broadcast Hangman Round 2
After you have had a chance to coordinate and refine your protocols, try out on a fresh game. Return to the message network, start a new game and test out your protocol. Stick to the No Talking rule. If necessary, use a clean copy of the Broadcast Hangman Game Board for use in this round.
At this point, playing the game is less important than moving towards developing a clear and efficient protocol.
You might notice that a concise protocol makes it harder for you as humans to play the game, but be reminded that you are the computers in this activity.
Why would it be important to keep the message short and standardized? Make a connection to the protocols from previous lessons: Sending Numbers and Sending Text.
Invent a Binary Protocol for Hangman
Previously you came up with a method for exchanging messages on an open broadcast channel to play multiple games of Hangman at once. Now that you've played Hangman this way, with your group or with a partner, use the "Invent a Binary Protocol for Hangman" resource to describe an efficient binary protocol for playing a 3-person game of Hangman that can be played accurately over a silent message passing network. Let "efficient" mean that your protocol uses the smallest reasonable number of bits (each bit holds a 0 or 1) to make messages for Hangman that still contain all of the necessary information for playing the game. The following questions should help students create more efficient protocols.
How will you standardize the recipient and sender addresses?
Should you encode people's names or (hint) use a number?
How would a recipient of your message know where address ends and the other begins?
What other information do you need to include?
Discuss and Share
"Did any other group do something similar? or something completely different?"
"What pieces of information were common across all of the protocols? Sender, recipient, word choice, hit/miss info."
"If we were to play a different game, what data would stay the same? What would change?"
A good solution uses a numeric address (not tied to a person's name) and a fixed length message. The number allows you to uniquely identify players (like a phone number) and having a fixed length helps know where each "chunk" of the message starts and ends.
How many bits do you need for addresses? -- For each person playing Hangman each should have a unique ID (e.g. 2 people need 1 bit, 3 people need 2 bits, 8 people would need 3 bits). This means that each player can have a unique code.
How many bits are needed for the total message? -- Answers to this will vary and creativity should be encouraged.
However, it should be evident from the students' protocols that they recognize the fundamental elements of the game and what might be able to be compressed into only a few bits.
It turns out computers on the Internet are addressed in a similar way to phones for many of the same reasons. The real addresses used on the Internet are called "Internet Protocol Addresses" or IP Addresses for short. Have students watch this video and complete the accompanying Video Guide in the Resources section.
To improve communication in playing Hangman your group invented a:
Which of the following information is not necessary in your protocol to play Hangman?
Even with a good protocol, what are some of the privacy and security challenges of playing Broadcast Hangman across a network?
Security and Privacy: If the messaging scheme your group designed was really used on the Internet, what could go wrong in terms of security and privacy? Think about what a malicious person could do. What if the messages sent weren't about a game but about something more personal like a conversation with a friend, some medical information, or communicating with a bank?
The structure of the internet allows anyone to create a fake return address. Bob could send you a message and claim it's "from Alice," and you'd have no way to confirm who sent it if the sender did not include a digital signature.
When you broadcast over a network there can be little expectation of privacy, anyone in the network can view messages that are sent over that network.