Tuesday, June 9, 2015

A Classroom Game to Teach Data Representation With Images

Our Gram's House team has been working on three classroom games designed to teach middle school girls about computer science principles.  One game intends to teach data representation by showing how images can be represented on computers with numbers.  Here are the current rules of the game.  These are not final—there are open questions about some individual rules, and we need to do more play testing with the target audience.  Feedback is most definitely welcome!

Materials

Each player will receive two pieces of paper.  The first will be hidden from the other player and contain an encoded image and the total number of black cells contained in the image.  The image will be different for both players.


The second page is a blank grid where the encoded image will be revealed over time.  This page will be placed on the table where everyone can see it.  Each player must copy the total number of blacks in her image onto this page.


Each player also needs a pen.

Rules

Players alternate turns, with the youngest going first.

On her turn, Player A calls out a row number and column number.  Player B then takes one of the following actions:
  • If the cell on Player B's publicly revealed image is blank, the colour of the cell will be revealed.
    • If the corresponding cell on Player B's hidden image is a 0, Player B places a dot inside the cell on the revealed image to indicate that the cell is white.
    • If the corresponding cell on Player B's hidden image is a 1, Player B colours the entire cell with her pen to indicate that the cell is black.
      • When the revealed cell is black, Player A gets to call a second row and column, which can be for the same cell or a new one.  This happens only once, and only when revealing a black cell for the first time.
  • If the cell on Player B's publicly revealed image is already revealed as a certain colour, a run of cells directly to its right is also revealed until the colour changes, or the row ends.
    • If the very next cell is a different colour, nothing new is revealed.
Winning the Game

A player wins the game if the public image of their opponent has all of its black pixels revealed first.

Example

Here is an example turn.  Player A is trying to reveal Player B's image.  Player B's publicly revealed and hidden encoded images currently look like this:


Player A calls "4, 2" which means she wants to reveal the cell at row 4, column 2.  Player B looks at her hidden encoded image and sees that the cell at "4, 2" contains a 1, so the cell needs to be coloured black:

Because a black cell was revealed, Player A gets to call an extra row and column.  Though not required, she decides to call "4, 2" again to see if she can reveal a run of blacks following the first one.  Player B sees that there are three more cells that contain 1 before the colour changes, so Player B colours in all three cells:


Player A's turn is now finished.

0 comments:

Post a Comment

Comments are moderated - please be patient while I approve yours.