Examples instead of rules
There are two ways to make a computer sort things. A person can write every rule, or people can give it examples and let a learning program find the rule. The AILit framework of the OECD and the European Commission (2026) puts the difference in one line: some AI systems “can be programmed with specific rules to accomplish tasks, while others can learn patterns from data”. What AI is and isn’t sets the two side by side. This page is about the second kind, machine learning.
AI4K12’s draft guidelines describe what it does: machine learning “allows a computer to acquire behaviors without people explicitly programming those behaviors”. Nobody writes the rule. The program finds a pattern that fits the examples, and the same draft says the result “can be applied to new data to solve problems or make decisions”.
Examples, labels and features
Three words do most of the work.
- An example is one thing the program is shown: a picture, a sound, a sentence, a row of numbers.
- A label is the group a person says the example belongs to: “poisonous” or “not poisonous”, the sun tank or the moon tank.
- A feature is something about the example that can be seen or measured: stripes, spots, size, colorcolour.
AI4K12’s draft makes this a goal for children in its K–2 band: “Identify patterns in labeled data and determine the features that predict labels.” Its example has children study cartoon fish labeledlabelled “poisonous” or “not poisonous” and work out the rule, and it notes that “the features are intuitive, even though the classification rule should not be”. Children see the stripes and spots at once; which of them decides the group is what they have to work out.
People make every one of these choices. The same draft says it plainly: “People choose the features.” People also choose the examples and put the labels on them, and a wrong label teaches a wrong pattern: the 2026 CSTA standards expect fourth graders to observe that “Labeling mistakes lead to incorrect predictions.” The standards give the reason this matters: once children learn that AI systems are “created by humans, trained on human-collected data, and shaped by human decisions”, they recognizerecognise mistakes as “predictable consequences of gaps in training data”.
Training examples and test examples
A rule can fit every example it came from and still be wrong about something new. The way to find out is to try it on labeledlabelled examples it did not learn from.
AI Unplugged’s Good-Monkey-Bad-Monkey game (Lindner and Seegerer, FAU Erlangen-Nürnberg) shows how. Zookeepers must work out which new monkeys bite. In its elementary version, 20 picture cards are split into training cards, pinned up as biting or not biting, and test cards kept hidden. Pairs write a rule from the training cards, swap rules with another team, and use them on the hidden monkeys, and the class sees which rule did best. The game’s two messages: “AI classifies data based on patterns”, and “Classification models are not perfect”. Its advanced version adds a monkey whose mouth is a shape no training card showed, so the class sees the rules fail on something unlike every example.
AI4K12’s draft asks the same of grades 3–5: “Train a classification model using machine learning, and then examine the accuracy of the model on new inputs.” If the results on new inputs are poor, it says, “additional training may be required to improve the accuracy”. After training, new examples come without labels, “so the model receives no feedback about the correctness of its class predictions”.
In Teach the sorting machine the class does this with fish: eight example cards in two tanks, five new fish to test the rule on, then fish F, which has neither stripes nor spots.
Why varied examples matter
A learning program can only find the patterns its examples show. AI4K12’s draft says it for K–2: “How well a computer learns to classify depends on the data used to train it.” Its example asks what happens when every food a computer is shown as healthy is green: “what will the computer conclude about green gummy bears?”
More examples help. The 2026 CSTA standards expect fourth graders to observe that “More data improves accuracy”, and the third-grade standard asks children to “Investigate how a machine learning model can change when new data is added to a training set.” But the new examples have to be different, not more of the same. AI4K12’s draft for grades 3–5: “To recognize dogs in images one must have not only many types of dogs, but also many different viewing angles and contexts.”
When the examples are lopsided, the mistakes fall on whatever is missing. CSTA’s second-grade standard asks children to notice “that models can make more mistakes for some kinds of examples than others, especially when the training examples were mostly of one kind”, and that “limited or unbalanced examples can lead to unfair or uneven results”. Why AI gets things wrong follows that through.
What children believe, and what helps
Children rarely think about the examples at all. Among 195 Finnish fifth and sixth graders, references to data in training AI were “practically nonexistent” (Mertala, Fagerlund and Calderon, 2022). One of the three mistaken ideas found among the same children was AI as a machine with its knowledge built in (Mertala and Fagerlund, 2024). What children think AI is has the others.
Doing it helps more than being told. One study found that children needed both to label examples and to test the result before they understood how machine learning works (Hitron and others, 2019). Children aged 7 to 12 who trained their own programs over four weeks “shifted their attribution of agency from the devices to the people who program them” (Druga and Ko, 2021).
How far to go at each age
AI4K12’s draft has children in K–2 study labeledlabelled pictures and say the rule aloud. It marks labelinglabelling data in a tool, decision-tree learning games, learning by trial and error and tiny neural networks “N/A” until grades 3–5, where children also draw the rule as a decision tree instead of only saying it.
The 2026 CSTA standards set similar limits. Kindergartners work with “one or two clear, observable attributes at a time”; second graders “are not expected to independently train machine learning models”; only the fifth-grade standard asks children to “Train a machine learning model to make a classification or prediction”.
So the lessons for younger children here do it all on paper. In Teach the sorting machine children study fish a keeper has labeledlabelled, say the rule and test it on new fish. In Only green examples, a machine taught with lopsided cards gets new ones wrong, and children add examples to fix it.