First-day computer science challenge

Can you discover the rules beneath the ice?

Observe the dice. Test a hypothesis. Use evidence. Revise your thinking. That is how computer scientists turn a mystery into an algorithm.

One important rule: do not search for the solution. The productive struggle is the point.
01

Begin with the clues

The riddle of the ice

Polar bears, they come in pairs.
They sit around the hole in the ice
like petals around a flower.

How many polar bears do you see?

Fish swim in a hole.
Look below.
Take control.

How many fish are in the sea?

Fish eat plankton, so they hang out
where the fish are not.
They travel in groups of seven.
Try multiplying the spots.

How many plankton?
02

Investigate with a partner

Think like a reverse engineer

1

Observe

Describe exactly what is visible. Separate observations from guesses.

2

Hypothesize

Propose one rule for bears, one for fish, and one for plankton.

3

Test

Choose a roll that could prove your rule wrong. Record the evidence.

4

Refine

Keep what the evidence supports and revise what it does not.

Interactive lab

Game challenge

Count from the top faces only. Enter your three predictions, then verify the complete roll.

A wrong answer is data. Change one part of your hypothesis and test again.
03

After the reveal

From pattern to program

Once your class has investigated, open the explanation. Notice how each thinking move maps to a core computer science practice.

Reveal the rules and CS connections

Ice holes

An odd face has one center pip, so 1, 3, and 5 each contain one hole.

Polar bears

On an odd face, count the pips around the center: 0 on a 1, 2 on a 3, and 4 on a 5.

Fish

Fish are below each hole. Opposite sides of a standard die add to 7, so fish beneath an odd face equal 7 minus the top value.

Plankton

Plankton appear where fish do not: on even faces. Each visible pip represents a group of 7 plankton.

Pattern recognition

You compared examples to find relationships that repeat.

Decomposition

You split one large mystery into smaller bear, fish, and plankton problems.

Abstraction

You ignored unneeded details and represented each die with the few facts that affect the result.

Algorithm

You turned the pattern into precise steps using sequence, selection between odd and even faces, and iteration across every die.

Testing and debugging

You tried inputs, compared predicted and actual outputs, and revised an incorrect rule.

The rule as pseudocode

A repeatable algorithm

holes ← 0
bears ← 0
fish ← 0
plankton ← 0

FOR EACH die
  IF die is odd
    holes ← holes + 1
    bears ← bears + (die - 1)
    fish ← fish + (7 - die)
  ELSE
    plankton ← plankton + (die × 7)