Observe
Write only what the dice show.
Welcome to computer science
Today's goal: discover a hidden system by observing, testing, and explaining.
Listen for clues
Polar bears, they come in pairs.
How many bears?
They sit around the hole in the ice
like petals around a flower.
Fish swim in a hole.
How many fish?
Look below.
Take control.
Fish eat plankton, so they hang out where the fish are not.
How many plankton?
They travel in groups of seven.
Try multiplying the spots.
Partner challenge
Write only what the dice show.
Propose three separate rules.
Choose a roll that could disprove a rule.
Revise using evidence, not guesses.
Use physical dice or the digital challenge. Do not search for the answer.
Test your algorithm
Reveal after investigation
Odd faces have a center pip: one hole.
Count the pips around an odd face's center.
Fish are hidden on the face beneath each ice hole. Imagine turning the die over to count them.
On even faces: visible pips multiplied by 7.
Discuss before we code
Which top faces contain a center hole? How could an algorithm recognize those faces?
When a hole is present, how can the top value determine the number of surrounding bears?
How can you determine the hidden bottom value using only the odd top face?
When no hole is present, how do the visible spots determine the plankton count?
Be ready to describe each rule as a calculation or an if/otherwise decision.
From pattern to program
Odd faces follow the hole branch. Even faces follow the plankton branch.
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)
CS connection · 1 of 5
AP CSP Practice 1 · Computational Solution Design · Skill 1.A
Investigate the situation, context, or task.
Definition: Pattern recognition is identifying similarities, trends, or relationships that repeat across examples.
Connection to the game: You compared multiple rolls and noticed that the same kinds of faces repeatedly produced holes, bears, fish, or plankton. Those repeated relationships became evidence for your rules.
CS connection · 2 of 5
AP CSP Practice 1 · Computational Solution Design · Skill 1.B
Determine and design an appropriate method or approach to achieve the purpose.
Definition: Decomposition is breaking a complex problem into smaller, more manageable problems that can be solved separately.
Connection to the game: Instead of solving the entire mystery at once, you separated it into four questions: Where are the holes? How are bears counted? Where are fish? How are plankton counted?
CS connection · 3 of 5
AP CSP Practice 3 · Abstraction in Program Development · Skill 3.B
Use abstraction to manage complexity in a program.
Definition: Abstraction simplifies a problem by focusing on relevant information while hiding or ignoring details that do not affect the solution.
Connection to the game: The die's color, location, and rotation did not matter. You represented each die with the information the solution needed: its top value, whether that value was odd or even, and its hidden opposite value.
CS connection · 4 of 5
AP CSP Practice 2 · Algorithms and Program Development · Skill 2.B
Implement and apply an algorithm using sequencing, selection, and iteration.
Definition: An algorithm is a finite, ordered set of precise steps used to complete a task or solve a problem.
Instructions performed in a specific order. Game: initialize totals, examine a die, apply its rule, then update a total.
A decision that chooses which instructions run. Game: use one branch for odd faces and another for even faces.
Repeating instructions. Game: apply the rule to each die in the roll.
CS connection · 5 of 5
AP CSP Practice 4 · Code Analysis · Skill 4.C
Identify and correct errors in algorithms and programs, including error discovery through testing.
Definition: Testing runs a solution with chosen inputs and compares the result with what was expected. Debugging locates the cause of an error and corrects it.
Connection to the game: You predicted totals for a new roll and checked the result. When a prediction failed, you found the assumption that did not fit the evidence, revised the rule, and tested again.
Where this course is going
Exit reflection
What did your group believe at first?
What evidence changed or strengthened your idea?
How was this process similar to debugging a program?