> For the complete documentation index, see [llms.txt](https://www.pythonclassroom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pythonclassroom.com/python-curriculum-map/pedagogy/activities/mastermind.md).

# Mastermind

{% embed url="<https://docs.google.com/presentation/d/1m8AydSpdkzbrNmUOQTuKTy_1wI2-zK1XqZ1G3xOw2fo/edit?usp=sharing>" %}

## Introduction

This game of mastermind uses eight colors. The teacher selects three colors for their combination. The teacher is not picking any repeat colors. With this version of the game, the students should be able to have the answer in 6 guesses or less. If students have never played before, it is good to do an example on the board to show expectations. The very first time you play it will probably take 30 minutes to explain, demonstrate, and move through two rounds.

### Eight Colors

1. Red
2. Blue
3. Yellow
4. Green
5. Magenta
6. Orange
7. Purple
8. White

### Secret Code

| Position 1 | Position 2 | Position 3 |
| ---------- | ---------- | ---------- |
| Red        | Blue       | Magenta    |

### Game Rules

1. The teacher puts the students into groups of 3.
2. The teacher picks the secret code. (Three colors/no repeats.)&#x20;
3. Explain to students they will be making their guess one set at a time (three colors)
4. Before allowing the students to start working in their groups, tell them that each guess they make is a clue to the secret code. Encourage the students to use the first letter of each color as they guess. This will get them into the routine of using symbols.
5. Teacher will call the students over for each round of guesses. By calling them by Round 1, Round 2, etc., you are ensuring the the teams are not rushing.
6. When students bring up their guess, tell them how many colors they have correct, then how many colors they have in the correct space. (For example, 1 correct, none in the right space)
7. Students will return to their groups to formulate their next guess. Give groups about 45 seconds between guesses.
8. Call students up for round two and repeat steps 6-7.
9. If students guess in 6 or less, then they win! If they do not complete their guesses in 6 or less then their game is over.
10. Have a winning and losing team place their guess process on the board. Have them explain their process and discuss logically why their guesses made or did not make sense. Explaining the process at the end will help make all groups more successful.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.pythonclassroom.com/python-curriculum-map/pedagogy/activities/mastermind.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
