Crack the Code

How it works

Crack the Code is a 2 player game. Here's how to play:

  • One player is the codemaker and the other player is the codebreaker.

  • The codemaker makes a secret code using red and blue chips. The code must have 3 chips (for example, RBR, or BRR, or BBB, etc.).

  • The codebreaker tries to guess the secret code. After each guess, the codemaker tells the codebreaker the number of positions where their guess matches the secret code (but not which positions).

  • The codebreaker wins if they guess the secret code before they run out of guesses. If they run out of guesses before they guess the secret code, the codemaker wins.

Could you guarantee you win the game every time if you're the codebreaker and you only get 4 guesses? What if the secret code has 4 chips instead of 3? How many guesses would you need?

In this activity, students work together to figure out how to beat a facilitator if the facilitator is the codemaker and the students are the codebreakers.

Game Board handout

Why we like this activity

  • It’s fun! Students enjoy playing the game and trying to beat the facilitator.

  • It helps students to develop logical reasoning.

  • It helps students to develop algorithmic reasoning.

  • It requires students to engage in mathematical habits of mind:

    • Using logic and finding and using strategies to win as the codebreaker
  • It has a low floor and a high ceiling: Students can start playing the game by trial and error, but using logic to try to be certain about what the code is and finding a strategy that guarantees that you can crack the code every time is more challenging.

 
 

This activity was developed in collaboration with the Julia Robinson Mathematics Festival.