Why does it exist?

Why AI, when we have traditional coding?

Traditional software already runs your phone, your car and your bank, so why do we need AI at all? By the end, you will be able to tell which problems need written rules and which need a machine that learns from examples.

Read~8 min
Watch10:40 video
Practiceruns right here
Published9 Oct 2026

Prefer to watch? This post goes with the video (10:40). Open it on YouTube.

Software already runs everything

Your phone, your car and your bank all run on software. Behind each of them sit millions of lines of code, and a person wrote every rule in them. The machine simply follows those rules.

So a student asked me a fair question: if code can already run all of this, why do we need AI at all? Let's try to understand, starting with a small puzzle about two jobs for a computer.

Job A

Given a student's marks, give the grade.

Job B

Look at a photo, and say whether your friend is in it.

Decide firstFor which job can you write down the exact rules?
Pick A, B or both before you read on. The next two sections answer it, one job at a time.

Job A: you write the rules

Say your college gives grades by a simple rule. 90 and above is an A, 75 and above is a B, and anything lower is a C. These are rules, and you can write every one of them down. So the program is easy.

Try it: the grade rules

The goal: see that written rules give the same answer every time.

The steps: press Run. Then, on the line marked # edit here, change 82 to 95 and run again. Last, try 60.

Guess first: which grade will 75 get, exactly on the line?

What you should seemarks = 82 → B marks = 95 → A marks = 60 → C marks = 75 → B (75 and above is a B)

What it means: the same marks always give the same grade. That is the strength of this kind of code: it is exact. And if someone asks why they got a B, you can show them the line that decided it.

A person writes the rules, and the computer follows them. This is what we call traditional programming.

Job B: the wall

Now job B. Say you are scrolling through the group photos from a college trip. Within a second you spot your friend, whether he is seen from the side, wearing a cap, or caught in a dark, blurry shot.

Group photo: the friend, seen from the side Group photo: the friend in a cap Dark, blurry group photo
You find him in each of these in a second. Now try to write down how.

Let's try to write the rules anyway, one at a time.

Your ruleWhy it fails
Two eyes, a nose and a mouthEveryone in the photo has those.
Short hairHalf the boys in your class have it too.
A beardHe shaved last week.
GlassesHe took them off for the photo.

It gets worse when you keep all four rules anyway. One day his cousin appears in a photo, with the same hair, beard and glasses, and your program says it is your friend.

The friend His cousin, who looks the same
Every rule you add to tell them apart breaks on some other photo.
The wall
You know your friend's face perfectly, but you cannot write down how you know it. And if you cannot write the rules, you cannot write the program.

Faces are not special. Understanding what you say to your phone, reading messy handwriting and spotting a spam message all hit the same wall.

This really happened. In 1979, a company called DEC built a program to check its customers' computer orders. It started with 250 hand-written rules and grew to about 3,300 by 1983. Its own builders wrote: "It is difficult now to believe R1 will ever be done." (R1 Revisited, AI Magazine, 1984)

How you really learned it

So here is a different question: how did you learn your friend's face in the first place?

Nobody gave you rules. You simply saw him many times, in class, in the canteen and on the trip, and each time you knew it was him. Slowly, your brain worked out the pattern on its own.

The friend in class The friend in the canteen The friend on the trip
No rules. Many examples.

What if we do the same for a computer? Instead of rules, we give it thousands of photos, each with its answer: this is your friend, this is not. The computer then works out the rules by itself.

Learning the rules from examples, instead of being given them, is what we call machine learning. Most of what we call AI today is built on this idea.

The idea is older than you might think. In 1959, a researcher at IBM wrote a program that learned to play checkers, a board game a bit like a simpler chess. After 8 to 10 hours of practice, it played better than the person who wrote it.

Two ways to build it

Put side by side, the two approaches start from opposite ends.

Traditional coding

rules → logic → program → answers

Machine learning

data → training → model → deployment

In traditional coding, a person discovers the rules. The rules become logic, the logic goes into a program, and the program gives you the answers.

Machine learning starts from the data instead. The data goes through a training algorithm, a model comes out, and that model is put to work in a real app.

Finding the rules from data is called training, and what comes out is a model. A model is sometimes a set of rules the computer found, but most often it is just numbers that no human wrote. Putting the model to work is called deployment.

Does it really work?

Look at one famous yearly challenge, called ImageNet. Teams from around the world sent in programs that look at a photo and name what is in it. These were not faces but things: dogs, cars, mushrooms and a thousand other kinds. Each program got five guesses per photo.

2010: 28 wrong out of 100 2015: under 4 wrong out of 100 One careful human: about 5 wrong out of 100
Wrong out of every 100 photos. Sources at the end of the page.

