Welcome
Let’s begin somewhere quiet: a chessboard, two players, a slow afternoon. You don’t need to know anything about computers for this lesson. You only need to know roughly how chess works, and even that is optional.
Two ways to teach a machine chess
Imagine you want to build a machine that plays chess. There are two ways you could go about it.
The first way is to write rules. You sit down and write instructions: “Protect your king. Control the centre. A knight is worth about three pawns.” You keep writing until you’ve covered every situation you can think of. This works, up to a point. But chess has more possible games than there are atoms in the universe, and no one can write a rule for all of them. Sooner or later, the machine meets a position you never imagined, and it has nothing to say.
The second way is to let it learn. Instead of writing rules, you show the machine thousands of games. Millions, even. After each move it makes, you tell it, gently, whether that turned out well or badly. At first its moves are clumsy, almost random. But little by little, it starts to notice things. Certain shapes on the board tend to lead to wins. Certain moves tend to lead to trouble. Nobody told it these things. It found them.
That second way is what a neural network does.
So what is a neural network?
A neural network is a machine that learns patterns from examples, rather than following rules someone wrote down.
That’s really all it is. Everything else in this course, every lesson to come, is about how it manages that.
It might help to notice that this is how you learned most of what you know. Nobody gave you a rulebook for recognising your mother’s face, or knowing when a friend is upset, or catching a ball. You saw examples, you made mistakes, and something inside you adjusted. Neural networks are loosely inspired by that same idea, which is where the word “neural” comes from.
The three pieces to hold onto
Every neural network, from the tiniest to the ones that write essays, has the same three pieces. In chess terms:
- What it sees. The board in front of it: where every piece stands. We call this the input.
- What it decides. The move it chooses to make. We call this the output.
- How it improves. After many games, it adjusts itself so its good moves become more likely and its bad ones less likely. We call this learning, or training.
In between the input and the output, there’s a sort of inner workshop where the network turns “what I see” into “what I’ll do.” That workshop is made of small, simple parts, and we’ll open its door in the next lesson.
What to carry with you
If you remember only one sentence from today, let it be this: a neural network learns from examples instead of following rules. You already understand the most important idea in the whole course.
