Lesson 04 · Artificial intelligence · 10 min
What AI is: four answers
Think like us or think correctly; act like us or act correctly. The four definitions on my first AI page, and why the field settled on the last one.

After this you can
- Place any AI system in one of the four classic definitions
- Explain what an expert system is and where rules beat learning
- Write a tiny rule-based system and see its limits
The first line of my first AI page says AI is “making computers behave like humans.” Halfway down the same page I drew a box that shows that's only one of four possible answers. This lesson is about that box, because which answer you pick decides what you build and how you judge it.
The quadrant
There are two questions. Are we judging the system on how it thinks or on how it acts? And are we measuring it against people or against an ideal of correctness, which the textbooks call rationality? Two questions with two answers each give four definitions:
| Like humans | Rationally | |
|---|---|---|
| Thinking | 1 · Model how people think: cognitive science | 2 · Reason correctly: logic, the “laws of thought” |
| Acting | 3 · Behave so people can't tell: the Turing test | 4 · Do the right thing: the rational agent |
Try placing some real systems. Each answer explains itself once you choose.
A chatbot judged only on whether people can tell it from a person
A program whose step-by-step reasoning is compared with recordings of people solving the same puzzle
A logic engine that only draws conclusions that follow from its premises
Your hand pulling back from a hot pot before you've thought about it
A crop-disease app that picks the most likely diagnosis from a photo
A route planner that finds the cheapest way across town
0 of 6 placed · 0 where I'd put them
Why the field settled on quadrant 4
Acting humanly was Alan Turing's proposal in 1950: if you can't tell the machine from a person in conversation, stop arguing about whether it thinks. It's a brilliant test, but a poor engineering target. People make mistakes, and a system built to imitate them inherits those mistakes.
Thinking humanly needs a theory of how minds work, tested against real people. That's valuable science, but you can't build a better route planner by copying how a lost driver reasons.
Thinking rationally means logic: from true premises, draw only true conclusions. It breaks on two things. Most real knowledge is uncertain (the leaf is probably blighted), and some situations need action before anything can be proven.
Acting rationally takes what works from the other three. A rational agent does whatever is expected to give the best outcome, given what it can perceive. Correct reasoning is one way to get there; a fast reflex is another. My page has the example: you pull your hand back from something hot before you've thought about it, and that's the rational move. This is the definition behind most modern AI, and it's the starting point for the next lesson, on agents.
Expert systems: knowledge, written down
My note on expert systems reads: take the knowledge of a professional and craft a system out of it. The classic example is medical diagnosis. MYCIN, built at Stanford in the 1970s, recommended antibiotics for blood infections using a few hundred if-then rules written with doctors. It worked well in tests, and the approach spread through industry in the 1980s.
The engine underneath is simple. Keep a set of known facts, and keep firing any rule whose conditions are all known, until nothing new appears. That's called forward chaining:
# Forward chaining: keep firing rules whose conditions are all known facts,# until nothing new can be concluded.rules = [ ({"no_power_light", "cable_ok"}, "socket_problem"), ({"power_light", "not_charging"}, "battery_or_port"), ({"battery_or_port", "port_has_lint"}, "clean_the_port"), ({"battery_or_port", "port_clean"}, "battery_worn"),]def infer(facts): facts = set(facts) changed = True while changed: changed = False for needs, then in rules: if needs <= facts and then not in facts: facts.add(then) changed = True print(f"{' + '.join(sorted(needs))} => {then}") return factsinfer({"power_light", "not_charging", "port_has_lint"})# not_charging + power_light => battery_or_port# battery_or_port + port_has_lint => clean_the_portIts strengths are real. Every conclusion comes with a trail of the rules that produced it, so it can explain itself, and an expert can read and correct the rules. Its weakness is getting the rules in the first place. Experts can't write down everything they know, the rules multiply and start contradicting each other, and the system has nothing to say about a case nobody wrote a rule for.
Planning: the timetable on my page
Under “uses of AI” my first entry is planning, with the example of building a system to handle the timetable, flexible enough to leave empty slots for changes. Timetabling is a classic constraint satisfaction problem: assign every course a slot so that no rule is broken. The simplest solver tries a slot, moves on, and backs up when it hits a dead end:
# Four courses, three lecture slots. Two rules: a lecturer can't teach two# classes at once, and a year group can't sit two classes at once.courses = { "Data Structures": {"lecturer": "Ama", "year": 2}, "Algorithms": {"lecturer": "Ama", "year": 3}, "AI": {"lecturer": "Kofi", "year": 3}, "Databases": {"lecturer": "Kofi", "year": 2},}slots = ["Mon 8:00", "Mon 10:30", "Tue 8:00"]def clashes(course, slot, plan): me = courses[course] for other, taken in plan.items(): if taken != slot: continue them = courses[other] if me["lecturer"] == them["lecturer"] or me["year"] == them["year"]: return True return Falsedef schedule(plan, todo): if not todo: return plan # everything placed course, rest = todo[0], todo[1:] for slot in slots: if not clashes(course, slot, plan): found = schedule({**plan, course: slot}, rest) if found: return found return None # dead end: back up and try againfor course, slot in schedule({}, list(courses)).items(): print(f"{slot:10} {course}")# Mon 8:00 Data Structures# Mon 10:30 Algorithms# Mon 8:00 AI# Mon 10:30 DatabasesNotice it found a plan with Tuesday left empty, the flexibility my note asked for. Real university timetables have thousands of courses, rooms with capacities, and soft preferences (“no 8 a.m. lectures for first years if possible”), so real solvers add smarter ordering and pruning. But underneath it's still this: search through possibilities, and back up when a rule breaks. That's why search gets a lesson of its own.
Where you'll meet it
The rest of my page lists the big application areas. Here's what each looks like now.
Planning
Timetables, delivery routes, airline crew rosters, factory schedules. Mostly search and constraint solving.
Vision
Reading images: crop disease from a leaf photo, faces, number plates, X-rays. Almost all of it is learned from labelled examples now.
Robotics
Vision plus planning plus control, in a world that pushes back: warehouse robots, drones, self-driving cars.
Natural language
Translation, search, assistants. Large language models predict the next token, one at a time; my Token by Token project lets you run that step in the browser.
Try it
01A spam filter is judged by how many spam emails it catches and how few real emails it blocks. Which quadrant?
Show the answerHide the answer
02Add a rule to the phone expert system so that a power light, not charging and a clean port concludes the battery is worn. Do you need to?
Show the answerHide the answer
battery_or_port + port_clean => battery_worn. Chaining means you write small rules and let them combine.03Add a fifth course, “Networks”, taught by Ama to year 2. Does the timetable still fit in three slots?
Show the answerHide the answer
Further reading
- Elements of AI ↗
A free course from the University of Helsinki. The best plain-language starting point I know.
- Artificial Intelligence: A Modern Approach ↗
Russell and Norvig, the textbook behind the quadrant and most university AI courses, including mine.
- Turing, “Computing Machinery and Intelligence” (1950) ↗
The paper that proposed the imitation game. Shorter and funnier than you'd expect.