In 2010, the best program still got about 28 out of every 100 wrong. As the models learned better, the errors fell. By 2015, the best one got fewer than 4 wrong, while one careful human who tried the same challenge got about 5 wrong.

Nobody wrote the rules for a thousand kinds of things; the programs learned them. Today this is everywhere: in one large report, 88 out of every 100 organisations surveyed said they use AI.

Certain, or predicted?

Notice that even the best program still got some photos wrong. That is not a bug. It is how AI answers.

Traditional code is certain

Same input, same output, every single time.

AI predicts

It gives you its best guess, with how sure it is.

You already live with predictions. Say the weather report gives a 60% chance of rain. You carry an umbrella, and sometimes it doesn't rain, yet nobody calls the report broken. It told you how sure it was.

Or say Google Maps tells you the trip takes 35 minutes. You reach in 34 or 36, or later if the traffic catches up. That estimate is a prediction, and Google makes it with machine learning.

Rain cloud and umbrella: 60% chance of rain A map on a phone showing about 35 minutes
Predictions you already trust. So with AI, always ask one more question: how sure is it?
Careful here

Certain does not mean correct. If a written rule is wrong, the code is wrong every single time.

So, AI for everything?

No. Go back to job A, the grades. Would you show a machine thousands of mark sheets so it can learn a rule you can write in 3 lines?

The machine would get most grades right. But one day it gives a B to someone with 95, and it cannot tell you why.

A learned grade: 95 marks given a B, with no reason

Learning has a cost. It needs many examples, it is sometimes wrong, and it cannot always explain itself. Code with written rules has none of these costs.

So when you can write the rules, write them, and use learning only where you cannot. A well-known engineering guide from Google puts this as its rule number 1: "Don't be afraid to launch a product without machine learning." That is fit-for-purpose thinking, not trend-first thinking.

Most real systems use both

Say you pay a friend from your bank app. The money leaving your account follows exact rules, because not one rupee can go missing. That part is code.

Now say a payment looks unusual: a big amount, at midnight, to a stranger. Your bank may stop it, or message you to check whether it is fraud. Nobody can write all the rules for that, so that part is AI. It learns from past frauds and predicts.

A bank message asking: did you make this payment?

In India, the Reserve Bank has even built an AI model, MuleHunter.AI, to help banks catch accounts used for fraud. It is the same app, with code for the certain part and AI for the guess.

Key idea
It was never AI or coding. It is AI and coding, each for its own job.

The takeaway

  1. AI did not come because traditional coding was bad. Some problems were never programming problems; they were learning problems.
  2. When we know the rules, we program them. When we only have examples, we learn them.
  3. Most real systems use both: code for what must be certain, AI for what can only be predicted.

That opens a new question. If the machine learns from our examples, who picks the examples, and who checks what it learned?

References

Every number on this page, and where it comes from. Checked on 9 Oct 2026.

  1. ImageNet Large Scale Visual Recognition Challenge — ILSVRC 2010 results. The 2010 winner's score: about 28 wrong in 100 (top-5 error 28.2%). link
  2. He, K., Zhang, X., Ren, S., Sun, J. — Deep Residual Learning for Image Recognition (2015). The 2015 winner: 3.57% error, fewer than 4 in 100. link
  3. Karpathy, A. — What I learned from competing against a ConvNet on ImageNet (2014). One careful human: 5.1% error. One trained annotator, not 'all humans'. link
  4. McDermott, J. — R1: The Formative Years, AI Magazine. What DEC's rule-based program did: configure customers' computer orders. link
  5. Bachant, J. & McDermott, J. — R1 Revisited: Four Years in the Trenches, AI Magazine 5(3), 1984. 250 rules in 1979, about 3,300 by 1983, and 'difficult now to believe R1 will ever be done'. link
  6. Samuel, A. L. — Some Studies in Machine Learning Using the Game of Checkers, IBM Journal, 1959. The checkers program that learned by playing and beat its own author.
  7. Stanford HAI — AI Index 2026, Economy chapter. 88% of surveyed organisations used AI in 2025. link
  8. Google DeepMind — Traffic prediction with advanced Graph Neural Networks (2020). Google Maps' arrival times are predicted with machine learning. link
  9. Reserve Bank of India — Statement on Developmental and Regulatory Policies, 6 Dec 2024. MuleHunter.AI, an AI/ML model that helps banks catch accounts used for fraud. link
  10. Zinkevich, M. — Rules of Machine Learning, Google for Developers. Rule #1: 'Don't be afraid to launch a product without machine learning.' link
  11. Chollet, F. — Deep Learning with Python, chapter 1. The well-known picture: rules + data → answers, against data + answers → rules. link
  12. Graham, P. — A Plan for Spam (2002). For your homework: six months of hand-written spam rules, then a filter that learns. link