Everything a teacher needs to deliver this lesson — pick your grade's script below once you've read the background.
This lesson runs 5–15 minutes inside the app and sits right after "Learning from Examples" (3.1.1) in World 3. That earlier lesson taught supervised learning — AI learning from data that already has the right answers attached. This lesson flips that: what happens when nobody hands AI any answers at all, and it has to find structure in a pile of data on its own? That is unsupervised learning, and clustering is its most common form.
By the end of the lesson, a student should be able to:
Every AI lesson before this one in the app has relied on labeled data — data that already comes with the right answer attached, like a photo tagged "cat" or an email marked "spam." That's supervised learning: the AI is shown thousands of labeled examples and learns to predict the label for new, unseen examples. This lesson introduces the other major branch of machine learning: what happens when there are no labels at all, just a pile of raw data and the instruction "find something interesting in here."
That is unsupervised learning, and the most common technique inside it is clustering — grouping data points together based on how similar they are to each other, with no predefined categories. Imagine handing an AI system a spreadsheet of a thousand customers' purchase histories, with no labels of any kind — no "type A" or "type B" column. A clustering algorithm will still find that, say, 200 of those customers buy similarly (mostly discount items, price-sensitive), 150 buy similarly in a different way (new gadgets, willing to pay a premium), and so on. Nobody told the AI those groups exist or what to call them; it discovered the groupings purely from patterns in the numbers.
How does "how alike they are" actually get measured? The app's own explanation is the honest, simple one: the AI treats each thing as a point that can be plotted, and measures the distance between points — points that are close together are treated as similar, points that are far apart are treated as different. A common clustering method, K-means, then works in repeated rounds: it starts by guessing a few "center" points (the "means"), assigns every data point to whichever center is nearest, recalculates each center as the average position of the points now assigned to it, and repeats — assign, recompute, assign, recompute — until the groups stop changing. The "K" in K-means is simply how many groups to look for, and a human has to choose that number ahead of time; the app is careful to flag this as one of unsupervised learning's real limits — there is no single "correct" grouping the way there's a correct label in supervised learning, and choosing K badly (too few groups lumps very different things together; too many splits one real group into several fake ones) can produce misleading results. One common way analysts pick a reasonable K, the "elbow method," plots how well the clusters fit for each candidate K and looks for the point where adding more groups stops helping much — the lesson's 11–14 quiz asks about exactly this.
For older students, the lesson introduces two more ideas that live under the same "no labels" umbrella but do a different job than clustering. PCA (Principal Component Analysis) and autoencoders are both about dimensionality reduction — simplifying data that has many measurements per item down to a few that still capture most of what matters. PCA finds the handful of directions in the data along which it varies the most and re-describes every data point using just those, discarding directions that carry little information. An autoencoder is a neural network trained to squeeze its input through a narrow "bottleneck" layer and then rebuild the original from that bottleneck — the network only gets good at this if the bottleneck has learned to hold a compressed, information-dense summary of the input. Neither needs a single label to train on; both learn purely from the structure of the data itself.
The oldest band also meets three more advanced ideas, presented as extensions of the same theme rather than a full new topic: t-SNE and UMAP, two techniques for squashing high-dimensional data down to a 2D or 3D picture a human can actually look at, while trying to keep points that were close together in the original data close together in the picture; VAEs (Variational Autoencoders), a variant of the autoencoder idea above that learns a probability distribution rather than one fixed compressed value, which lets you sample new points from that distribution and generate brand-new, plausible data rather than only reconstructing what went in; and SimCLR, a self-supervised method that manufactures its own training signal by taking two randomly altered versions of the same image (a crop, a color shift) and training the network to recognize that they came from the same source — again, no human-provided label required anywhere.
No prep and nothing to print. Each student (or pair, if devices are shared) needs a phone, tablet, or computer with a browser and the AIQ app loaded — the lesson's hook, learn scenes, and quiz all run on-device with no login required. Read the Teacher Background above once before class. For the extension activities below, a handful of small everyday objects that can be sorted several different ways — buttons, coins, mixed candy, or a pile of school supplies — are useful but not required; index cards and a marker cover the same ground if objects aren't handy.