One example at a time一次看一個例子
The computer checks two fruits. For each one, read what it found and see whether the wall moved.
電腦檢查兩顆水果。每一顆都讀一讀它發現了什麼,看看隔板有沒有動。
How Computers Work · Unit 4 · Lesson 15 · 電腦概論 單元四 第十五課
Nobody writes the rule this time. On a table in 3D lie apples and oranges, and a wall that starts in the wrong place. The computer looks at one example after another, and moves the wall a little whenever it is wrong. Watch it find the border by itself. Then give it too few examples, give it wrong answers, and be the teacher yourself.
這一次沒有人寫規則。3D 的桌面上擺著蘋果和橘子,還有一片一開始放錯位置的隔板。電腦一個例子接一個例子地看,每分錯一次,就把隔板挪一點。看它自己把界線找出來。接著只給它很少的例子、給它錯的答案,再換你當老師。
In machine learning, nobody writes the rule for the computer. Instead it is given many examples with the right answers, and it adjusts itself a little each time it gets one wrong, until it gets most of them right. What it ends up with can only be as good as the examples it was given.
機器學習的時候,沒有人替電腦把規則寫好。電腦拿到的是很多附有正確答案的例子;每分錯一個,它就把自己調整一點,直到大部分都分對。它最後學到的東西,最多只能和它拿到的例子一樣好。
3D Model · 3D 模型
Each ball on the table is one fruit: red for an apple, orange for an orange. A fruit sits farther right if it is heavier and farther back if it is redder. The upright wall is the computer’s rule: everything on one side it calls an apple, everything on the other an orange. Press “One example” to watch the computer check a single fruit, or “Keep learning” to let it run. The small fruits with white rings are new ones it never studies; they show how well it does on fruit it has not seen.
桌上每一顆球是一顆水果:紅的是蘋果,橘的是橘子。越重的水果越靠右,越紅的越靠後。那片立著的隔板就是電腦的規則:它把一邊的全部叫做蘋果,另一邊的全部叫做橘子。按「看一個例子」,看電腦檢查一顆水果;或按「一直學」讓它跑下去。那些小一號、底下有白圈的是新水果,電腦從來不拿它們來學;它們用來看電腦面對沒看過的水果時表現如何。
Drag to turn · 拖曳旋轉
This 3D model needs WebGL, which this browser does not support. The buttons and the counters below still work, and so do the reading and the games.
這個瀏覽器不支援 WebGL,無法顯示 3D 模型;下面的按鈕和計數照樣能用,課文和小遊戲也都能用。
A teaching model. The fruits and their numbers are made up for this lesson; nobody measured them. The method is one of the earliest and simplest, called a perceptron: one straight wall and three numbers to adjust. Real systems that recognize faces or speech are neural networks, which have a great many adjustable numbers in place of our three, and learn from far more examples. The word “learn” needs care too. The computer is not understanding fruit. It is following a rule for adjusting numbers, exactly as written.
這是教學用的示意模型。這些水果和它們的數字是為這一課編的,沒有人真的去量。這裡的方法是最早、最簡單的一種,叫感知器(perceptron):一片直的隔板,要調的只有三個數。能認出人臉或語音的真實系統是類神經網路,要調的數多得多,學的例子也多得多。「學習」這兩個字也要小心。電腦並沒有在了解水果;它是在一絲不差地照一條「怎麼調整數字」的規則做。
Model and code are drawn and programmed by My Culture Connect. Every count on this page is checked in tools/computers/test/learn.test.mjs.
模型與程式由人師教育協會自行繪製、撰寫;這一頁出現的每一個數字都有自動測試(tools/computers/test/learn.test.mjs)。
Reading · 英文閱讀
Every program so far in this course followed rules that a person wrote. The robot turned left because someone wrote “turn left.” But some jobs are very hard to write rules for. How would you write the rule for telling an apple from an orange in a photo, or for reading messy handwriting? There are too many cases to list. For jobs like these, there is another way.
Instead of rules, give the computer examples. Each example comes with the right answer: this one is an apple, that one is an orange. Picture the fruits lying on a table, placed by how heavy and how red they are, and an upright wall across the table. The wall is the computer’s rule: apples on one side, oranges on the other. At the start the wall is in a bad place.
Now the computer looks at one example. If the wall already has that fruit on the correct side, nothing changes. If the fruit is on the wrong side, the computer moves the wall a little, toward getting that one right. Then it looks at the next example. In our model there are 24 fruits. After looking at 40 examples, the wall has moved 5 times, and every fruit is on the correct side. Nobody told the computer where the wall should go.
This is called machine learning, and the steps of looking and adjusting are called training. Notice that the computer is still doing exactly what a program says, as in Lesson 9. The program just does not say “this is an apple.” It says “when you are wrong, adjust a little.” That is why the word “learn” is in quotation marks. The computer is adjusting numbers. It does not understand what a fruit is.
Because everything comes from the examples, the examples matter a great deal. Give the computer only four, and it is satisfied too soon: the wall fits those four, but it gets some new fruits wrong. Give it examples with wrong answers, and the wall never settles, because no wall can agree with all of them. The computer cannot tell which answers to doubt.
Real systems do not use one wall. They use neural networks, with a great many numbers to adjust, and they are used to recognize handwriting, faces, and speech. What such a network knows is spread through those numbers. It is not written out anywhere in the program. For a large network, it can be extremely difficult to follow exactly how an answer was reached. So people test it on new cases it has never seen, and they keep checking what it says.
Questions · 閱讀理解
How is machine learning different from the programs in Lesson 9?
What does the computer do when the wall has a fruit on the wrong side? What does it do when the fruit is on the correct side?
Why do the examples matter so much? Give two ways they can go wrong.
Words & Phrases · 生字及片語
Quick Check · 小測驗
1. In machine learning, what is the computer given?
2. In the model, what happens when the wall has a fruit on the correct side?
3. Why is “learn” in quotation marks in this lesson?
4. What goes wrong when the computer is given only four examples?
5. According to the reading, why do people test a neural network on new cases?
Try It in the Model · 在模型裡試試
Turn the model with your finger or mouse to look straight down on the table. From above, the wall is a line.
用手指或滑鼠轉動模型,從正上方往下看桌面。從上面看,隔板就是一條線。
The computer checks two fruits. For each one, read what it found and see whether the wall moved.
電腦檢查兩顆水果。每一顆都讀一讀它發現了什麼,看看隔板有沒有動。
At the start 17 of the 24 fruits are on the wrong side. Watch the “wrong now” counter. Does it go down smoothly?
一開始 24 顆裡有 17 顆在錯的那一邊。注意看「現在分錯幾顆」。它是平順地往下降嗎?
The computer stops because nothing is wrong any more. Then look at the small fruits with rings. Which rings are red?
電腦停下來了,因為沒有東西分錯。接著看那些有白圈的小水果:哪幾個圈變紅了?
Four fruits carry the wrong answer. Watch how often the wall moves now. Does it ever come to rest?
有四顆水果的答案是錯的。注意隔板現在多常移動。它有停下來的時候嗎?
Try It · 自己試試
Here the examples come from you. Choose a fruit and tap the square to put it down: across is weight, up is redness. Put apples in one area and oranges in another, then press Learn and see where the computer draws its line. Then try to fool it.
這一次,例子由你來給。選一種水果,點方框把它放下去:橫的是重量,直的是有多紅。把蘋果放在一區、橘子放在另一區,按「學」,看電腦把線畫在哪裡。然後試著騙騙它。
Which fruit to put down · 要放哪一種
The computer here can only draw one straight line, and it stops after 400 examples. A fruit with a dark outline is one the line gets wrong. Nothing you put down here is sent anywhere.這裡的電腦只會畫一條直線,而且看了 400 個例子就停。外框變深的水果,就是那條線分錯的。你在這裡放的東西不會送到任何地方。
Game · 小遊戲
Eight jobs a computer can do. For each one, decide: did a person write the rule step by step, or did the computer adjust itself by looking at examples?
電腦會做的八件事。每一件都想一想:是人一步一步把規則寫好的,還是電腦看著例子自己調整出來的?
Right on the first try · 第一次就答對 0 / 0
The four “learned” answers follow Britannica’s articles on neural networks and machine learning. The four “rule” answers are from earlier lessons of this course.四個「從例子學的」答案依照大英百科「類神經網路」與「機器學習」條目;四個「人寫的規則」來自這門課前面的課。
Stories Behind Machine Learning · 機器學習的故事
Four short stories about machines that adjust themselves.
關於「會自己調整的機器」的四個小故事。
1943, 1954
Britannica describes a neural network as a computer program that works in a way inspired by the natural neural network in the brain. The theory was developed in 1943 by the neurophysiologist Warren McCulloch and the mathematician Walter Pitts. In 1954 Belmont Farley and Wesley Clark of the Massachusetts Institute of Technology succeeded in running the first simple neural network.
大英百科說,類神經網路是一種電腦程式,運作的方式受到大腦裡天然神經網路的啟發。它的理論基礎在 1943 年由神經生理學家麥卡洛克(Warren McCulloch)和數學家皮茨(Walter Pitts)提出。1954 年,麻省理工學院的法利(Belmont Farley)和克拉克(Wesley Clark)成功執行了第一個簡單的類神經網路。
1957
The moving wall in this lesson is a perceptron. According to Britannica, perceptrons are a type of artificial neural network investigated by Frank Rosenblatt, beginning in 1957, at the Cornell Aeronautical Laboratory. Rosenblatt and his followers called their approach connectionism, to stress how important the making and changing of connections is in learning. Researchers still use that word.
這一課那片會動的隔板,就是一個感知器。根據大英百科,感知器是一種人工類神經網路,由羅森布拉特(Frank Rosenblatt)從 1957 年起在康乃爾航空實驗室研究。羅森布拉特和追隨他的人把這種做法叫做連結主義(connectionism),強調「建立和改變連結」在學習中有多重要。這個詞今天的研究者還在用。
Training · 訓練
What you watched has a name: supervised learning. Britannica explains that each training example contains both the input data and the desired output, just as each fruit on the table came with its label. As soon as the network performs well enough on additional test cases, it can be applied to new ones. The small ringed fruits in the model are test cases of exactly that kind.
你剛才看到的做法有個名字:監督式學習(supervised learning)。大英百科解釋,每一個訓練用的例子都同時包含輸入的資料和想要的輸出——就像桌上每一顆水果都附著它的標籤。等到網路在另外的測試案例上表現得夠好,就可以用在新的案例上。模型裡那些有白圈的小水果,正是這樣的測試案例。
Hard to follow · 很難追
In an ordinary program you can read the rule. In a neural network, Britannica notes, knowledge is distributed throughout the network itself rather than being explicitly written into the program. It adds that for large networks it can be extremely difficult to follow exactly how an output was determined. With one wall you can see the whole rule at a glance. With a great many numbers, nobody can.
一般的程式,規則讀得出來。大英百科指出,在類神經網路裡,知識是分散在整個網路之中,而不是明白地寫進程式。它還說,網路很大的時候,要弄清楚某個輸出到底是怎麼決定的,可能極為困難。只有一片隔板的時候,整條規則一眼就看完;數多到不行的時候,誰都看不完。
Myth vs. Fact · 常見迷思
✗ Myth · 迷思A computer that learns understands what it has learned.會學習的電腦,了解它學到的東西。
✓ Fact · 事實In the model it adjusts three numbers by a fixed rule. It can separate apples from oranges without any idea of what a fruit is.在模型裡,它是照一條固定的規則調整三個數。它分得開蘋果和橘子,卻完全不知道水果是什麼。
✗ Myth · 迷思With machine learning, nobody has to write a program.有了機器學習,就不必有人寫程式。
✓ Fact · 事實Someone still writes the program that says how to adjust. What nobody writes is the final rule.還是得有人寫出「怎麼調整」的程式。沒有人寫的,是最後得到的那條規則。
✗ Myth · 迷思If it gets every example right, it has learned well.每一個例子都分對了,就表示學得好。
✓ Fact · 事實With only 4 examples the model gets all 4 right and then gets 2 of 12 new fruits wrong. It has to be tested on cases it never saw.只給 4 個例子的時候,模型 4 個都分對,卻把 12 顆新水果裡的 2 顆分錯。一定要拿它沒看過的案例來測試。
✗ Myth · 迷思A learning computer can work out which of its examples are wrong.會學習的電腦,看得出哪些例子是錯的。
✓ Fact · 事實In the model it treats every label as true. Four wrong labels keep the wall moving, and it never finds out which four they are.在模型裡,它把每一個標籤都當成真的。四個標錯的答案讓隔板動個不停,而它始終不知道是哪四個。
Remember It · 記憶口訣
The computer finds the rule itself.
規則由電腦自己找。
Right? Change nothing.
對了?什麼都不改。
Too few, or mislabeled, and it goes wrong.
例子太少或標錯,它就學歪。
Getting the examples right is not enough.
例子都分對還不夠。
Before You Start · 動手之前
Classroom Activity 1 · 課堂活動一
You need · 準備材料
Steps · 步驟
Then swap two students’ cards without telling the computer and run it again. Ask what the computer would need in order to notice the swap. In Taiwan’s curriculum, machine learning is not named in the junior high Information Technology content. It appears in senior high: 資 D-V-2, basic concepts of data mining and machine learning.
接著偷偷把兩位同學的卡片對調,不告訴電腦,再跑一次。問問大家:電腦需要什麼,才發現得了有人被對調?在十二年國教課綱裡,國中「資訊科技」的學習內容沒有列出機器學習;它出現在高中:資 D-V-2 資料探勘與機器學習的基本概念。
Classroom Activity 2 · 課堂活動二
You need · 準備材料
Steps · 步驟
There is no single right count for the first two steps; it depends on where you put the fruit. That is the point: what the computer ends up with depends on its examples. For the last step, a good sentence is: “No straight line can put every fruit on the correct side.”
前兩步沒有唯一的正確數字,要看你把水果放在哪裡。重點正在這裡:電腦最後學到什麼,取決於它的例子。最後一步,一個好的句子是:「No straight line can put every fruit on the correct side.」
Go Further · 延伸閱讀
Sources · 資料出處
Facts on this page were checked against these sources (October 2026); the fruits and their numbers are made up for the example, and every count is tested · 本頁的事實依下列資料查證(2026 年 10 月);水果和它們的數字是為了舉例編的,每一個數字都有測試