Course 0 · Lesson 02/10 · Interactive guide

How AI Differs From Regular Software

AI and regular programs are both software. The difference is whether we write the response rules directly or fit behavior from examples.

Lesson
02 / 10
Time
About 8 minutes
Level
Beginner · 0/5
Prerequisite
Lesson 01 · What Is AI, Really?

01 · Start without jargon

Spell out every step, or learn from examples

A regular program follows steps written by people, such as “if the order is over $50, shipping is free.” Machine learning receives examples and adjusts numbers inside a model so it can predict new cases.

Write rules

People specify conditions

The same input under the same rules gives the same result, and each step can be traced.

Learn from examples

A model is fitted to data

Useful when every pattern is hard to write down, but the output is a prediction and can be wrong.

Key point: AI is not outside the world of programs. It is still code running on computers; one part of its behavior is fitted from data instead of every rule being typed by hand.

02 · Everyday analogy

A recipe versus learning from samples

Rule-based software is like a precise recipeMeasure 200 grams of flour and bake for 20 minutes. Learning from examples is more like examining many cakes labeled “ready” or “not ready” and finding features that help separate the groups.
Checkout

Rules fit better

Adding totals, applying a defined tax rate, or enforcing an entitlement must be exact and auditable.

Image sorting

Examples can help

Shape, lighting, and camera angle vary so much that complete hand-written cat rules are difficult.

Spam filtering

Often hybrid

Rules block known senders while a model helps catch new message patterns that old rules miss.

03 · Make the choice

Write rules, learn from examples, or combine both?

Pick a task, then choose the best approach for the stated constraints. The result and explanation update immediately.

Task 1

Calculate shipping from a weight and region table

The store has a fixed price table and the same order must produce the same charge every time.

Choose an approach to see why

04 · Deeper layer

Vocabulary for choosing the right tool

Deterministic

The same steps and input produce the same output. This fits arithmetic, business rules, and auditable workflows.

Training

An algorithm adjusts values inside a model using examples, aiming to reduce error on a defined task.

Inference

A trained model receives a new input and returns a prediction, such as a score that an email may be spam.

Probabilistic output

Models often return a score or probability. A real system still needs thresholds and a path for uncertain cases.

Trade-off: Rules are predictable but become hard to maintain when cases multiply. Models handle fuzzy patterns but require data, evaluation, monitoring, and a response when predictions fail. Real products often combine both.

05 · Remember these three

A short map before you leave

  1. 01

    Both are software. Their behavior comes from either written rules or values fitted from examples.

  2. 02

    Rules fit exact work. Use them for arithmetic, fixed conditions, constraints, and steps that must be audited.

  3. 03

    You do not need one winner. A model can predict while rules enforce boundaries and manage risk.

06 · Knowledge check

Answer three questions and reveal the reasoning

1. What should calculate a cart total and a defined tax rate?

2. Which statement describes machine learning more accurately?

3. Why do many real systems combine rules and ML?