B Binance · The world's largest crypto exchangeBinance Sign up → AD OKX OKX · A leading global crypto exchangeOKX Sign up → AD
🤖 AI Basics · Lesson 1 / 10

What Is AI? — Rules and Learning

Traditional programs follow rules written by people; today's AI finds the rules in example data. This one difference explains both AI's strengths and its weaknesses.

⏱ About 14 min ✍️ 4 practice questions Updated 2026-10-08
🎯 By the end of this lesson you can
  • Explain, with an example, the difference between a rule-based program and learning-based AI
  • Tell apart artificial intelligence, machine learning and deep learning and how they relate
  • Explain, from the data's point of view, why learning-based AI can be wrong
  • Set criteria for which tasks suit AI and which do not

1.What the term "artificial intelligence" refers to

Artificial intelligence (AI) was originally the name for an entire field of research: "getting machines to do things that require human intelligence." Reading text, understanding speech, recognizing objects in photos, translating, and choosing the next move in a game all fall under it.

So the term itself does not refer to any one technology. A chess program from decades ago and today's conversational AI that writes sentences are both called artificial intelligence. The difference lies in how they get the job done, and there are two broad approaches: people write the rules directly, or the machine finds the rules from examples.

2.The first approach: people write the rules

Suppose you are building a program to filter out spam email. The first idea that comes to mind is to write rules: if the subject contains "free," "winner" or "click now," it is spam; if the sender is in the address book, it is legitimate; and so on.

The advantages of this approach are clear. You can see why a decision was made just by looking at the rules, and as long as the rules are right, the result is always the same. For tasks with clear rules for the right answer, such as tax or date calculations, this is still the best approach today.

Its weaknesses are just as clear. Spammers write "free" as "f.ree" or "f ree." Each time, a person has to add another rule, and once the rules number in the hundreds, they start to conflict. Above all, things that are hard for people to put into words, such as "recognize whether the animal in a photo is a cat," cannot be written as rules. We recognize cats easily, but we cannot write down the criteria completely.

ExampleIf a rule-based spam filter has only one rule, "if the subject contains 'free,' it is spam," how will these two emails be classified? (A) "You won a free shipping prize!" (B) "Sending the meeting materials (free template included)"
  1. (A) contains "free" in the subject, so it is classified as spam. It very likely is spam, so the filter got it right.
  2. (B) also contains "free" in the subject, so it is classified as spam too. But it is a legitimate email from a coworker.
  3. Rules look only at the letters, not the context. Even if you add more rules, exceptions like this keep appearing.
AnswerBoth are classified as spam, and (B) is a legitimate email filtered out by mistake.

3.The second approach: the machine learns from examples

The other approach is to give examples instead of rules. If you collect tens of thousands of emails that people have labeled "spam" or "legitimate" and show them to the machine, it works out on its own which words and features, appearing together, make spam more likely. This approach of finding patterns in data is called machine learning.

A learning-based approach also uses clues people never thought of: the time an email was sent, the number of links, combinations of words. Even when spammers come up with a new trick, you can keep up by collecting new labeled examples and retraining, without fixing rules one by one.

But there is a price. The patterns the machine finds are stored as combinations of a huge number of numbers, so it is hard for a person to read them and see "why it decided this way." And the machine learns only as much as the examples you show it. If the examples are skewed, the results are skewed too.

Comparing the two approaches
Rule-basedLearning-based (machine learning)
Who makes the rulesPeopleThe machine finds them in data
What it needsClear rulesLots of good-quality example data
Explaining its decisionsEasyHard
Tasks hard to put into wordsCan hardly do themTends to do them well
Good fit forTax and date calculations, fixed proceduresPhoto classification, speech recognition, translation, text generation

4.How AI, machine learning and deep learning relate

The three terms are often used interchangeably, but they are easiest to understand as nested circles. The largest circle is artificial intelligence; inside it is machine learning, the approach of learning from data; and inside that is deep learning, machine learning that uses artificial neural networks with many layers.

Most of today's AI that recognizes photos, turns speech into text and writes sentences is built with deep learning. Large language models, the foundation of conversational AI, are also a kind of deep learning. We look at neural networks in Lesson 3 and language models in Lesson 4.

Artificial intelligence ⊃ machine learning ⊃ deep learning
Deep learning ⊃ large language models (the foundation of conversational AI)
Real products often mix the two approaches. A trained model produces the answer, and rules written by people filter out dangerous answers or formatting errors.

5.Why learning-based AI gets things wrong

Learning-based AI is strong at "things similar to what it has seen a lot of" and weak at "things it has never seen." A model trained only on cat photos taken during the day can get confused by photos taken at night. This is not a malfunction; it is a property of how it learns.

Another point is that it is probabilistic. An AI's answer is "the most plausible thing," not "a verified fact." Most of the time the plausible answer is the right one, but the moment the two diverge, the AI gives a wrong answer in a very confident tone. This is the hallucination we cover in Lesson 7.

So people who use AI need two habits. First, start by giving it tasks where you can check the basis for its answers. Second, the more harm a mistake would cause, the more important it is for a person to check at the end.

  • Good fit for AI: writing drafts, summarizing, broadening ideas, changing formats, explaining things more simply
  • Needs a human check: facts where mistakes cause real harm, such as numbers, dates, law and medicine
  • Better done with rules than AI: tasks with fixed calculation rules (taxes, interest, the difference between dates) — calculators and tables are more accurate

