Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Artificial Intelligence (AI) · ⁨ปัญญาประดิษฐ์ (AI)⁩

A-Level Computer Science · ⁨Computer Science A-Level⁩ · Topic 18 · ⁨หัวข้อ 18⁩

Video lesson for this topic · ⁨บทเรียนวิดีโอสำหรับหัวข้อนี้⁩ Open the video page · ⁨เปิดหน้าวิดีโอ⁩
13:12

AI คืออะไร

ไม่มีใครเขียนกฎในการแยกแมวออกจากสุนัข ไม่มีการโปรแกรมเมอร์นั่งลงพิมพ์ "ถ้า它有尖耳朵和胡须" แต่โทรศัพท์ของคุณทำได้…

English narration · English + 中文 subtitles burned in · ⁨การบรรยายภาษาอังกฤษ · คำบรรยายภาษาอังกฤษ + 中文 ลอยตัวบนภาพ⁩

18.1

What AI is · ⁨AI คืออะไร⁩

Syllabus · ⁨หลักสูตร⁩
English
Candidates should be able to: Notes and guidance
Show understanding of how graphs can be used to aid Artificial Intelligence (AI) Purpose and structure of a graph Use A algorithm* and Dijkstra’s algorithm to perform searches on a graph Candidates will not be required to write algorithms to set up, access, or perform searches on graphs
Show understanding of how artificial neural networks have helped with machine learning
Show understanding of Deep Learning, Machine Learning and Reinforcement Learning and the reasons for using these methods. Understand machine learning categories, including supervised learning, unsupervised learning
Show understanding of back propagation of errors and regression methods in machine learning
ไทย
ผู้เข้าสอบควรสามารถ: หมายเหตุและคำแนะนำ
แสดงความเข้าใจ about การใช้ graphs เพื่อช่วย Artificial Intelligence (AI) วัตถุประสงค์และโครงสร้างของ graph ใช้ A algorithm* และ Dijkstra’s algorithm เพื่อทำการค้นหาบน graph ผู้เข้าสอบไม่จำเป็นต้องเขียนอัลกอริทึมเพื่อตั้งค่า เข้าถึง หรือทำการค้นหาบน graphs
แสดงความเข้าใจ about artificial neural networks ที่ช่วยให้เกิด machine learning
แสดงความเข้าใจเกี่ยวกับ Deep Learning, Machine Learning และ Reinforcement Learning รวมถึงเหตุผลในการใช้วิธีการเหล่านี้ เข้าใจประเภทของ machine learning ได้แก่ supervised learning, unsupervised learning
แสดงความเข้าใจเกี่ยวกับ back propagation of errors และ regression methods ใน machine learning

Source: Cambridge International syllabus · ⁨แหล่งที่มา: หลักสูตร Cambridge International⁩

English

Artificial intelligence 人工智能 (AI) builds systems that do tasks normally needing human intelligence — recognising speech and images, translating, playing games, driving, generating text. Most modern AI uses machine learning 机器学习 — algorithms that learn patterns from data instead of being programmed step by step. Within it, deep learning 深度学习, using neural networks 神经网络 with many layers, has been dominant since the 2010s.

A humanoid robot 人形机器人 puts many of these abilities into one body: it uses AI to see faces, understand speech and move its face and arms in a lifelike way.

ไทย

ปัญญาประดิษฐ์ (AI) สร้างระบบที่ทำงานที่ปกติต้องใช้สติปัญญาของมนุษย์ — การจดจำเสียงและภาพ การแปล การเล่นเกม การขับขี่ การสร้างข้อความ AI ส่วนใหญ่ในปัจจุบันใช้ การเรียนรู้ของเครื่อง — อัลกอริทึมที่เรียนรู้รูปแบบจากข้อมูลแทนที่จะถูกโปรแกรมทีละขั้นตอน Within it, deep learning, using neural networks with many layers, has been dominant since the 2010s.

หุ่นยนต์ humanoid นำความสามารถเหล่านี้หลายอย่างมารวมไว้ในร่างกายเดียว: ใช้ AI เพื่อมองเห็นใบหน้า เข้าใจเสียง และเคลื่อนไหวใบหน้าและแขนได้อย่างสมจริง

หุ่นยนต์ humanoid สีเทาที่มีใบหน้าสมจริงกำลังมองขึ้นไป คอ ท้อง และแขนกลที่โผล่ออกมา บนพื้นหลังสีขาว
หุ่นยนต์ humanoid ใช้ AI เพื่อมองเห็น ฟัง และตอบสนองเหมือนมนุษย์
กล่องโค้งซ้อนกันสามชั้น: Artificial Intelligencecontains Machine Learning, which contains Deep Learning, แต่ละอันมีหมายเหตุสั้นๆ
Deep learning เป็นส่วนหนึ่งของ machine learning ซึ่งเป็นส่วนหนึ่งของ AI
Explore · ⁨สำรวจ⁩

AI learning type lab · ⁨ห้องปฏิบัติการประเภทการเรียนรู้ของ AI⁩

Classify AI examples by the type of learning or concern involved. · ⁨จำแนกตัวอย่าง AI ตามประเภทการเรียนรู้หรือประเด็นที่เกี่ยวข้อง⁩

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
artificial intelligence/ˌɑːtɪˈfɪʃl ɪnˈtelɪdʒəns/ ปัญญาประดิษฐ์
machine learning/məˈʃiːn ˈlɜːnɪŋ/ การเรียนรู้ของเครื่อง
deep learning/diːp ˈlɜːnɪŋ/ การเรียนรู้ลึก
neural networks/ˈnjuːrəl ˈnetwɜːks/ เครือข่ายประสาทเทียม
humanoid robot/ˈhjuːmənɔɪd ˈrəʊbɒt/ หุ่นยนต์รูปร่างมนุษย์
18.1

Graphs in AI · ⁨กราฟใน AI⁩

English

