Guess the Animal in Yes/No Questions
About this lesson, for parents and teachers
Can you find one animal out of eight by asking only three yes or no questions? A question tree can, every single time.
Ages 6–8 · about 7 minutes · builds on Shape Sorting Bins
Try this
- Answer each question for the animal shown: tap Yes or No and follow the path down the tree.
- Some questions are missing! Pick a question that gives one animal a yes and the other a no.
- Pick a secret animal and answer honestly. The tree will guess it in 3 questions.
- If the tree guesses wrong, the owl tells you which answer to check.
How it works
A decision tree is a set of yes or no questions joined like the branches of an upside-down tree. You start at the top, answer a question, and follow the yes branch or the no branch to the next question. At the very bottom, each branch ends at an answer, called a leaf.
Each question splits the animals into two groups. Does it live in water? sends the dolphin, shark, crab and fish one way, and the bird, bee, elephant and snake the other way. One question cut eight animals down to four. The next cuts four to two, and the last one cuts two to one. That is why three questions are enough for eight animals.
A good question is one that splits the group. Can it fly? is useless for telling a bird from a bee, because both answers are yes. Does it have feathers? works, because the bird says yes and the bee says no. Picking good questions is the hardest and most important part of building a tree.
The tree only knows what you tell it. If you answer a question wrong, it follows the wrong branch and makes a wrong guess. Computers are the same: their decisions are only as good as their questions and their information. When the tree guesses wrong in the last round, it is usually because one answer sent it down the wrong branch. Fixing that one answer fixes the guess.
Where engineers use this
Doctors use decision trees to check symptoms, banks use them to spot strange payments, and many machine learning programs build their own trees from data.
Words to know
- Decision tree
- Yes or no questions joined in branches, leading to an answer.
- Branch
- A path from one question to the next. Each question has a yes branch and a no branch.
- Leaf
- The end of a branch, where the answer is.
Talk about it
Goal: Follow yes/no questions down a tree to guess an animal, the way many computer decisions work.
- Why was Can it fly? a bad question for telling a bird from a bee?
- How many questions would you need for 16 animals?
- Can you make a question tree for the people in our family?
Without a screen: Play 20 questions with yes or no answers only. Then draw your questions as a tree on paper with yes going left and no going right. Try to find a question that splits the possible answers in half each time.
Curriculum links: CSTA K-12 1A-AP-12 (develop plans that describe a program's sequence of events, goals and expected outcomes); CSTA K-12 1A-DA-07 (identify and describe patterns in data); AI4K12 Big Idea 3 (learning)
Questions
What is a decision tree for kids?
It is a game of yes or no questions drawn as a tree. Each answer sends you down one branch to the next question, until you reach an answer at the end of a branch.
How many yes or no questions do you need to guess between 8 things?
Three, if every question splits the group exactly in half: 8 becomes 4, then 2, then 1. Each extra question lets you double how many things you can tell apart.
Do computers really use decision trees?
Yes. Decision trees are used in medicine, banking and games, and machine learning programs can build decision trees by themselves by looking at lots of examples.