Software decides things for you all day: what appears at the top of a feed, whether a photo has your face in it, what word you meant when you mistyped. The part of a program that decides is called an AI model.
Here are five real things software does. Your teacher will take them one at a time. For each one, call out the kind of model you think is behind it.
Choose from these four kinds of model:
| Kind | What it does | Where you meet it when coding |
|---|---|---|
| Generative | Produces something new: text, an image, code | An assistant that drafts a function or explains code |
| Recommendation | Ranks options for one person | What a shop or a feed shows a given user |
| Classifier | Sorts an input into categories | Cat or dog, spam or not, rock or paper |
| Agent | Takes a goal, plans, uses tools, acts in a loop | Software that carries out a multi-step task |
The one you are about to build is a classifier. It takes something in and puts a label on it, and it is the simplest of the four to build by hand.
Go to scratch.mit.edu and click Create to start a new project. Call it Cat or Dog. If you are not signed in, the editor has no box for the name, so you will name it when you save it to your computer at the end.
You will write all of today's code on the cat sprite that is already there, so you do not need to add anything.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.