Many AI problems sit on a graph 图 — nodes 节点 (states, places) joined by edges 边 (moves, relationships).

  • pathfinding: roads form a graph; the shortest route is a graph search (Dijkstra's algorithm, the A* algorithm).
  • game playing: each board position is a node, each move an edge; minimax 极小化极大 with alpha-beta pruning searches the game tree.
  • state-space search: a planning problem is moving between states by applying operators to reach a goal.
  • knowledge representation: a semantic network 语义网络 has concepts as nodes and relationships as edges ("dog IS-A animal"); a knowledge graph 知识图谱 stores facts about the world for search engines and assistants.

Standard tools for navigating graphs include breadth-first search 广度优先搜索 and depth-first search 深度优先搜索.

"Describe the purpose and structure of a graph in an AI system." Purpose: to represent a problem as a set of states (or places) and the possible moves between them, so that an algorithm can search it for a solution, such as the shortest or cheapest route, or the best next move. Structure: a set of nodes (vertices), each representing a state, location or item, joined by edges representing the connections between them; each edge may carry a weight (a cost, distance or time), and edges may be directed (one-way) or undirected. "Explain the use of graphs to aid AI": the graph is the model on which the AI's search algorithms run: A* and Dijkstra's algorithm find optimal paths through it (navigation, routing), game positions form a tree searched for the best move, and knowledge stored as a graph lets a system reason about how facts are related.

The graph used below: the edge numbers are real distances; the red numbers are each node's heuristic 启发式 estimate of how far the goal still is, which only A uses*

Dijkstra's algorithm. It finds the shortest distance from the start to every node. Keep a table of the best distance found so far to each node (start 0, all others infinity). Repeatedly take the unvisited node with the smallest distance, mark it visited, and for each neighbour check whether going through this node gives a shorter distance; if so, update it and record where it came from. Stop when every node is visited (or the target is).

Worked example. Find the shortest distances from H to every other node in the graph above.

step visit H A B C D G
start 0 ∞ ∞ ∞ ∞ ∞
1 H (0) 0 4 (H) 3 (H) ∞ ∞ ∞
2 B (3) 0 4 (H) 3 ∞ 9 (B) ∞
3 A (4) 0 4 3 9 (A) 8 (A) ∞
4 D (8) 0 4 3 9 (A) 8 10 (D)
5 C (9) 0 4 3 9 8 10 (D)
6 G (10)

Shortest distances: A 4, B 3, D 8, C 9, G 10, and the path to G is H–A–D–G (read the "came from" labels backwards). At step 3, A offers D a distance of $4 + 4 = 8$, better than the 9 found through B, so D is updated; at step 5, C could reach G at $9 + 3 = 12$, worse than 10, so nothing changes. Showing these comparisons is the "working" the question asks for.

The A* algorithm. Dijkstra explores in every direction. A* adds a heuristic $h$, an estimate of the distance still to go, and always expands the node with the smallest $f = g + h$, where $g$ is the distance travelled so far. With a sensible heuristic (never over-estimating), it finds the same shortest path while looking at far fewer nodes, which is why satnavs and games use it. The exam gives $h$ for each node and a table to fill in.

Worked example. Find a path from H to G with A*, showing the working.

node expanded $g$ so far $h$ $f = g + h$ neighbours added (node: $g$, $h$, $f$)
H 0 7 7 A: 4, 5, 9; B: 3, 6, 9
B (tie with A; either) 3 6 9 D via B: 9, 2, 11
A 4 5 9 C: 9, 3, 12; D via A: 8, 2, 10 (better than 11, keep)
D 8 2 10 G: 10, 0, 10; C via D: 9 (no better)
G 10 0 10 goal reached

Path H–A–D–G, length 10, the same as Dijkstra's, but C was never expanded. Each time a node is reached by a second route, keep the smaller $g$; the search ends when the goal is the node with the smallest $f$. State the $g$, $h$ and $f$ values in every row: those are the marks.

ไทย

ปัญหาระบบ AI หลายอย่างอยู่บน กราฟ — โหนด (สถานะ สถานที่) เชื่อมต่อกันด้วย เส้นเชื่อม (การเคลื่อนไหว ความสัมพันธ์)

  • การหาเส้นทาง: ถนนสร้างเป็นกราฟ; เส้นทางสั้นที่สุด Searches as a graph search (Dijkstra's algorithm, the A* algorithm).
  • การเล่นเกม: สถานะบนกระดานแต่ละตำแหน่งเป็นโหนด การเคลื่อนไหวแต่ละครั้งเป็นเส้นเชื่อม; minimax dengan alpha-beta pruning Search the game tree.
  • state-space search: ปัญหาการวางแผนคือการเคลื่อนย้ายระหว่างสถานะโดยการใช้อopération เพื่อไปสู่เป้าหมาย
  • knowledge representation: semantic network มีแนวคิดเป็นโหนดและความสัมพันธ์เป็นเส้นเชื่อม (เช่น "สุนัข IS-A สัตว์"); knowledge graph เก็บข้อเท็จจริงเกี่ยวกับโลกเพื่อใช้กับเครื่องค้นหาและผู้ช่วยดิจิทัล
กราฟที่มีน้ำหนักของโหนด A ถึง G; เส้นทางที่สั้นที่สุดจาก A ไป G ผ่าน B และ E ถูกเน้นด้วยสีส้ม
ปัญหา AI มักอยู่บนกราฟ; ในภาพนี้เส้นทางที่สั้นที่สุดถูกเน้น

เครื่องมือมาตรฐานสำหรับการสำรวจกราฟได้แก่ breadth-first search และ depth-first search

"อธิบายวัตถุประสงค์และโครงสร้างของกราฟในระบบ AI." วัตถุประสงค์: เพื่อ แสดงปัญหา เป็นชุดของสถานะ (หรือสถานที่) และการเคลื่อนไหวที่เป็นไปได้ระหว่างกัน เพื่อให้ อัลกอริทึมสามารถค้นหา คำตอบได้ เช่น เส้นทางที่สั้นที่สุด或ราคาถูกที่สุด หรือการเคลื่อนไหวที่ดีที่สุดในขั้นตอนถัดไป โครงสร้าง: ชุดของ nodes (vertices) แต่ละตัวแทนสถานะ สถานที่ หรือวัตถุ ซึ่งเชื่อมต่อกันด้วย edges ที่แทนการเชื่อมต่อระหว่างกัน; แต่ละ edge อาจมี weight (ค่าใช้จ่าย ระยะทาง หรือเวลา), และ edges อาจเป็นแบบ directed (ทางเดียว) หรือไม่กำหนดทิศทาง "อธิบายการใช้กราฟเพื่อช่วย AI": กราฟคือโมเดลที่อัลกอริทึมค้นหาของ AI ทำงาน: A* และ Dijkstra's algorithm ค้นหาเส้นทางที่เหมาะสมผ่านกราฟ (การนำทาง การจัดเส้นทาง), ตำแหน่งในเกมสร้างเป็นต้นไม้ที่ค้นหาการเคลื่อนไหวที่ดีที่สุด, และความรู้ที่เก็บในรูปกราฟช่วยให้ระบบให้เหตุผลว่าข้อเท็จจริงต่างๆ มีความสัมพันธ์กันอย่างไร

กราฟที่มีน้ำหนักของโหนด 6 ตัวตั้งแต่ H ถึง G พร้อมระยะทางบน edges และค่าประมาณ heuristic ต่อเป้าหมายที่เขียนเป็นสีแดงที่แต่ละโหนด ใช้สำหรับตัวอย่างคำนวณ Dijkstra และ A-star กราฟที่ใช้ด้านล่าง: ตัวเลขบน edges คือระยะทางจริง; ตัวเลขสีแดงคือค่าประมาณ heuristic ของแต่ละโหนดว่ายังเหลือระยะทางไปยังเป้าหมายอีกเท่าใด ซึ่งเป็นข้อมูลที่ใช้เฉพาะ A เท่านั้น*

Dijkstra's algorithm. มันหา ระยะทางที่สั้นที่สุดจากจุดเริ่มต้นไปยังทุกโหนด รักษาตารางของระยะทางที่ดีที่สุดที่ค้นพบจนถึงตอนนี้ของแต่ละโหนด (จุดเริ่มต้น = 0, อื่นๆ = infinity) ทำซ้ำโดยเลือกโหนดที่ยังไม่ได้เยือนที่มี ระยะทางน้อยที่สุด,标记它为已访问, และสำหรับเพื่อนบ้านแต่ละตัวตรวจสอบว่าการเดินทางผ่านโหนดนี้ให้ระยะทางที่สั้นกว่าหรือไม่; หากใช่ ให้อัปเดตและบันทึกที่มา_stop เมื่อทุกโหนด đượcเยือน (หรือเป้าหมายถึง).

ตัวอย่างคำนวณ. หาระยะทางที่สั้นที่สุดจาก H ไปยังทุกโหนดอื่นในกราฟด้านบน

ขั้นตอน เยือน H A B C D G
เริ่มต้น 0 ∞ ∞ ∞ ∞ ∞
1 H (0) 0 4 (H) 3 (H) ∞ ∞ ∞
2 B (3) 0 4 (H) 3 ∞ 9 (B) ∞
3 A (4) 0 4 3 9 (A) 8 (A) ∞
4 D (8) 0 4 3 9 (A) 8 10 (D)
5 C (9) 0 4 3 9 8 10 (D)
6 G (10)

ระยะทางที่สั้นที่สุด: A 4, B 3, D 8, C 9, G 10, และเส้นทางไป G คือ H–A–D–G (อ่านฉลาก "came from" กลับหลัง) ที่ขั้นตอนที่ 3, A เสนอระยะทางให้ D เท่ากับ $4 + 4 = 8$, ดีกว่า 9 ที่ค้นพบผ่าน B, ดังนั้น D จึงถูกอัปเดต; ที่ขั้นตอนที่ 5, C สามารถเข้าถึง G ได้ที่ $9 + 3 = 12$, แย่กว่า 10, ดังนั้นไม่มีอะไรเปลี่ยน การแสดงการเปรียบเทียบเหล่านี้คือส่วน "working" ที่คำถามต้องการ

The A* algorithm. Dijkstra สำรวจทุกทิศทาง A* เพิ่ม heuristic $h$, وهوค่าประมาณของระยะทางที่เหลืออยู่, และขยายโหนดที่มีค่า $f = g + h$ น้อยที่สุดเสมอ, โดยที่ $g$ คือระยะทางที่เดินทางมาแล้ว With a sensible heuristic (never over-estimating), it finds the same shortest path while looking at far fewer nodes, which is why satnavs and games use it. The exam gives $h$ for each node and a table to fill in.

ตัวอย่างคำนวณ. หาเส้นทางจาก H ไป G ด้วย A*, แสดงการคำนวณ

โหนดที่ถูกขยาย $g$ จนถึงตอนนี้ $h$ $f = g + h$ เพื่อนบ้านที่ถูกเพิ่ม (โหนด: $g$, $h$, $f$)
H 0 7 7 A: 4, 5, 9; B: 3, 6, 9
B (tie กับ A; เลือกอย่างใดอย่างหนึ่ง) 3 6 9 D ผ่าน B: 9, 2, 11
A 4 5 9 C: 9, 3, 12; D ผ่าน A: 8, 2, 10 (ดีกว่า 11, เก็บไว้)
D 8 2 10 G: 10, 0, 10; C ผ่าน D: 9 (ไม่ดีกว่า)
G 10 0 10 บรรลุเป้าหมาย

เส้นทาง H–A–D–G, ความยาว 10, เหมือนกับ Dijkstra's แต่ C ไม่เคยถูกขยาย ทุกครั้งที่โหนดถูกเข้าถึงโดยเส้นทางที่สอง ให้เก็บค่า $g$ ที่เล็กกว่า; การค้นหาจะสิ้นสุดเมื่อ goal เป็นโหนดที่มีค่า $f$ น้อยที่สุด ระบุค่า $g$, $h$ และ $f$ ในทุกแถว: นั่นคือคะแนน

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
graph/ɡræf/ กราฟ
nodes/nəʊdz/ โหนด
edges/ˈedʒɪz/ edges
minimax/ˈmɪnɪmæks/ minimax algorithm
semantic network/səˈmæntɪk ˈnetwɜːk/ เครือข่ายเชิงความหมาย
knowledge graph/ˈnɒlɪdʒ ɡræf/ กราฟความรู้
breadth-first search/bredθ fɜːst sɜːtʃ/ การค้นหาแบบกว้างก่อนลึก
depth-first search/depθ fɜːst sɜːtʃ/ การค้นหาแบบลึกก่อนกว้าง
weight/weɪt/ น้ำหนัก
heuristic/hjuːˈrɪstɪk/ heuristic
labels/ˈleɪblz/ ฉลาก
18.1

Artificial neural networks (ANNs) · ⁨Neural networks แบบเทียม (ANNs)⁩

English

An ANN is inspired by the brain's neurons. An artificial neuron 人工神经元:

  • takes several input values, multiplies each by a weight 权重, and adds them up with a bias term 偏置项.
  • applies an activation function 激活函数 (a non-linear function such as ReLU) to the sum.
  • outputs the result, which feeds neurons further on.

Neurons sit in layers: an input layer, one or more hidden layers 隐藏层 (where useful internal patterns are learned), and an output layer. With many hidden layers it is a deep neural network 深度神经网络, and training it is deep learning.

ANNs let models learn complex patterns straight from raw data (pixels, audio, text) without hand-designed features — driving breakthroughs in image recognition 图像识别, speech recognition 语音识别, machine translation 机器翻译, and game playing. They do well with large amounts of data, noisy or very complex input, and patterns too hard to capture with explicit rules.

"Explain what is meant by an artificial neural network." A model of the brain's network of neurons, made of layers of connected nodes: an input layer, one or more hidden layers and an output layer. Each connection has a weight; each node sums its weighted inputs and passes the result through an activation function to the next layer. "Explain how ANNs enable machine learning" (three marks): the network is trained on many examples; for each example the output is compared with the expected result and the error is used to adjust the weights (back propagation) so that the error falls; after enough examples the weights encode the patterns in the data, and the network can then classify or predict for new data it has never seen. "State the reason for multiple hidden layers": each additional layer combines the features found by the layer before it into more complex, more abstract features, so the network can learn more complex relationships (edges, then shapes, then objects); that is what makes a network deep.

ไทย

ANN ได้รับแรงบันดาลใจจากเซลล์ประสาทในสมอง artificial neuron:

  • รับ input values หลายค่า คูณแต่ละค่าด้วย weight, แล้วบวกผลรวมเข้ากับ bias term
  • ใช้ activation function (ฟังก์ชันที่ไม่เป็นเชิงเส้น เช่น ReLU) กับผลรวม
  • ส่งผลลัพธ์ออกมา ซึ่งจะถูกส่งต่อไปยังเซลล์ประสาทถัดไป

เซลล์ประสาทเทียมเดี่ยว: input สามตัวคูณด้วย weight แต่ละตัว บวกกับ bias ผ่าน activation function ให้ output值หนึ่ง *เซลล์ประสาทเดี่ยว: input แต่ละตัวคูณ weight, บวกกับ bias, แล้วผ่าน activation function

เซลล์ประสาทอยู่ในชั้น: input layer, hidden layers หนึ่งหรือมากกว่า (ที่เรียนรู้รูปแบบภายในที่มีประโยชน์), และ output layer หากมี hidden layers จำนวนมากจะเป็น deep neural network, และการฝึกมันคือ deep learning

วงกลมสี่คอลัมน์: input layer 3 โหนด, hidden layers สองชั้นชั้นละ 5 โหนด, และ output node 1 โหนด เชื่อมต่อกันทั้งหมด *เครือข่ายประสาทเทียมที่มี input layer, hidden layers สองชั้น และ output layer

ANNs ช่วยให้โมเดลเรียนรู้รูปแบบซับซ้อนโดยตรงจากข้อมูลดิบ (พิกเซล, เสียง, ข้อความ) โดยไม่ต้องออกแบบ features ด้วยมือ — ขับเคลื่อนนวัตกรรมใน image recognition, speech recognition, machine translation, และการเล่นเกม They excel with large amounts of data, noisy or very complex input, and patterns that are too hard to capture with explicit rules.

"อธิบายความหมายของเครือข่ายประสาทเทียมสังเคราะห์ (Artificial Neural Network)" โมเดลจำลองโครงสร้างเครือข่ายเซลล์ประสาทในสมอง ประกอบด้วยชั้นของโหนดที่เชื่อมต่อกัน: ชั้นอินพุต, ชั้นซ่อนหนึ่งหรือหลายชั้น และชั้นเอาต์พุต การเชื่อมต่อแต่ละเส้นมีค่า น้ำหนัก; แต่ละโหนดจะรวมผลคูณของอินพุตที่มีน้ำหนัก แล้วส่งผลลัพธ์ผ่านฟังก์ชันการกระตุ้นไปยังชั้นถัดไป "อธิบายว่า ANN ช่วยให้เกิดการเรียนรู้ของเครื่องได้อย่างไร" (3 คะแนน): เครือข่ายถูก ฝึกฝน จากตัวอย่างจำนวนมาก; สำหรับแต่ละตัวอย่าง ผลลัพธ์ที่ได้จะถูกเทียบกับคำตอบที่คาดหวัง และใช้ ความผิดพลาด เพื่อ ปรับค่าน้ำหนัก (Backpropagation) เพื่อให้ความผิดพลาดลดลง; เมื่อได้รับตัวอย่างเพียงพอ ค่าน้ำหนักจะบันทึก รูปแบบ ในข้อมูล และเครือข่ายจะสามารถจำแนกหรือทำนายสำหรับ ข้อมูลใหม่ ที่ไม่เคยเห็นมาก่อนได้ "ระบุเหตุผลของการมีชั้นซ่อนหลายชั้น": ชั้นเพิ่มเติมแต่ละชั้นจะนำคุณลักษณะที่ชั้นก่อนหน้าค้นพบมาผสมผสานกันเพื่อสร้าง คุณลักษณะที่ซับซ้อนและนามธรรมมากขึ้น sehinggaเครือข่ายสามารถเรียนรู้ ความสัมพันธ์ที่ซับซ้อนขึ้น (เช่น เส้นขอบ, รูปร่าง, วัตถุ); นี่คือสิ่งที่ทำให้เครือข่ายเป็น "Deep Network"

Explore · ⁨สำรวจ⁩

Tap the parts of a neural network · ⁨แตะส่วนประกอบต่างๆ ของเครือข่ายประสาทเทียม⁩

Explore the layers. Data flows left to right: the input layer takes the features, the hidden layers learn patterns, and the output layer gives the answer — with every connection carrying a weight that training adjusts. · ⁨สำรวจชั้นต่างๆ: ข้อมูลไหลจากซ้ายไปขวา ชั้นอินพุตรับคุณลักษณะ, ชั้นซ่อนเรียนรู้รูปแบบ, และชั้นเอาต์พุตให้คำตอบ — โดยทุกการเชื่อมต่อมีน้ำหนักที่การฝึกปรับแต่ง⁩

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
artificial neuron/ˌɑːtɪˈfɪʃl ˈnjuːrɒn/ ประสาทเทียมสังเคราะห์
bias term/ˈbaɪəs tɜːm/ พจน์เบয়াส
activation function/ˌæktɪˈveɪʃn ˈfʌŋkʃn/ ฟังก์ชันกระตุ้น
hidden layers/ˈhɪdn ˈleɪəz/ ชั้นซ่อนเร้น
deep neural network/diːp ˈnjuːrəl ˈnetwɜːk/ เครือข่ายประสาทเทียมลึก
image recognition/ˈɪmɪdʒ ˌrekəɡˈnɪʃn/ การจดจำภาพ
speech recognition/spiːtʃ ˌrekəɡˈnɪʃn/ การจดจำเสียงพูด
machine translation/məˈʃiːn trænˈsleɪʃn/ การแปลภาษาด้วยเครื่อง
backpropagation/ˌbækprəpəˈɡeɪʃn/ การย้อนกลับการแพร่กระจาย
18.1

Machine learning, deep learning, reinforcement learning · ⁨การเรียนรู้ของเครื่อง, การเรียนรู้เชิงลึก, การเรียนรู้แบบเสริมแรง⁩

English

Machine learning

The umbrella term — any algorithm that learns from data. Three paradigms:

  • supervised learning 监督学习 — the data has labels 标签 (images tagged "cat"/"dog"); the algorithm learns input → label. Used for classification 分类 (a category) and regression.
  • unsupervised learning 无监督学习 — no labels; the algorithm finds structure, e.g. a cluster 聚类 of similar customers.
  • reinforcement learning (below).

Use ML when explicit rules would be impractical (spam filters, recommendations, fraud detection).

"Describe supervised learning and unsupervised learning" (the marked wordings). Supervised learning: the algorithm is trained on labelled training data 训练数据, each example paired with the correct output (the target); it learns the relationship between inputs and outputs and uses it to classify or predict for new inputs; the answers are known while training, so the error can be measured. Unsupervised learning: the data is unlabelled, with no correct answers given; the algorithm looks for patterns, structure or groupings in the data by itself (clustering similar items, finding associations); the output is a set of categories or relationships that were not defined in advance. How they differ: labelled against unlabelled data; known outputs against discovered structure; supervised is used to predict (classification, regression), unsupervised to explore (clustering, anomaly detection). Both are categories of machine learning; the third is reinforcement learning.

Deep learning

A subset of ML using deep neural networks. Lower layers learn simple patterns (edges, phonemes), higher layers combine them into abstract concepts. It needs lots of data and lots of compute (GPUs); for small datasets, simpler ML methods often do better.

"Explain what is meant by deep learning" (three marks). Machine learning that uses artificial neural networks with many hidden layers (deep networks); the network is trained on very large amounts of data, and each layer extracts features from the output of the layer below, so that the network learns the features it needs by itself rather than having them specified by the programmer. Reasons for using it: it can solve problems too complex for hand-written rules or shallow models (recognising faces, understanding speech, translating text); it improves as more data becomes available; it removes the need for human feature engineering; and it can handle unstructured data such as images, sound and text. How it is made more effective: more (and better-labelled) training data; more layers or nodes, within the limits of overfitting; more processing power (GPUs) and training time; tuning the learning rate and other parameters. Examples: speech recognition in voice assistants, image recognition in medical scans and self-driving cars, machine translation, recommendation systems.

Reinforcement learning

In reinforcement learning 强化学习, an agent 智能体 acts in an environment; each action changes the state and returns a reward 奖励. The agent learns a policy 策略 (a strategy) that maximises the total reward over time, by trial and error with no labels up front. Used for sequential-decision problems — games, robot control, autonomous driving.

"Explain what is meant by reinforcement learning" (three marks). An agent learns by interacting with its environment: it takes an action, the environment moves to a new state and returns a reward (or penalty), and the agent adjusts its behaviour so as to maximise the total reward over time. There is no labelled data: the agent learns by trial and error, discovering which actions are good from the rewards it collects, and gradually forms a policy that says what to do in each state. Used where the right answer is not known in advance but the result of an action can be scored: game playing (chess, Go), robot control, traffic-light timing, resource allocation. A computer playing a board game against a user learns in this way, or searches the game tree with minimax to choose the move whose worst outcome is best.

A self-driving car 自动驾驶汽车 is a real example. Lidar 激光雷达 and camera sensors (the spinning unit on the roof) build a live picture of the road, and a learned policy decides how to steer, speed up and brake safely.

ไทย

การเรียนรู้ของเครื่อง

คำศัพท์ครอบคลุม — อัลกอริทึมใดก็ตามที่เรียนรู้จากข้อมูล มี 3 รูปแบบ:

  • การเรียนรู้แบบมีผู้กำกับ (Supervised learning) — ข้อมูลมี ฉลาก (ภาพที่มีป้ายกำกับว่า "แมว"/"สุนัข"); อัลกอริทึมเรียนรู้ความสัมพันธ์จากอินพุต → ฉลาก ใช้สำหรับ การจำแนกประเภท (หมวดหมู่) และการถดถอย (Regression)
  • การเรียนรู้แบบไม่มีผู้กำกับ (Unsupervised learning) — ไม่มีฉลาก; อัลกอริทึมจะค้นหาโครงสร้าง เช่น กลุ่ม ของลูกค้าที่มีลักษณะคล้ายกัน
  • การเรียนรู้แบบเสริมแรง (ดูด้านล่าง)

ใช้ ML เมื่อการใช้กฎที่กำหนดไว้ล่วงหน้าทำไม่ได้จริง (ระบบกรองสแปม, ระบบแนะนำสินค้า, การตรวจจับการฉ้อโกง)

กราฟกระจายสองแบบ: ในการเรียนรู้แบบมีผู้กำกับ จุดข้อมูลทุกจุดมีฉลากเป็นแมวหรือสุนัข และโมเดลเรียนรู้ขอบเขตแบ่งแยก; ในการเรียนรู้แบบไม่มีผู้กำกับ จุดข้อมูลไม่มีฉลาก และโมเดลจะค้นหากลุ่มเอง
ข้อมูลชุดเดียวกันที่มองในสองมุม: หากมีฉลาก หน้าที่คือเรียนรู้สิ่งที่จะแยกแยะกลุ่ม;若无ฉลาก หน้าที่คือการค้นพบว่ามีการจัดกลุ่มอยู่

"อธิบายการเรียนรู้แบบมีผู้กำกับและการเรียนรู้แบบไม่มีผู้กำกับ" (ตามคำที่ระบุ) การเรียนรู้แบบมีผู้กำกับ: อัลกอริทึมถูกฝึกด้วย ข้อมูลฝึกที่มีฉลาก, โดยแต่ละตัวอย่างคู่กับ ผลลัพธ์ที่ถูกต้อง (เป้าหมาย); มันเรียนรู้ ความสัมพันธ์ระหว่างอินพุตและเอาต์พุต และนำไปใช้จำแนกหรือทำนายสำหรับอินพุตใหม่; คำตอบมีอยู่ขณะฝึกสอน ทำให้สามารถวัดความผิดพลาดได้ การเรียนรู้แบบไม่มีผู้กำกับ: ข้อมูล ไม่มีฉลาก และไม่มีการให้คำตอบที่ถูกต้อง; อัลกอริทึมจะค้นหา รูปแบบ โครงสร้าง หรือการจัดกลุ่ม ในข้อมูลโดยอัตโนมัติ (การจับกลุ่มรายการที่คล้ายกัน, การหาความสัมพันธ์); เอาต์พุตคือชุดหมวดหมู่หรือความสัมพันธ์ที่ไม่ได้กำหนดไว้ล่วงหน้า ความแตกต่าง: ข้อมูลมีฉลากเทียบเท่าข้อมูลไม่มีฉลาก; เอาต์พุตที่ทราบเทียบเท่าโครงสร้างที่ค้นพบ; แบบมีผู้กำกับใช้สำหรับ การทำนาย (การจำแนกประเภท, การถดถอย), แบบไม่มีผู้กำกับใช้สำหรับ การสำรวจ (Clustering, การตรวจจับความผิดปกติ) ทั้งสองเป็นประเภทของการเรียนรู้ของเครื่อง; ส่วนที่สามคือการเรียนรู้แบบเสริมแรง

แผนผังกระบวนการ: ข้อมูลฝึกที่มีฉลากฝึกโมเดล, โมเดลที่ฝึกแล้วจำแนกข้อมูลใหม่ที่ไม่มีฉลาก, และแสดงจำนวนของแต่ละประเภทที่พบ *การเรียนรู้แบบมีผู้กำกับ: โมเดลถูกฝึกด้วยข้อมูลที่มีฉลาก จากนั้นจดจำข้อมูลใหม่ได้

การเรียนรู้เชิงลึก

ส่วนย่อยของ ML ที่ใช้เครือข่ายประสาทเทียมเชิงลึก ชั้นล่างเรียนรู้รูปแบบพื้นฐาน (เส้นขอบ, เสียงพยางค์), ชั้นบนจะรวมเข้าด้วยกันเป็นแนวคิดนามธรรม ต้องการ ข้อมูลจำนวนมาก และ ทรัพยากรการคำนวณสูง (GPU); สำหรับชุดข้อมูลขนาดเล็ก วิธี ML ที่ง่ายกว่ามักจะให้ผลดีกว่า

"อธิบายความหมายของการเรียนรู้เชิงลึก" (3 คะแนน). การเรียนรู้ของเครื่องที่ใช้เครือข่ายประสาทเทียมสังเคราะห์ที่มี ชั้นซ่อนจำนวนมาก (Deep networks); เครือข่ายถูกฝึกด้วย ข้อมูลปริมาณมหาศาล และแต่ละชั้นจะ ดึงคุณลักษณะ ออกจากเอาต์พุตของชั้นด้านล่าง ทำให้เครือข่ายเรียนรู้คุณลักษณะที่ต้องการได้ด้วยตนเองโดยไม่ต้องให้โปรแกรมเมอร์ระบุ. เหตุผลในการใช้งาน: สามารถแก้ปัญหาที่ ซับซ้อน เกินกว่าการใช้กฎเขียนเองหรือโมเดลชั้น淺 (การจดจำใบหน้า, การเข้าใจเสียง, การแปลข้อความ); พัฒนาขึ้นเมื่อมีข้อมูลเพิ่ม; ลดความจำเป็นในการออกแบบคุณลักษณะด้วยมนุษย์; และจัดการกับข้อมูล ไม่มีโครงสร้าง เช่น ภาพ เสียง และข้อความ วิธีเพิ่มประสิทธิภาพ: เพิ่มข้อมูลฝึก (และเพิ่มคุณภาพฉลาก); เพิ่มจำนวนชั้นหรือโหนด (ภายในข้อจำกัดของการ Overfitting); เพิ่มกำลังประมวลผล (GPU) และเวลาฝึก; ปรับอัตราการเรียนรู้และพารามิเตอร์อื่นๆ ตัวอย่าง: การจดจำเสียงในผู้ช่วยเสียง, การจดจำภาพในการตรวจแพทย์และรถยนต์ไร้คนขับ, การแปลภาษา, ระบบแนะนำสินค้า

การเรียนรู้แบบเสริมแรง

ในการ เรียนรู้แบบเสริมแรง, เอเจนต์ จะกระทำในสภาพแวดล้อม; ทุกการกระทำจะเปลี่ยนสถานะและคืนค่า รางวัล เอเจนต์เรียนรู้ นโยบาย (กลยุทธ์) ที่ทำให้รางวัลสะสมสูงสุดตามเวลา ผ่านการลองผิดลองถูกโดยไม่มีการกำหนดฉลากตั้งแต่ต้น ใช้สำหรับปัญหาการตัดสินใจที่เป็นลำดับขั้นตอน — เกม, การควบคุมหุ่นยนต์, การขับขี่อัตโนมัติ

"อธิบายความหมายของการเรียนรู้แบบเสริมแรง" (สามคะแนน). เอเจนต์ learns by interacting with its environment: it takes an action, the environment moves to a new state and returns a reward (or penalty), and the agent adjusts its behaviour so as to maximise the total reward over time.* There is no labelled data: the agent learns by trial and error, discovering which actions are good from the rewards it collects, and gradually forms a policy that says what to do in each state. Used where the right answer is not known in advance but the result of an action can be scored: game playing (chess, Go), robot control, traffic-light timing, resource allocation. A computer playing a board game against a user learns in this way, or searches the game tree with minimax to choose the move whose worst outcome is best.

A loop between two boxes: the agent sends an action to the environment, which returns a new state and a reward back to the agent
Reinforcement learning: the agent acts, the environment returns a new state and a reward, and the agent learns from it

A self-driving car is a real example. Lidar and camera sensors (the spinning unit on the roof) build a live picture of the road, and a learned policy decides how to steer, speed up and brake safely.

A white Waymo self-driving car on a city street, with a spinning lidar sensor unit on its roof and extra cameras at the front corners
A self-driving car uses cameras and lidar sensors to see the road around it
Several orange industrial robot arms welding a car body as it moves along a factory production line
Industrial robot arms on a production line: reinforcement learning can teach a robot to control its movements
Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
reinforcement learning/ˌriːɪnˈfɔːsmənt ˈlɜːnɪŋ/ การเรียนรู้ด้วยการเสริมแรง
supervised learning/ˈsuːpəvaɪzd ˈlɜːnɪŋ/ การเรียนรู้ภายใต้การควบคุม
regression/rɪˈɡreʃn/ การถดถอย
unsupervised learning/ʌnˈsuːpəvaɪzd ˈlɜːnɪŋ/ การเรียนรู้โดยไม่มีการควบคุม
cluster/ˈklʌstə/ กลุ่ม
self-driving car/self ˈdraɪvɪŋ kɑː/ รถยนต์ไร้คนขับ
agent/ˈeɪdʒənt/ เอเจนต์
reward/rɪˈwɔːd/ รางวัล
policy/ˈpɒlɪsi/ นโยบาย
lidar/ˈlaɪdɑː/ ลิดาร์
18.1

Training an ANN: backpropagation · ⁨การฝึก ANN: การย้อนกลับของข้อผิดพลาด (backpropagation)⁩

English

Training adjusts the weights so outputs match the targets. The standard method is backpropagation 反向传播 (back propagation of errors) with gradient descent 梯度下降. For each training example:

  1. forward pass — feed the input through to the output.
  2. compute the error with a loss function 损失函数 (a single number for how wrong the output is).
  3. backward pass — propagate the error backwards, finding each weight's gradient (how much it contributed to the error) using the chain rule.
  4. update the weights by a small step (set by the learning rate 学习率) that reduces the error.

Repeat over many examples and many passes (epochs 训练轮次) until the error stops shrinking. The name "back" comes from step 3: the error flows from the output back towards the input, so every weight's gradient is found in one sweep. After training, a new input needs only one forward pass to get a prediction.

"Describe the back propagation of errors method" (four marks). (1) An input is fed forward through the network and its output is compared with the expected (target) output; (2) the difference is the error; (3) the error is passed backwards through the network, layer by layer from the output to the input, and each weight's share of the error is calculated; (4) the weights are adjusted in proportion to their contribution, in the direction that reduces the error; (5) the process is repeated with many examples until the error is as small as required. The point of the method is that a network with hidden layers has no direct way of knowing which internal weight caused an output error; back propagation apportions the blame.

ไทย

การฝึกจะปรับ น้ำหนัก (weights) เพื่อให้ผลลัพธ์ตรงกับเป้าหมาย วิธีมาตรฐานคือ backpropagation (การย้อนกลับของข้อผิดพลาด) พร้อมกับการใช้ gradient descent สำหรับแต่ละตัวอย่างในการฝึก:

  1. forward pass — ส่งข้อมูลผ่านเข้าไปยังผลลัพธ์
  2. คำนวณค่าความผิดพลาด ด้วย loss function (ค่าตัวเลขเดียวที่บอกความคลาดเคลื่อนของผลลัพธ์)
  3. backward pass — ย้อนข้อผิดพลาด ถอยหลัง ไปหา gradient ของน้ำหนักแต่ละตัว (ว่ามีส่วนร่วมต่อข้อผิดพลาดอย่างไร) โดยใช้ chain rule
  4. อัปเดตน้ำหนัก โดยการเปลี่ยนแปลงเล็กน้อย (กำหนดโดย learning rate) เพื่อลดค่าความผิดพลาดลง

ทำซ้ำกับตัวอย่างจำนวนมากและหลายรอบ (epochs) จนกว่าค่าความผิดพลาดจะไม่ลดลงอีก ชื่อ "back" มาจากขั้นตอนที่ 3: ข้อผิดพลาดไหลจากผลลัพธ์ ถอยหลัง กลับไปยังอินพุต ทำให้สามารถหาค่า gradient ของน้ำหนักทุกตัวได้ในหนึ่งรอบ หลังการฝึกแล้ว ข้อมูลใหม่เพียงอย่างเดียวต้องการแค่ forward pass เดียวเพื่อสร้างการทำนาย

"อธิบายวิธีการย้อนกลับของข้อผิดพลาด (back propagation of errors)" (สี่คะแนน). (1) อินพุตถูกส่ง forward ผ่านเครือข่าย แล้วเปรียบเทียบกับ ผลลัพธ์เป้าหมาย (expected/target output); (2) ส่วนต่างคือ error; (3) error ถูกส่ง ถอยหลัง ผ่านเครือข่าย ชั้นต่อชั้นจาก output ไปยัง input และคำนวณส่วนแบ่งของ error สำหรับน้ำหนักแต่ละตัว; (4) น้ำหนักจะถูกปรับ ตามสัดส่วนของส่วนร่วม它们在 contributing, ในทิศทางที่ reduces error; (5) กระบวนการนี้จะ repeated กับตัวอย่างมากมายจนกว่า error จะเล็กเท่าที่ต้องการ จุดประสงค์ของวิธีนี้คือเครือข่ายที่มี hidden layers ไม่มีวิธีโดยตรงที่จะรู้ว่ามีน้ำหนักภายในตัวไหน causing an output error; backpropagation จะแบ่งความผิดให้

A U-shaped curve of squared error against weight, with steps moving downhill towards the minimum error
Training adjusts the weights to reach the minimum error
Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
learning rate/ˈlɜːnɪŋ reɪt/ อัตราการเรียนรู้
gradient descent/ˈɡreɪdɪənt dɪˈsent/ gradient descent algorithm
loss function/lɒs ˈfʌŋkʃn/ ฟังก์ชันความสูญเสีย
epochs/ˈiːpɒks/ รอบฝึกสอน
18.1

Regression · ⁨การวิเคราะห์เชิงเส้น (Regression)⁩

English

Some tasks predict a number (a house price, tomorrow's temperature) — regression 回归, as opposed to classification (a category).

Linear regression 线性回归 fits a straight line (or hyperplane):

$$y = m_{1} x_{1} + m_{2} x_{2} + \ldots + m_{n} x_{n} + c.$$

Choose the coefficients to minimise the sum of squared errors against the training data. Use it when the relationship looks roughly linear and you want an interpretable model. For curved data, use polynomial, decision-tree, or neural-network regression methods — same idea: define a model, define a loss, and adjust the parameters to minimise it. Regression and classification are both supervised; the choice depends on whether the answer is a number or a category.

"Describe regression methods in machine learning" (two marks). Statistical methods that find the relationship between input variables and a continuous output, by fitting a function (a line or curve) to the training data with the smallest total error; the fitted function is then used to predict the output for new inputs. Linear regression fits a straight line; other methods fit curves. Regression predicts a value (a price, a temperature, a time); classification predicts a category, which is the distinction the exam asks for.

ไทย

บางงานทำนาย number (ราคาบ้าน, อุณหภูมิพรุ่งนี้) — regression, tráiกันกับ classification (category).

Linear regression ใช้เส้นตรง (หรือ hyperplane):

$$y = m_{1} x_{1} + m_{2} x_{2} + \ldots + m_{n} x_{n} + c.$$

เลือก coefficients เพื่อ minimise the sum of squared errors กับข้อมูล training ใช้งานเมื่อความสัมพันธ์ดูเป็นเส้นตรงและต้องการโมเดลที่ตีความได้ สำหรับข้อมูลโค้ง ให้ใช้ polynomial, decision-tree, หรือ neural-network regression methods — หลักการเดียวกัน: กำหนดโมเดล, กำหนด loss, และปรับ parameters เพื่อ minimize它 It Regression และ classification เป็น supervised ทั้งคู่; การเลือกขึ้นอยู่กับว่าคำตอบเป็น number หรือ category

"อธิบายวิธีการ regression ใน machine learning" (สองคะแนน). Statistical methods ที่หา relationship ระหว่าง input variables กับ continuous output โดย fitting函数 (line หรือ curve) กับ training data ที่มี total error น้อยที่สุด; ฟังก์ชันที่ได้.fitting จะถูกใช้เพื่อ predict output สำหรับ input ใหม่ Linear regression fit เส้นตรง; วิธีอื่น fit curves. Regression ทำนาย value (ราคา, อุณหภูมิ, เวลา); Classification ทำนาย category, ซึ่งเป็นความแตกต่างที่ข้อสอบถามถึง

A scatter of points with a straight best-fit line through them; dashed vertical lines show the error between each point and the line
Linear regression fits the line that makes the total squared error (the dashed gaps) as small as possible
Explore · ⁨สำรวจ⁩

Fitting a regression line · ⁨การปรับเส้น regression⁩

Drag the controls. Linear regression draws the straight line that makes the squared distances to the data points as small as possible — then it predicts a number for any new input. · ⁨ลากควบคุม Regressionเชิงเส้นวาดเส้นตรงที่ทำให้ผลรวมระยะห่างกำลังสองต่อจุดข้อมูลน้อยที่สุด — จากนั้นทำนายตัวเลขสำหรับอินพุตใหม่ใดๆ⁩

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
classification/ˌklæsɪfɪˈkeɪʃn/ การจำแนกประเภท
training data/ˈtreɪnɪŋ ˈdeɪtə/ ข้อมูลสำหรับการฝึก
linear regression/ˈlɪnɪə rɪˈɡreʃn/ linear regression analysis
optical character recognition/ˈɒptɪkl ˈkærɪktə ˌrekəɡˈnɪʃn/ การจดจำตัวอักษรแบบออปติคอล
text-to-speech/tekst tə spiːtʃ/ ข้อความสู่เสียง
18.1

How AI is used in a real scenario · ⁨การใช้ AI ในสถานการณ์จริง⁩

English

Many exam scenarios use the same pattern — a deep-learning model trained on labelled data, often several combined into a pipeline:

  • customer identification at an automated shop: the system is trained on labelled face images; a camera captures a face; image recognition extracts a representation; it is matched against registered customers; the closest match identifies the person.
  • reading text from images: image recognition finds text regions; optical character recognition 光学字符识别 extracts the characters; machine translation converts them; text-to-speech 文本转语音 reads them aloud.
  • checkout item-detection: object-detection AI, trained on labelled product images, sees which items go into a basket and charges the account.

By the time a user interacts with the system, the model is fast — it only does forward-pass inference; the intelligence is in the patterns learned during training.

Model answers for the scenario questions. A car-park camera reads registration numbers: the camera captures an image; an AI trained on many labelled images of number plates locates the plate in the image; character recognition (a deep-learning classifier, again trained on labelled characters) converts the plate into text; the text is stored with the time and matched when the car leaves. A CCTV system detects and tracks a person: image-recognition software trained on labelled images of people identifies a person in each frame; the system compares successive frames to follow their movement; unusual movement can trigger an alert. Speech turned into commands: speech recognition trained on many recorded voices converts the sound into text; the system matches the text to a set of known commands; it improves as it is corrected. A camera that focuses on faces: a face-detection model trained on labelled faces finds the face region, and the lens is adjusted to bring that region into focus. A bank's face-recognition login: the app captures the face, a deep network extracts its features, and they are compared with the stored features for that customer. In every case the pattern is: trained on labelled examples, extracts features, matches or classifies new input.

Worked example. For each task, say whether it needs regression or classification, and what the output layer of an ANN would look like: (a) predict tomorrow's temperature; (b) decide whether an email is spam. Ask what kind of thing is being predicted. (a) A temperature is a number on a continuous scale, so this is regression, and the output layer is a single neuron holding that value. (b) Spam or not-spam is a category, so this is classification, and the output gives a probability per class. Both are supervised learning: each needs labelled examples to train on, and training adjusts the weights by backpropagation to reduce the error. The deciding question is simply number-or-category - not how difficult the task feels.

ไทย

หลายสถานการณ์ในข้อสอบใช้ pattern เดียวกัน — deep-learning model ที่ถูก train บน labelled data, มักจะรวมหลายอย่างเข้าด้วยกันเป็น pipeline:

  • customer identification ในร้านอัตโนมัติ: ระบบถูก train บนภาพหน้าที่มี label; กล้องจับภาพหน้า; image recognition ดึง representation; นำไป match กับลูกค้าที่ลงทะเบียน; ความ match ที่ใกล้เคียงที่สุดจะระบุบุคคล
  • การอ่านข้อความจากภาพ: การจดจำภาพค้นหาพื้นที่ที่มีข้อความ; การจดจำตัวอักษรด้วยแสง (OCR) ดึงตัวอักษรออกมา; การแปลด้วยเครื่องจักรกลแปลงข้อความ; การเปลี่ยนข้อความเป็นเสียง อ่านออกเสียงให้ฟัง
  • การตรวจสอบรายการสินค้าก่อนชำระเงิน: อัจฉริยะประดิษฐ์ตรวจจับวัตถุ ซึ่งฝึกฝนด้วยภาพสินค้าที่มีป้ายกำกับ จะมองเห็นว่าสินค้าใดควรใส่ลงตะกร้าและตัดเงินจากบัญชี

เมื่อผู้ใช้มีปฏิสัมพันธ์กับระบบ โมเดลจะทำงานได้รวดเร็ว เพราะทำเพียงการอนุมานแบบทางเดียว (forward-pass inference)เท่านั้น ความฉลาดอยู่ที่รูปแบบที่เรียนรู้มาในช่วงการฝึกสอน

คำตอบสำหรับคำถามสถานการณ์ กล้องในที่จอดรถอ่านเลขทะเบียน: กล้องจับภาพ; อัจฉริยะประดิษฐ์ที่ถูกฝึกฝนด้วย ภาพที่มีป้ายกำกับ จำนวนมากหาตำแหน่งแผ่นป้ายในภาพ; การจดจำตัวอักษร (ตัวจำแนกประเภทแบบ深度学习 ที่ถูกฝึกฝนด้วยตัวอักษรที่มีป้ายกำกับอีกครั้ง) แปลงแผ่นป้ายให้เป็นข้อความ; ข้อความจะถูกบันทึกพร้อมเวลาและใช้จับคู่เมื่อรถออก ระบบ CCTV ตรวจจับและติดตามบุคคล: ซอฟต์แวร์จดจำภาพที่ถูกฝึกฝนด้วยภาพคนที่มีป้ายกำกับ ระบุตัวตน的人在แต่ละเฟรม; ระบบเปรียบเทียบเฟรมต่อเนื่องกันเพื่อติดตามการเคลื่อนไหว; การเคลื่อนไหวผิดปกติอาจกระตุ้นสัญญาณเตือน เสียงถูกแปลงเป็นคำสั่ง: การจดจำเสียงที่ถูกฝึกฝนด้วยเสียงบันทึกหลากหลาย เปลี่ยนเสียงให้เป็นข้อความ; ระบบจับคู่ข้อความกับชุดคำสั่งที่ทราบล่วงหน้า; ระบบจะพัฒนาขึ้นเมื่อได้รับการแก้ไข กล้องโฟกัสที่ใบหน้า: โมเดลตรวจจับใบหน้าที่ถูกฝึกฝนด้วยใบหน้าที่มีป้ายกำกับ หาบริเวณใบหน้า และปรับเลนส์เพื่อให้บริเวณนั้นอยู่ในโฟกัส การเข้าสู่ระบบด้วยการจดจำใบหน้าของธนาคาร: แอปพลิเคชันจับภาพใบหน้า; เครือข่ายประสาทเทียมลึกดึงคุณลักษณะออกมา และนำไปเปรียบเทียบกับข้อมูลที่คุณลักษณะที่จัดเก็บไว้ของลูกค้า ในทุกกรณีรูปแบบคือ: ถูกฝึกฝนด้วยตัวอย่างที่มีป้ายกำกับ, ดึงคุณลักษณะ, จับคู่หรือจำแนกประเภทอินพุตใหม่

ตัวอย่างวิธีทำ สำหรับแต่ละงาน ให้ระบุว่าต้องใช้ การถดถอย (regression) หรือ การจำแนกประเภท (classification) และชั้นเอาต์พุตของ ANN จะดูอย่างไร: (ก) คาดการณ์อุณหภูมิพรุ่งนี้; (ข) ตัดสินใจว่าอีเมลเป็นสแปมหรือไม่ ถามว่ากำลังคาดการณ์ สิ่งใด (ก) อุณหภูมิคือ ตัวเลข บนสเกลต่อเนื่อง ดังนั้นจึงเป็นการ ถดถอย และชั้นเอาต์พุตคือ นิวรอนเดียว ที่ค่าดังกล่าว (ข) สแปมหรือไม่สแปมคือ หมวดหมู่ ดังนั้นจึงเป็นการ จำแนกประเภท และเอาต์พุตจะให้ความน่าจะเป็นต่อแต่ละหมวดหมู่ ทั้งสองเป็นการเรียนรู้แบบ มีผู้ควบคุม (supervised): แต่ละอย่างต้องการตัวอย่างที่มีป้ายกำกับเพื่อฝึกสอน และการฝึกสอนปรับ น้ำหนัก (weights) ผ่าน การแพร่ย้อนกลับ (backpropagation) เพื่อลดข้อผิดพลาด คำถามชี้ขาดคือตัวเลขหรือหมวดหมู่ - ไม่ใช่ความยากของงาน

18.1

Definitions the examiner accepts · ⁨คำนิยามที่ผู้สอบยอมรับ⁩

English

A definition question is marked against fixed wording. Learn these exactly, and give one answer only.

Term Definition
graph (in AI) a set of nodes representing states or places, joined by edges representing connections, often weighted, that a search algorithm can explore
Dijkstra's algorithm finds the shortest distance from a start node to every other node by always visiting the unvisited node with the smallest distance so far
A* algorithm a shortest-path search that expands the node with the smallest total of distance so far plus a heuristic estimate of the distance to the goal
artificial neural network a model of the brain's neurons: layers of nodes joined by weighted connections, trained by adjusting the weights
machine learning algorithms that learn from data and improve with experience rather than following fixed rules
supervised learning learning from labelled training data in which the correct output for each input is known
unsupervised learning learning from unlabelled data by finding patterns, groupings or structure in it
reinforcement learning an agent learns by trial and error, choosing actions in an environment to maximise the rewards it receives
deep learning machine learning using neural networks with many hidden layers, trained on large amounts of data, each layer extracting features from the one below
back propagation of errors comparing the network's output with the target, passing the error back through the layers and adjusting each weight to reduce it
regression fitting a function to training data in order to predict a continuous output value from inputs
ไทย

คำถามคำนิยามจะให้คะแนนตามข้อความที่กำหนดไว้你必须 exact. เรียนรู้ให้ถูกต้องและตอบเพียงคำตอบเดียวเท่านั้น

พจน์ นิยาม
กราฟ (ใน AI) ชุดของโหนดที่แทนสถานะหรือสถานที่ เชื่อมต่อกันด้วยเส้นขอบที่แทนความสัมพันธ์ ซึ่งมักมีน้ำหนัก สามารถสำรวจได้ด้วยอัลกอริทึมการค้นหา
อัลกอริทึมของไดค.stra หาระยะทางสั้นที่สุดจากโหนดเริ่มต้นไปยังทุกโหนดอื่น โดย Visite โหนดที่ยังไม่ได้ Visit ที่มีระยะทางน้อยที่สุดเสมอ
อัลกอริทึม A* การค้นหาเส้นทางสั้นที่สุดที่ขยายโหนดที่มีผลรวมของระยะทางปัจจุบันบวกกับการประมาณการระยะทางถึงเป้าหมายด้วยฮิวริสติกน้อยที่สุด
เครือข่ายประสาทเทียม artificia โมเดลจำลองเซลล์ประสาทสมอง: ชั้นของโหนดเชื่อมต่อกันด้วย connections ที่มีน้ำหนัก ถูกฝึกสอนโดยการปรับน้ำหนัก
การเรียนรู้ด้วยเครื่องจักร อัลกอริทึมที่เรียนรู้จากข้อมูลและปรับปรุงประสิทธิภาพตามประสบการณ์ แทนที่จะทำตามกฎตายตัว
การเรียนรู้แบบมีผู้ควบคุม การเรียนรู้จากข้อมูลฝึกสอนที่มีป้ายกำกับ โดยที่ผลลัพธ์ที่ถูกต้องสำหรับอินพุตแต่ละตัวเป็นที่ทราบ
การเรียนรู้แบบไม่มีผู้ควบคุม การเรียนรู้จากข้อมูลที่ไม่มีป้ายกำกับโดยการค้นหารูปแบบ กลุ่ม หรือโครงสร้างในข้อมูลนั้น
การเรียนรู้แบบเสริมแรง เอเจนต์เรียนรู้จากการลองผิดลองถูก เลือกการกระทำในสภาพแวดล้อมเพื่อเพิ่มรางวัลที่ได้รับสูงสุด
การเรียนรู้แบบลึก การใช้เครือข่ายประสาทเทียมหลายชั้นซ่อน ที่ถูกฝึกฝนด้วยข้อมูลจำนวนมาก โดยแต่ละชั้นดึงคุณลักษณะจากชั้นด้านล่าง
การแพร่ย้อนกลับของข้อผิดพลาด เปรียบเทียบเอาต์พุตของเครือข่ายกับเป้าหมาย ส่งข้อผิดพลาดย้อนกลับผ่านชั้นต่างๆ และปรับน้ำหนักแต่ละตัวเพื่อลดมันลง
การถดถอย การจับฟังก์ชันเข้ากับข้อมูลฝึกสอนเพื่อทำนายค่าเอาต์พุตต่อเนื่องจากอินพุต
18.1

Exam tips · ⁨ข้อแนะนำสำหรับการสอบ⁩

English
  • Graph answers name nodes, edges and weights, and what they represent; then the algorithm. Dijkstra: table of distances, visit the smallest, update neighbours. A*: $g$, $h$ and $f = g + h$ in every row, expand the smallest $f$.
  • ANN answers name the layers, the weighted connections and training; deep learning adds many hidden layers, large data and automatic feature extraction, with a reason and an example.
  • The three categories in one line each: labelled data and known outputs; unlabelled data and discovered structure; agent, environment, actions and rewards.
  • Back propagation: compare with the target, error backwards through the layers, adjust weights to reduce it, repeat. Regression predicts a value; classification predicts a category.
  • Scenario questions want the pipeline: trained on labelled examples, extracts features, recognises or classifies new input; name the type of AI (image recognition, speech recognition, deep learning).

Common mistakes

  • Describing a graph as "a chart"; in AI it is nodes and edges.
  • Running Dijkstra by picking the nearest neighbour of the current node rather than the smallest overall distance not yet visited; or forgetting to update a node when a shorter route appears.
  • Adding $h$ into $g$ for the next step in A*; $g$ is only the real distance, $h$ is recomputed from the table.
  • Saying deep learning is "learning a lot"; it is the many hidden layers.
  • Confusing unsupervised learning with reinforcement learning; the first finds structure in data, the second learns from rewards.
  • Describing back propagation without the comparison with the expected output or without saying the weights are adjusted.
  • Calling a prediction of a price "classification"; a continuous value is regression.
ไทย
  • คำตอบเกี่ยวกับกราฟระบุชื่อโหนด เส้นขอบ และน้ำหนัก รวมถึงสิ่งที่พวกมันแทน และระบุอัลกอริทึม Dijsktra: ตารางระยะทาง Visits โหนดที่มีค่าน้อยที่สุด อัปเดตเพื่อนบ้าน A*: $g$, $h$ และ $f = g + h$ ในทุกแถว ขยายโหนดที่มีค่า $f$ น้อยที่สุด
  • คำตอบเกี่ยวกับ ANN ระบุชื่อชั้น Connections ที่มีน้ำหนักและการฝึกสอน; การเรียนรู้แบบลึกเพิ่มชั้นซ่อนจำนวนมาก ข้อมูลขนาดใหญ่ และการดึงคุณลักษณะอัตโนมัติ พร้อมเหตุผลและตัวอย่าง
  • หมวดหมู่ทั้งสามในบรรทัดละหนึ่งบรรทัด: ข้อมูลที่มีป้ายกำกับและผลลัพธ์ที่ทราบ; ข้อมูลที่ไม่มีป้ายกำกับและโครงสร้างที่ค้นพบ; เอเจนต์ สภาพแวดล้อม การกระทำ และรางวัล
  • การแพร่ย้อนกลับ: เปรียบเทียบกับเป้าหมาย ข้อผิดพลาดย้อนกลับผ่านชั้นต่างๆ ปรับน้ำหนักเพื่อลดมันลง ทำซ้ำ การถดถอยทำนายค่า; การจำแนกประเภททำนายหมวดหมู่
  • คำถามสถานการณ์ต้องการ Pipeline: ถูกฝึกฝนด้วยตัวอย่างที่มีป้ายกำกับ ดึงคุณลักษณะ ระบุหรือจำแนกประเภทอินพุตใหม่; ระบุประเภทของ AI (การจดจำภาพ, การจดจำเสียง, การเรียนรู้แบบลึก)

ข้อผิดพลาดที่พบบ่อย

  • การอธิบายกราฟว่าเป็น "แผนภูมิ"; ใน AI คือโหนดและเส้นขอบ
  • การรัน Dijsktra โดยการเลือกเพื่อนบ้านที่ใกล้ที่สุดของโหนดปัจจุบันแทนที่จะเป็นระยะทางที่น้อยที่สุดที่ยังไม่ได้ Visits ทั้งหมด; หรือลืมอัปเดตโหนดเมื่อพบเส้นทางที่สั้นกว่า
  • เพิ่ม $h$ เข้ากับ $g$ дляขั้นตอนถัดไปใน A*; $g$ เป็นระยะทางจริงเท่านั้น; $h$ คำนวณใหม่จากตาราง
  • การพูดว่าการเรียนรู้แบบลึกคือ "การเรียนรู้มากมาย"; มันคือการมีชั้นซ่อนจำนวนมาก
  • สับสนระหว่างการเรียนรู้แบบไม่มีผู้ควบคุมกับการเรียนรู้แบบเสริมแรง; อย่างแรกค้นพบโครงสร้างในข้อมูล อย่างที่สองเรียนรู้จากรางวัล
  • การอธิบาย backpropagation โดยไม่มีการเปรียบเทียบกับผลลัพธ์ที่คาดหวังหรือไม่กล่าวถึงการปรับน้ำหนัก
  • การเรียกการคาดการณ์ราคาว่าเป็น "classification"; ค่าต่อเนื่องคือ regression

Interactive lessons on this topic · ⁨บทเรียนเชิงโต้ตอบสำหรับหัวข้อนี้⁩

Work through it step by step, with instant-check exercises. · ⁨ทำทีละขั้นตอน พร้อมแบบฝึกหัดตรวจสอบผลทันที⁩

Past Papers · ⁨ข้อสอบย้อนหลัง⁩

More topics in A-Level Computer Science · ⁨Computer Science A-Level⁩ · ⁨หัวข้อเพิ่มเติมใน A-Level Computer Science · ⁨Computer Science A-Level⁩⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP