← Back to course
AI Explorers 6-8 / Week 04 / Explorer Quest
6/6
Week 04 · Representation and Reasoning

Explorer Quest

Explorer Quest: Family decision tree
// From feature tables to decision trees
⏱ about 20 min

Explorer Quest: Family Decision Tree

It is a quiet evening at the station. Raven has spread twelve household objects on the table.

"New game," she says. "Rocket, build a decision tree that sorts these into three groups."

Rocket picks up a spoon, then a sock. "Only yes or no questions?"

"Only yes or no," Nova says. "And try to use as few questions as you can."

Rocket thinks hard. His first question splits the pile in half, and Raven cheers.

Then Raven hands him a mystery object to test his tree.

  1. A representation stores what we know using a data structure, like a feature table.
  2. Each row is a record and each column is a feature.
  3. Reasoning works out new information from what is already known.
  4. A decision tree can be drawn as a flowchart or written as pseudocode, and the order of tests matters.
  5. Real AI is a tool people build. It does not think like a person, and it can be wrong.
◇ FAMILY DECISION TREE
Gather ten to twelve safe objects from around the house.
Choose three groups to sort them into, such as kitchen, clothing and toys.
Together, make a small feature table: write two or three features for each object.
Build a decision tree of yes or no questions that sorts every object into its group.
Write the same tree as pseudocode, using IF, ELSE IF and ELSE.
Test it on one new object someone else picks. Did the tree get it right?
For a grown-up
Use safe, unbreakable objects. Nothing sharp or hot.
Ask: which question did the most sorting work, and why?
Ask: when your tree made a mistake, was the problem the questions or the order?
QUEST CHECK
  • Read the question.
  • Tap your answer.
Your first question splits twelve objects into six and six. Is that a useful first question?
Your tree and your pseudocode give different answers for the same object. What does that tell you?
Working out new information from what is already known is called ____.
WHY THIS EXERCISERepresentations and reasoning work together in every AI system.
← Friday