Skip to main content
Machine Learning & Deep Learning

⏱ About 10 min10 XP

Programmed vs. Learned

Imagine two helpers. One helper has a rulebook. Every answer they give comes straight from the rulebook — no exceptions. The other helper has no rulebook. Instead, they watched hundreds of people do a job and figured out how to do it themselves. Both helpers are useful! But they work in very different ways. Today we will find out how machines can be like either helper.

Programmed: Following Fixed Instructions

A programmed machine follows rules that a person wrote down for it ahead of time. The rules do not change. Think about a traffic light. Someone programmed it to turn green for 45 seconds, then yellow for 5 seconds, then red for 40 seconds. It does that all day, every day, forever. Nothing it sees changes its behavior. That is a programmed machine. Or think about a vending machine. Press B3, get chips. The machine does not get better at giving you chips over time. The rule is fixed: press B3, give chips. End of story.

The Big Idea

A programmed machine follows instructions a person wrote. A learning machine figures things out by studying many examples. One is told exactly what to do; the other discovers what to do.

Learned: Figuring It Out From Examples

A learning machine is different. Nobody writes it a rulebook. Instead, you show it thousands of examples and let it figure out the patterns. Imagine you want a machine to recognize handwritten letters. You could try to write rules like: the letter A has two diagonal lines and one horizontal line. But handwriting looks different for every person! There are too many variations to write rules for. So instead, you show the machine a million photos of handwritten letters. Each photo is labeled: this is an A, this is a B, and so on. The machine studies the patterns in all those photos until it figures out what makes an A look like an A, even when it is squiggly or slanted. Nobody told it the rules. It discovered them from the examples.

Fill in the missing word in each sentence.

A machine follows instructions that a person wrote down for it.

Here is an easy way to remember the difference. Programmed = told what to do. Learned = figured it out from examples. A programmed machine is like following a recipe exactly. A learning machine is like tasting a dish a hundred times and slowly figuring out the recipe yourself. Both can make a great meal. But they get there in completely different ways.

Neither Is Better!

Programmed machines are great for jobs with clear, fixed rules — like traffic lights. Learning machines are great for jobs with too many variations to write rules for — like reading handwriting. Good engineers pick the right tool for the job.

Which of these is a programmed machine?

Why would you use a learning machine instead of a programmed machine to read handwriting?

Rules vs. Examples Challenge

  1. You will play two rounds of a sorting game.
  2. Round 1 — Programmed: Write down two rules for sorting a pile of household objects (for example: rule 1: things that are red go left; rule 2: everything else goes right). Sort the objects using only those rules. Notice how fast it is!
  3. Round 2 — Learning: Mix the objects up. Now have a helper sort them into two piles WITHOUT telling you the rule. Ask them to show you one object at a time and tell you which pile it goes in. After seeing several examples, try to figure out the rule they are using.
  4. Talk about it: which round felt more like programming a machine? Which felt more like training one?