Lesson #8: Build Your AI Invention


In this lesson you will learn:

  • About other AI inventions made by families that gather data and take actions
  • Continue building yor invention on your phone/computer or outside of your machine

To complete this lesson you will need:

  • A device with access to Internet
  • AI Inventors Notebook

Over the course of this lesson you will:

  • Build your AI invention to gather data, make decisions and take actions.

Review: Agents and Sensors

Agents try to understand their environment so they can take actions. Humans are agents, and so are AI. They both use sensors to help understand their environment. Your phone has sensors that mimic human sensors.

Remember, AI agents use many types of sensors to gather data. AI can be programmed to find patterns in data, which so it can make decisions that enable actions.


How many different types of sensors can your group think of in 2 minutes?


Let’s look at AI inventions that gather data to make decisions and take actions.

Invention Example: Job Search AI

One invention gathers data by using a location sensor to understand where the user is. Then it collects survey data from the user who inputs answers on a keyboard. Finally, the invention makes decisions that enable actions. It determines what job a person might want, and has a chatbot explain the job.

Invention Example: CO2 Detector

This group’s invention gathers data using a Carbon Dioxide sensor to detect dangerous gasses in the air. Then the invention makes a decision that enables action. It decides if air is polluted and turns on an LED to signal alert.

Invention Example: Bullying Identifier

Another group’s invention gathers data using a computer’s camera to process pictures drawn by children. Then the invention makes a decision that enables action. It determines if a child is being bullied and alerts parents of the likelihood of bullying with a percentage.

Tips for Building Your AI Invention

You can build an invention only using a computer, or you can use other parts too.

Sensors Gather Data

If you are building an AI invention suing your computer, think about how you can use the sensors in the computer like the microphone, keyboard, or camera. If you are using you computer and other parts, pick a sensor that helps gather the data that you will need in order to find patterns.

Program AI to Find Patterns in Data

Program your AI agents using ML4K or Cognimates. If you are building an invention that gathers data with a sensor, you will usually need a microcontroller (such as Raspberry Pi or Microbit) to help communicate the data.

To Make Decisions

Train your AI agents with ML4K or Cognimates to make decisions. Continue adding data and testing the model until it makes decisions with high levels of accuracy. 

To Enable Actions

Output your ML4K or Cognimates agent into Scratch or Codelab. From there you will have AI blocks that you can program to take different actions depending on what you want your invention to do. You could turn on an LED, make a buzzer ring, or something else!

How to Manage Your Time  

Spend 20 minutes building your invention (if needed). Spend 20 minutes programming your agent in ML4K or Cognimates. Then spend 30 minutes training, testing and improving your model. Finally, spend 30-50 minutes programming your agent’s actions. 

Are you unsure where to start? 

  • Think about what decisions you want your invention to make.
  • Build an AI agent that gathers data and is programs to make decisions you like
  • After you have trained you AI agent to make the right decisions, try to enable it to take different actions in Scratch


In your AI Inventors notebook

  • What can your invention do?
  • Is it easy for humans to use?
  • What could you do to improve it for your users?

Big takeaways

You can keep building your invention. Before the next meeting, show your invention to someone else. Ask them if it is easy to use, and how they would improve it.