Train Your Tree: How AI Learns to Decide

In this beginner-friendly, hands-on lesson, school-aged children step into the role of junior AI engineers to explore how Artificial Intelligence systems make logical choices. Using a diverse collection of everyday emojis, learners gather data, identify distinguishing features, and map out a physical decision tree using simple yes/no questions. They put their creations to the test, observing exactly when and why their logic path makes mistakes, and then redesign their trees to boost accuracy. By the end of the session, learners experience the full mini-cycle of AI logic design—data categorization, rule-based modeling, error analysis, and iterative model optimization.

Learners will:

  • Analyze structured data to explain the underlying logic behind how AI systems make automated decisions.
  • Identify the structural components of a decision tree, mapping out roots, branches, and leaves.
  • Diagnose system misclassifications to recognize exactly when and why simple, rule-based models fail.
  • Optimize model performance by analyzing logic errors and redesigning decision rules through iterative testing.

To complement this hands-on activity, students may also explore Code.org’s How AI Makes Decisions unit, which provides a virtual version of similar concepts. 

This lesson is a beginner-level introduction to how AI makes decisions. While the target age band is 5-11, the activity is designed to support any learner who needs a clear and accessible starting point, including older students who are new to AI.

Train Your Tree Lesson Overview

    • Emoji Sheets (1 sheet per group)
    • Desk space to create a decision tree (you can also have students use the wall or a whiteboard)
    • Pencil, Pens, or Markers 
    • Highlighter
    • 2 different colored sticky notes for writing questions and creating branches
    • Tape for attaching emoji cards to the wall or a whiteboard
    • Student Worksheet (optional): Train Your Tree: How AI Learns to Decide 
    • Emoji Generator (optional)Consider allowing students to create their own emoji sheets as an extension activity. Blank templates can be found on the “Emoji Sheet” document. TryEngineering suggests you complete the lesson as a whole-group activity so students understand what is expected, and then have students create their own emoji sheet and decision tree. Here is a link to an emoji website that also includes an emoji generator!
    • Code.org’s How AI Makes Decisions unit (optional):  To complement this hands-on activity, students may also explore Code.org’s How AI Makes Decisions unit, which provides a virtual version of similar concepts. 
  • You’re a junior AI engineer working for EmojiWorks, a company that designs emojis. EmojiWorks wants to add a new feature to their app: a smart AI emoji sorter that helps users quickly find the emoji they are looking for by typing phrases such as “happy emoji,” “animal emoji,” “red emoji,” etc.

    Your job is to develop a rule-based decision tree that sorts emojis into the right categories. You’ll look closely at each emoji’s features and attributes, collect data, and design the yes/no questions that AI will use to decide which category each emoji belongs to. 

    Criteria:

    • Each emoji must have at least 3 pieces of data and at least 1 highlighted data
    • Decision trees must have at least 2 questions (a root node and decision nodes)
    • Decision trees must have a minimum of 2 leaf nodes (categories)

    Constraints:

    • You must stay within the emoji set provided
    • Complete in the allotted time

    **Note: Consider allowing students to create their own emoji sheets as an extension activity. Blank templates can be found on the “Emoji Sheet” document. TryEngineering suggests you complete the lesson as a whole-group activity so students understand what is expected, and then have students create their own emoji sheet and decision tree. Here is a link to an emoji website that also includes an emoji generator!

    1. Sorting Activity (Slides 2)

      Break the class into teams of 2-3. Each student team will receive an emoji sheet and sticky notes. (
      Students need to cut each emoji from the sheet.)
      Instruct students to sort the emoji cards on their desks. They must create at least two categories. Do not provide any other instructions.
      After sorting, students should write the names of each category on a sticky note.

      **Note
      : There is no correct or incorrect way to sort as long as there are two categories, and the student team has reasoning as to why they sorted the way they did.
    2. Sorting Reflection (Slide 3)

      Conduct a whole group discussion. Ask students:

      • How did you sort your emojis?
      • Why did you categorize them that way?
      • What features helped you decide which categories to create?

      Explain to students: These features can be considered data.

    3. Present the Design Challenge (Slides 4-6)

      Read the design challenge to students. Discuss the criteria and constraints.
    4. What is a Decision Tree? (Slides 7-9)Provide the students with background knowledge about AI decision trees. Explain to students: You will act as the AI system, collecting data on the emojis and creating questions to sort them into the proper categories.
    5. Collecting Emoji Data (Slides 10-11)Students will act as the AI system to collect data about each emoji in their set.

       

      • Students should identify at least 3 characteristics or features of each emoji. Examples include: yellow, red, smiling, round eyebrows, living thing, open mouth, etc. They should not identify emotions (e.g., happy, sad, angry). 


      Students should write the characteristics and features on the back of each emoji card. See example on slide 9.

      After they collect data, ask students: “If I wanted to sort my emojis exactly as you did, what pieces of data would I use?”

      For each emoji, students will highlight at least 1 piece of data that allows each emoji to be sorted into the categories they created. See example on slide 10.

      **Note: The highlighted data will support students in creating questions for their decision tree

    6. Build Your Decision Tree (Slide 12)


      Students will use the data they collected to create their decision tree. Students can use their desk, a wall, the floor, or a whiteboard to build their decision tree.
      Students will write their questions–both the root node and decision nodes–on one color of sticky note (pink in the example). They will write their branches on a second color of sticky note (purple in the example). Students will place them on their workspace. Optional: Students may also record their questions on the student worksheet. **Note: The data students recorded on the back of each emoji card can help them create their questions. 

      Image Description: Using “Happy” and “Sad” as the leaf nodes (categories), the root node is “Does the emoji have a tear?”. The “yes” branch leads to the decision node: “Is the emoji frowning?” and the “no” branch leads to the decision node: “Is the emoji smiling?”. Both decision nodes have yes/no branches leading to the leaf nodes.

    7. Test Your Decision Tree (Slide 13)


      Students will test their decision trees by putting all of the emoji cards at the top of the tree (
      above the root node sticky note). They will run each emoji through the tree, starting with the root node, following the branches to the decision nodes, and so on until each emoji is classified under one of the leaf nodes. 

      The decision tree is successful if each emoji falls under the leaf node (category) that the students assigned it to during the sorting process. For example, if a student sorted this emoji, 😢, into the sad category, and it ends up under the “happy’ leaf node, then the decision tree was not successful. 

      **Note: This is where students may experience misclassifications (see example image). Inform students that this is okay and to leave it for now. They will have an opportunity to redesign.

    8. Reflection & Importance of Misclassifications (Slide 14-15)

      With their team, students should reflect on the following questions:

      • Were any emojis misclassified? If so, why were they misclassified? 
      • What feature(s) (root node, decision nodes, leaf nodes) of the decision tree can be changed or added to improve its accuracy or make it better? 


      Optional: Students can record their answers on their worksheet. 

      Explain to students why misclassifications matter (slide 15).

    9. Redesign & Optimize (Slide 16)

      Students will redesign their decision tree by adding new decision nodes (questions) that allow for more accurate classification, or by creating new leaf nodes (categories) and redesigning the entire tree with a new root node and decision nodes (questions). 

      Students will test their redesigned decision trees.

      In the example image, a new decision node was added to make the decision tree more accurate.

      Optional: Students will record their classifications and observations on their worksheet. 

    10. Reflection (Slide 17)

      As a whole group, discuss the following questions with students.
      Optional: They can also record the answers on their worksheet.

      1. What feature(s) of the decision tree did you change or add? The root node? The decision nodes? The leaf nodes?
      2. After redesigning, did your decision tree become more accurate?
      3. Did your decision tree have any misclassifications?
      4. What did you learn about how AI uses decision trees to make decisions?
    11.  Photo Gallery
  • What is Artificial Intelligence?

    Artificial Intelligence (AI) is a technology that makes machines seem smart, letting them “think” and solve problems as people do. AI systems follow patterns, rules, and data to make decisions. Examples of AI tools include ChatGPT, Voice Assistants (Amazon Alexa), and Self-Driving Cars.

    How do Computers Learn? – From code.org

    • Step 1: A human finds and sorts data.
    • Step 2: A human teaches the computer by giving it the training data.
    • Step 3: The computer makes better predictions with more data from the human.
    • Step 4: The computer makes predictions on its own.

    What is a decision tree? 

    A decision tree is a supervised learning algorithm for classification, meaning that it learns from labelled data. Every input has a corresponding output. 

    An AI decision tree is labelled like an upside-down tree. It starts with a root node and ends with leaf nodes.

    The decision tree starts with a root node and splits data into branches. These branches lead to decision nodes, and eventually, leaf nodes, that represent the AI’s final decision. 

    Decision trees have four main components:

    • The root node is the starting point of the tree. It represents the entire dataset before any splits are made. 
    • The decision nodes are internal nodes where the tree tests a feature (attribute) and splits the data into groups.
    • Branches are the paths that connect nodes. Each branch represents the outcome of a decision or test. 
    • The leaf nodes are the endpoints of the tree. Each leaf represents the final classification or decision. 

    Why misclassifications matter?

    Sometimes AI makes mistakes—called misclassifications. This happens when the rules are too simple or the features are confusing. Misclassifications matter because they can lead to:

    • wrong decisions — the system chooses the wrong category, action, or response
    • loss of trust — people stop relying on the system if it keeps getting things wrong

    Engineers fix this by testing, analyzing errors, and redesigning the system so it becomes more accurate and fair.

    • Accuracy – how many items the model gets right
    • Algorithm –  a set of steps a computer follows to solve a problem
    • Artificial Intelligence (AI) – a technology that makes machines seem smart, letting them “think” and solve problems as people do
    • Branch –  the path taken after answering a rule
    • Classification: sorting items into categories
    • Data – information that we collect; AI uses data to learn
    • Decision Node – the internal nodes that test an attribute
    • Decision Tree – a supervised learning algorithm for classification, meaning that it learns from labelled data. Every input has a corresponding output. 
    • Feature – something that an item has or is; a characteristic used to describe something
    • Leaf Node – represents a classification or decision; they do not split
    • Misclassification – when the AI makes a wrong prediction 
    • Root node – the starting point of a decision tree; represents the entire data set, which gets divided into two or more sets
    • Sort – to put items into groups based on their features
    • Supervised Learning Algorithm – a type of machine learn where a model learns from labeled data, meaning every input has a corresponding correct output.
    • Visit code.org‘s How AI Makes Decisions for a virtual version of this lesson on similar topics. 
      • Lesson 1: Making Predictions introduces students to the fundamentals of AI and machine learning with an emphasis on data categorization. 
      • Code.org’s lesson builds on the sorting activity in this TryEngineering lesson plan.
    • Extension Activity: Allow students to create their own emoji sheets. Blank templates can be found on the “Emoji Sheet” document. 
      • TryEngineering suggests you complete the lesson as a whole-group activity so students understand what is expected, and then have students create their own emoji sheet and decision tree. Follow this link to an emoji website that also includes an emoji generator!
  • Train Your Tree: How AI Learns to Decide – Student Worksheet

     

    Part 1: Sorting Reflection

    How did you sort your emojis? List the names of the categories.

     

    Why did you classify them this way?

     

    What features helped you decide which categories to create?

     

    Part 2: Data Collection

    Act as the AI system to collect data about each emoji in your set. 

    • Identify at least 3 characteristics or features of each emoji.
      • Do not identify emotions (e.g., happy, sad, angry).
    • Write the characteristics/features on the back of each emoji card.

     

    For each emoji, highlight at least 2 pieces of data (characteristics/features) that allow each emoji to be sorted into the categories (leaf nodes) you created. 

     

    Part 3: Create Your Decision Tree

    Using the data you collected, create at least 2 yes/no questions that will allow your emojis to be sorted into the leaf nodes (categories) you created. These questions are your decision nodes.

     

    Root Node (Question #1): 

     

    Decision Node (Question #2):

     

    Decision Node (Question #3):

     

    Decision Node (Question #4):

     

    Decision Node (Question #5):

     

    Your leaf nodes are the categories you created during the sorting activity. You must have at least 2 leaf nodes

     

    Leaf Node:

     

    Leaf Node:

     

    Part 4: Testing Your Decision Tree

     

    Test #1 – Total # of Emoji Cards: ____________

     

    Correct

    Classifications

    Incorrect Classifications

     

    Were any emojis misclassified? If so, why were they misclassified? 

     

    What feature(s) (root node, decision nodes, leaf nodes) of the decision tree can be changed or added to improve its accuracy or make it better? 

     

    Test #2 – Total # of Emoji Cards: ____________

     

    Correct

    Classifications

    Incorrect Classifications

     

    Part 5: Final Reflection

     

    What feature(s) of the decision tree did you change or add? The root node? The decision nodes? The leaf nodes?

     

    After redesigning, did your decision tree become more accurate? Were there any misclassifications? What could you do to improve your decision tree?

     

    What did you learn about how AI uses decision trees to make decisions?

  • Primary Anchor: Australian Curriculum: Digital Technologies (v9.0) — Years 7–8

    AC9TDI8P05

    Standard: Design algorithms involving nested control structures and represent them using flowcharts and pseudocode.

    • Active Fulfillment: Students physically map out a decision tree flowchart using yes/no questions to categorize their emoji datasets. This action actively constructs nested control structures (branching if/else logic) in an unplugged, physical format.

    • Auditable Evidence: A physical or drawn decision tree diagram mapping out distinct roots, decision branches, and outcome leaves.

    AC9TDI8P06

    Standard: Trace algorithms to predict output for a given input and to identify errors.

    • Active Fulfillment: Students manually trace new test emojis through their custom decision tree rules, predicting outputs and diagnosing exactly where their logic fails when an emoji is misclassified.

    • Auditable Evidence: An error analysis log or marked-up decision tree draft highlighting the specific nodes where logic errors or misclassifications occurred during testing.

    AC9TDI8P08

    Standard: Generate, modify, communicate and evaluate alternative designs.

    • Active Fulfillment: Students evaluate the classification accuracy of their initial emoji decision tree, propose modified logic structures or alternative sorting criteria, and redesign their physical model to optimize performance.

    • Auditable Evidence: A finalized, optimized decision tree showing the modified logic paths alongside a record of the model’s accuracy improvement.

    International Crosswalk (Secondary Frameworks)

    Region Framework Code Mapping Alignment
    United States CSTA K-12 CS Standards 2-AP-10 Use flowcharts and/or pseudocode to address complex problems as algorithms (specifically, mapping branching decision paths with conditional rules).
    United Kingdom National Curriculum (Key Stage 3) Computing Design, use, and evaluate computational abstractions that model the state and behaviour of real-world problems (utilizing structured, unplugged decision logic to categorize dat
.vc_tta-panels-container .vc_tta-panel, .vc_tta-panels-container .vc_tta-panel-body img , #engineering-design-process .vc_tta-panel-body .vc_row .wpb_column:first-child img{page-break-inside: avoid;position:relative !important; } .vc_tta-panels-container .vc_tta-panel#translations{display:none !important; } .article-text .vc_tta-title-text {font-size:1.75em; color:#00629B;} .article-text h4.vc_tta-panel-title {padding-top:2em;} .article-text .lessonPlan-downloads, .article-text .buttonsetc{display:none !important;}

Lesson Plan Download

Before downloading, please share with us some information.

Name(Required)
Are you a(n)(Required)