What is AI, really?
Ordinary software follows rules a person wrote. Machine learning flips that around: you show the computer examples and it works out the rule for itself. Let's feel the difference with a spam filter.
Be the programmer: write a spam rule
Each dot is an email. Across is how many links it has; up is how many SHOUTY WORDS!!! it uses. Coral dots are spam, blue dots are real mail.
Drag the sliders to write a rule: "If it has more than X links or more than Y shouty words, it's spam." Anything in the shaded zone gets flagged. How high can you get the accuracy?
Tip: a perfect score is hard. Real emails sometimes shout, and some spam is quiet. Rules made of straight cut-offs struggle with that.
Now let the machine learn the rule
This is a perceptron, one of the oldest learning algorithms (1958!). It starts with a random dividing line. Each step it finds an email it got wrong and nudges the line a little towards the right answer. That nudge is what "learning" means.
Press Train and watch the line find its way. Wrong guesses pulse.
So what is "AI"?
Artificial intelligence is a broad term for computers doing things that seem to need intelligence: recognising faces, translating languages, playing chess, writing text.
Most modern AI is machine learning: instead of hand-writing every rule, we write a learning procedure and feed it lots of examples. The perceptron learned from 40 emails. Today's language models learn from trillions of words, but the core idea is the same: guess, measure the error, nudge, repeat.
Later in the course we'll stack these learners into agents that don't just answer questions but take actions. First, we need to see what's inside the box.