Introduction: How Do Machines "Learn"?
Have you ever wondered how your smartphone can recognize your face, or how an app can translate a menu from a photo? It might seem like magic, but it is actually a specific process called Artificial Intelligence (AI). In this chapter, we will explore the "brain" of the AI: how it takes in information (data) and uses special rules (algorithms) to learn from it.
Don't worry if this seems complicated at first! Think of an AI system like a student. Just like you learn by reading books and doing exercises, an AI system learns by looking at thousands of examples until it finds a pattern.
1. The AI Processing Cycle
In your earlier ICT lessons, you learned that computers follow a simple cycle: Input \( \to \) Process \( \to \) Output. AI systems follow this same path, but the "Process" part is much more advanced.
- Input: The AI receives data like text, images, or sound.
- Process: The AI uses Machine Learning or Deep Learning to analyze the data.
- Output: The AI provides a result, such as a prediction ("This is a cat") or an action.
Key Takeaway: AI doesn't just follow a fixed list of instructions; it uses data to improve how it processes information.
2. How AI Processes Different Data Types
Humans see images and hear sounds naturally. However, computers only understand numbers (binary code). To "understand" our world, AI must turn different types of data into formats it can process.
A. Text (Natural Language Processing)
When you type a message to a chatbot, the AI doesn't see "words" the way we do. It breaks sentences down into smaller pieces and turns them into numerical patterns. This helps the AI understand the relationship between words (e.g., "king" and "queen" are related in a similar way to "man" and "woman").
B. Images (Computer Vision)
AI "sees" an image as a huge grid of numbers. Each number represents the color and brightness of a single pixel. By looking at these numbers, the AI can detect edges, shapes, and eventually recognize objects like a car or a face.
C. Audio (Speech Recognition)
Sound travels in waves. AI converts these waves into digital signals (numbers). It then looks for patterns in these signals to identify specific words or even the emotion in a person's voice.
Did you know? To an AI, a picture of a puppy is just a very long list of numbers!
3. Fundamental Principles of AI "Learning"
There are two main ways AI systems are designed to learn: Machine Learning and Deep Learning.
Machine Learning (機器學習)
In traditional programming, a human writes every single rule. In Machine Learning, we give the computer an algorithm (a set of mathematical rules) and a lot of data. The computer then finds the rules for itself.
Example: To teach an AI to find spam emails, we show it 10,000 spam emails and 10,000 real emails. The AI learns which words usually appear in spam.
Deep Learning (深度學習)
Deep Learning is a more advanced version of machine learning. It is inspired by how the human brain works. It uses something called Neural Networks.
- These networks have many "layers" of processing.
- Each layer looks for different features (e.g., one layer looks for lines, the next for circles, and the final layer identifies a face).
- Because there are so many layers, it is called "Deep" learning.
Quick Review: Machine Learning uses algorithms to find patterns; Deep Learning uses "neural networks" with many layers to solve very complex problems.
4. The Importance of Training Data
To make an AI "smart," we must train it. This is like giving a student a textbook to study from.
Training and Testing
1. Training Phase: We show the AI a training dataset (e.g., photos labeled "Dog" or "Not Dog"). The AI tries to guess and is corrected when it is wrong.
2. Testing Phase: We show the AI new data it has never seen before to see how accurate it is.
Garbage-In, Garbage-Out
If the training data is bad, the AI will be bad. For example:
- If you only show an AI photos of white dogs, it might not recognize a black dog.
- This leads to Bias (unfairness), which we will discuss more in the "AI Ethics" chapter.
Key Takeaway: The quality and variety of data are the most important factors in how well an AI learns.
5. Summary Checklist
Check if you understand these key points:
- Data Conversion: AI turns text, images, and sound into numbers to process them.
- Machine Learning: The process where AI finds patterns in data without being told exactly what to do.
- Deep Learning: A type of learning using "neural networks" that mimic the human brain.
- The Role of Data: AI needs a large amount of high-quality data to be accurate.
- Algorithm: The mathematical "recipe" or set of rules the AI follows to learn.
Memory Aid: Remember the Triple Threat of AI performance: Data (the food), Algorithms (the recipe), and Computing Power (the stove)!