6.Three common misconceptions about AI

Because the term AI is used so often in movies and ads, it easily looks bigger or smaller than it really is. Let's correct three common misconceptions using the "rules" and "learning" perspective from this lesson.

All three lead to the same conclusion. AI is a tool that produces plausible answers from patterns learned from data, and people decide where and how to use those answers. With this perspective in place, whenever you meet a new AI service you can first ask, "What did it learn from, and where might it go wrong?"

  • Wrong: AI understands meaning like a person and thinks for itself.Right: AI calculates the most plausible answer using patterns it found in data. Even when its answers look human, you cannot conclude that it understands in the same way.An answer sounding natural and its content being correct are two different things. Even when the tone is natural, the facts must be checked separately.
  • Wrong: The more you use AI, the more it keeps learning from your conversations on its own.Right: Many AI systems are used as they are once training is finished. To make them learn something new, the makers must collect data and train them again.It is common for an AI not to remember the next day what you corrected just now. Even if there is a feature that looks like memory, it may be something the service added separately.
  • Wrong: Since a computer calculated the answer, it is more accurate and fairer than a person.Right: An AI's answers are only as accurate and fair as the data it learned from. If the data is wrong or skewed, the answers will be too.A calculator follows fixed rules, but learning-based AI answers based on probabilities. The idea that "a machine did it, so it must be right" is the most dangerous one.

📌 Key points

  • Artificial intelligence is not one specific technology but the name of a whole field: "getting machines to do things that require intelligence"
  • In rule-based systems people write the rules; in machine learning the machine finds patterns in example data
  • Artificial intelligence ⊃ machine learning ⊃ deep learning — today's conversational AI is a language model built with deep learning
  • A learning-based AI's answer is "the most plausible thing," not "a verified fact"
  • Give calculations with clear rules to a calculator; give judgments that are hard to put into words, and drafts, to AI

✍️ Practice questions

Answer first, then open "Answer and explanation".

Q1. Which of the following tasks is the best fit for a rule-based program?

⭕ Correct

❌ Not quite — see the explanation

Answer and explanation
Answer ② Calculating the number of days between two dates

For date calculations, as long as you write the calendar's rules correctly, you always get the right answer. The other three are hard to describe completely in words, so a learning-based approach does them better.

Q2. Which correctly shows the relationship between artificial intelligence, machine learning and deep learning?

⭕ Correct

❌ Not quite — see the explanation

Answer and explanation
Answer ③ Artificial intelligence ⊃ machine learning ⊃ deep learning

Artificial intelligence is the broadest field; the approach of learning from data is machine learning; and within that, the kind that uses neural networks with many layers is deep learning.

Q3. An animal-classifying AI trained only on photos taken during the day often gets night photos wrong. What is the best explanation?

⭕ Correct

❌ Not quite — see the explanation

Answer and explanation
Answer ② These conditions were not in the training data, so the patterns it learned do not fit well

Learning-based AI is strong on inputs similar to what it has seen and weak under conditions it has never seen. The usual fix is to add night photos to the training data.

Q4. In one phrase, is a learning-based AI's answer "a verified fact" or "the most plausible thing"? And in one sentence, say why the difference matters.

Answer and explanation
Answer The most plausible thing

Plausibility and fact overlap most of the time, but not always. When they diverge, the AI confidently gives a wrong answer, so important facts must be checked separately.

🤖 Try asking AI like this

Copy a prompt and replace the [ ] parts with your own situation. Don't take the answer on trust — check it against this lesson.

When you can't decide whether a task can be handed to AI

I'm planning to [the task you want to do]. Split this task into the parts that are good to hand to AI and the parts a person should check directly, and organize them in a table. For each part, add a one-line reason.

When you want a concept explained again at your level

Explain the difference between rule-based programs and machine learning so that a middle school student could understand it. Give two everyday examples, and at the end, ask me three questions to check whether I understood. Tell me the answers only after I respond.
References
  • High school "Fundamentals of Artificial Intelligence" course content (Korean national curriculum, Ministry of Education)
  • Standard explanations in introductory AI textbooks (definitions of machine learning and deep learning)

Reached every goal above? Mark the lesson complete.

🤖 AI Basics

  1. 1What Is AI? — Rules and Learning
  2. 2Machine Learning Basics — Data, Model, Training, Evaluation
  3. 3Neural Networks, Intuitively — Small Calculations Add Up to Judgment
  4. 4How Do Large Language Models Produce Text?
  5. 5Prompt Basics — Saying Exactly What You Want
  6. 6Advanced Prompting — Roles, Examples, Steps, Format
  7. 7Hallucination and Verification — How to Doubt What Sounds Plausible
  8. 8Privacy, Copyright and Ethics — Using AI Responsibly
  9. 9Working with AI — Delegate, Check, Connect
  10. 10Learning Strategies for the AI Era — The Basics Shape Your Questions
📚 Worth reading
🧠What Generative AI Does and Where It Fails→ ✍️How to Write a Good Prompt→ 🔍Checking AI Answers→ 📚Using AI for Study and Work Without Plagiarism→
← Foundations for the AI Era