Objectives
In this lesson you will learn:
- Agents use sensors to gather information about their environment.
- AI agents use electronic sensors to gather information.
To complete this lesson you will need:
- A device with access to Internet
- AI Inventors notebook
- Smartphone (optional)
Over the course of this lesson you will:
- Identify sensors on your smartphone
- Create an AI agent
Sensors gather information
- Agents try to sense their environment so then take creative actions.
- Agents have different types of sensors that use to gather information about their environments.
Stop and answer
What are your human sensors? How do your sensors help you gather information about the environment?
AI agents don’t have ears or eyes, but humans have invented electronic sensors that can help them to gather information about their environment.
Challenge 1
Find sensors on your phone that gather information similar to your human sensors
Touch | Fingerprint sensor to unlock, Pressure sensor on the screen to understand when you are texting |
Eyes | Camera |
Ears | Microphone |
Challenge 2
Can you find apps with sensors that gather different information
Tell you where you are | Location apps (like maps) use sensors like GPS to understand where you are, Compass uses a magnetometer sensor to measure magnetic fields to understand your phone’s orientation |
Measure movement | An accelerometer sensor gather information about how many steps you’ve taken (for health apps) or how fast you are driving (for maps) |
Measure light | An ambient light sensor measure how dark or light a place is to adjust your screen’s brightness or flash (camera) |
What can AI agents do with the gathered information?
The sensors in your phone can be used to gather information for AI agents.
Sensor | Information gathered | What AI agents can do with the information |
---|---|---|
Camera | Images of its surroundings | Identify items in a viewfinder, Translate text in the image from one language to another |
Location | Identify where your phone is in the world | Update traffic routes and directions based on where you’re going and the surrounding traffic |
Microphone | Capture spoken words and sounds | Understand and react to a human speaking to a voice assistant (like “Hey Siri! or “OK Google!”) |
Agents can use sensors to help understand their environment.
AI inventions using sensors
There are many types of sensors an AI agent could use to gather information.
Some examples of AI inventions
Remember agents?
AI agents use sensors to find patterns in environments and make decisions towards goals.
Some AI agents use many types of sensors to understand their environment, find patterns and make decisions towards goals.
Stop and answer
What information about the environment are the sensors gathering? What patterns does the AI look for? What decisions are the inventions making?
Make an AI agent
Your challenge is to follow these steps to create an AI agent that finds patterns in animal images to decide what animal it’s looking at. You will design your AI agent to identify between two things. For example, your agent could be programmed to determine if an image contains a narwhal or a unicorn. They both have a spike on their head, but unicorns look like horses and narwhals look like whales. You will train your AI agent to identify differences between them by supplying it with images of unicorns and narwhals. After your AI agent has been trained with enough information it will be able to decide if an image is a narwhal or a unicorn.
Cognimates Tutorial
Creating the API key
- Create an account by following this link to Clarafi https://portal.clarifai.com/signup
- Then login using your email and password at the Clarafai login https://portal.clarifai.com/login
- Once you are logged in select “create new application”
- Create a name for your application and then select “create app”
- Click on the application name to see the application details
- Then select the “API keys” section of the application details to see the API key
- Finally, click “copy to clipboard” and continue to register with Cognimates
Start a project on Cognimates
To begin training your AI agent you must also set up your project on Cognimates. Follow the link and begin by clicking the button to train a model, then click train vision, and then name you project. Begin the process by following this link to Cognimates http://cognimates.me/home/
After naming your project you must paste your Clarafai API key into the Clarafai key field, and select “set key”
Train your model
Next, input the categories of objects that your AI agent will be identifying. For example, you could enter “narwhal” and then select “add category.” Then you would enter “unicorn” and select “add category.” Now your agent knows that it is distinguishing between narwhals and unicorns, or you could do cats and dogs, or shoes and hats.
After you have chosen the categories of objects, you will upload 10 images of each object.
When you are done adding images of the objects, click “train model”
Test your model
Finally, now that your model is trained you can test it by uploading a new image that belongs to one of your categories, like narwhals or unicorns. Then select “predict” to discover if your agent can correctly identify your image.
Reflect
AI Inventors notebook
Do you have an idea for an AI invention that would use sensors to gather information and find patterns?
Can you think of a way that an AI agent could use images to solve a community problem?
Big Takeaways
Agents can use sensors to understand their environment.
AI agents can use electronic sensors to gather information and find patterns.
You built an AI agent that finds patterns in animal pictures!