Start free trial
Trending New Genres Authors
EnglishEnglish
EspañolSpanish
简体中文Chinese
繁體中文Chinese (Traditional)
FrançaisFrench
DeutschGerman
日本語Japanese
PortuguêsPortuguese
ItalianoItalian
한국어Korean
РусскийRussian
NederlandsDutch
العربيةArabic
PolskiPolish
हिन्दीHindi
Tiếng ViệtVietnamese
SvenskaSwedish
ΕλληνικάGreek
TürkçeTurkish
ไทยThai
ČeštinaCzech
RomânăRomanian
MagyarHungarian
УкраїнськаUkrainian
IndonesiaIndonesian
DanskDanish
SuomiFinnish
БългарскиBulgarian
עבריתHebrew
NorskNorwegian
HrvatskiCroatian
CatalàCatalan
SlovenčinaSlovak
LietuviųLithuanian
SlovenščinaSlovenian
СрпскиSerbian
EestiEstonian
LatviešuLatvian
فارسیPersian
മലയാളംMalayalam
தமிழ்Tamil
اردوUrdu
Searching...
SoBrief
Paradigms of Artificial Intelligence Programming

Paradigms of Artificial Intelligence Programming

Case Studies in Common Lisp
Build AI programs in Lisp, from planning to language, and learn where promising approaches break.
by Peter Norvig 1991 976 pages
4.33
500+ ratings
Listen
Immersive
V2.3
Amazon Kindle Audible
Try Full Access for 3 Days
Unlock listening & more!
Continue

Key Takeaways

Learn AI by tracing real programs from crude prototype to failure

Study the construction. Norvig teaches programming by building consequential examples, not by presenting a long catalog of syntax. Readers follow programs for planning, dialogue, algebra, symbolic mathematics, and language, seeing early versions work on simple cases and fail on harder ones.

Use failure as instruction. GPS, ELIZA, and STUDENT are not presented as magic. Their limitations expose the choices hidden inside a program: how knowledge is represented, which cases are searched, and what the system assumes. The reader is invited to trace execution, test variations, and improve the design.

Analysis

What's striking is the book's apprenticeship model: fluency comes from inspecting working artifacts and making them answer to new cases. That is more transferable than memorizing syntax because it trains readers to connect a design choice to its consequences. The risk is that imitation can become cargo-cult coding. The exercises matter because they ask readers to alter the examples, not merely admire them.

Represent rules as data so one engine can solve several tasks

Fit the notation. A grammar can be written as rules in Lisp data, then interpreted by a general generator. The same grammar can produce random sentences, nested parse trees, or every sentence in a small finite language without changing the grammar itself.

Build a small language. This data-driven approach separates domain knowledge from the program that uses it. Norvig's key move is to let the problem's own terms shape the notation, then write an interpreter for that notation. Macros and Lisp's uniform list syntax make such extensions practical, though a growing language still needs precise rules for what each form means.

Analysis

The deeper design lesson is that a representation is an interface between experts and computation. A well-chosen notation makes new knowledge additive: one can extend the data without rewriting the engine. This resembles the separation between a query and a database engine. The tradeoff is real: every new notation creates semantic obligations, and flexible syntax without clear interpretation can hide errors rather than remove them.

Plan backward from goals, but preserve state and reconsider clobbered goals

Start with the desired state. GPS uses means-ends analysis: compare the current situation with a goal, choose an action that reduces the difference, and solve that action's preconditions as smaller goals. In the nursery-school example, driving requires a working car; fixing the car may require a battery, money, and communication with a repair shop.

Track what actions undo. The first GPS version can spend money and then falsely claim it still has money. A revised version carries separate candidate states and checks that completed goals remain true. Yet the blocks-world Sussman anomaly shows that simply reordering goals is not enough when plans interfere.

Analysis

What's valuable here is the separation of a plan's purpose from its actions. It lets a system reason about unfamiliar domains by supplying operators rather than rewriting the solver. But a goal list is not a plan: actions have side effects, and solving one subgoal can destroy another. The example anticipates a general systems problem, where local success does not guarantee that global invariants still hold.

Choose search by branching, memory, and how much certainty the task requires

Search order changes cost. Depth-first search uses little memory but can descend forever; breadth-first search is systematic but stores many alternatives. Best-first search uses an estimate of distance to the goal, while beam search limits the number of candidates and can discard the only successful route if its scoring function is poor. A improves graph search by tracking path costs and avoiding redundant states.

Prune without changing the answer. In Othello, minimax evaluates future moves assuming each player chooses well. Alpha-beta search skips branches that cannot affect the final choice. It returns the same decision as full minimax while often examining far fewer positions.

Analysis

Search is not one algorithm but a bargain among completeness, memory, and time. The book makes the cost of that bargain visible: a bad heuristic can make a focused search miss, while a broad search may be impractical. Alpha-beta is especially instructive because it improves efficiency without changing the minimax result. Pruning is safe only when its bounds are correct.

Pattern matching can mimic conversation without understanding what a sentence means

Match and transform. ELIZA looks for patterns such as a statement beginning with a desire or feeling, then inserts matched phrases into a prepared reply. A user can mistake the fluent exchange for understanding, even though the program does not know whether the echoed phrase makes sense.

Extract more structure. STUDENT goes further: it maps algebra word problems into equations, then solves them. It handles a question about customers as a variable and translates phrases about percentages and squares into arithmetic. But it can confuse different phrases for the same quantity, or accept division by zero. Both programs show the power and limits of pattern-based translation.

Analysis

These programs distinguish linguistic performance from grounded interpretation. ELIZA succeeds partly because the human supplies coherence; STUDENT succeeds when its narrow templates fit the problem. The useful question is not whether a system sounds intelligent, but which distinctions its representation can preserve. Pattern matching remains effective in constrained interfaces, yet it cannot detect nonsense unless the rules encode what counts as sensible.

Use unification to express constraints, then control backtracking before it explodes

Let variables stay open. Prolog represents facts as relations and uses unification to make two structures agree. A query can ask who likes cats, not only whether a named person does. Backward chaining follows rules toward their premises, and backtracking searches alternative proofs when one path fails.

Know the search policy. The zebra puzzle shows how constraints can narrow a vast set of arrangements without enumerating every complete solution. But Prolog's depth-first search can loop on recursive rules, and turning off the occurs check can admit circular structures. The cut can prune choices, but it also makes execution order part of the program's behavior.

Analysis

Unification is powerful because it postpones commitment: a variable can stand for many possibilities until another constraint narrows it. Backtracking supplies the search that makes those constraints useful. Together they are expressive, not magical. Search order can dominate declarative intent, and a program that works in one direction may fail in another. Logic programmers still need to understand control, especially when the search space is large or infinite.

Normalize expressions into one canonical form before comparing or simplifying them

Make equality visible. A rewrite-rule simplifier can handle familiar identities, but it struggles to combine terms whose order or grouping differs. Norvig's polynomial system instead represents a polynomial as a vector of coefficients ordered by powers of a main variable. Variables are ordered consistently, so equivalent sums such as x plus y and y plus x converge on the same representation.

Choose the domain carefully. This canonical form supports polynomial addition, multiplication, differentiation, and integration techniques. It is not a universal representation for every mathematical expression: expanding a large power may consume time and space, while functions such as logarithms introduce harder questions about equivalence.

Analysis

Canonicalization turns equality from a difficult search into a structural comparison, which is why it can simplify both algorithms and debugging. The crucial insight is that representation is workload-dependent: one normal form makes some operations cheap and others expensive. This is the same tradeoff seen in databases and compilers. Canonical forms are powerful when the domain is bounded and the normalization procedure is trustworthy.

Optimize measured bottlenecks, not code that merely looks expensive

Measure before rewriting. Norvig profiles the rule-based simplifier and finds that pattern matching and variable checks account for about 89 percent of measured time. That directs effort toward actual bottlenecks rather than cosmetic cleanup.

Change the cost structure. Memoization avoids recomputing results; indexing rules avoids testing irrelevant ones; compilation removes interpretation overhead; declarations help the compiler choose efficient representations; and avoiding unnecessary allocation reduces garbage collection. On the book's benchmark, a series of targeted changes takes the simplifier from 6.6 seconds to about 0.05 seconds, roughly a 130-fold speedup. These figures describe that test and machine, not a universal guarantee.

Analysis

The sequence is more important than any individual trick: establish a working baseline, measure, then change the dominant cost while preserving correctness. This is a disciplined form of experimental science applied to software. The caution is that microbenchmarks can mislead when workloads change. A faster benchmark matters only if it represents the program's real use, and every optimization should be checked against the same behavioral tests.

Treat certainty factors as evidence weights, not as probabilities

Represent graded support. EMYCIN extends rule-based reasoning with certainty factors from -1 to +1, where positive values support a conclusion, negative values oppose it, and zero means unknown. It combines evidence from rules, caches derived facts, asks the user for missing data, and can explain which rule prompted a question.

Read the numbers cautiously. The combination formulas are practical conventions, not the laws of probability. In particular, evidence from separate rules is combined as if it can contribute independently, an assumption that can misstate confidence when sources overlap. The system is useful because it makes uncertainty explicit, but its scores should not be mistaken for calibrated chances.

Analysis

The strength of certainty factors is operational clarity: experts can attach graded support to rules without building a full probabilistic model. Their weakness is interpretive. A number that looks like a probability invites users to treat it as one, even when the combination assumptions differ. Any system that compresses uncertainty into a score should make its semantics and dependence assumptions visible.

Use classes to localize behavior, but verify that important state stays protected

Bundle state with actions. The account example first uses functions that operate on a shared structure, then recasts an account as an object that responds to messages such as deposit and withdraw. CLOS adds classes, methods, inheritance, and generic functions, allowing a limited-account to specialize withdrawal behavior while reusing account methods.

Inspect the boundary. CLOS methods are defined separately from class slots, which makes reuse flexible but can weaken information hiding. The audited-account example needs an accessor for its audit trail, and that accessor also lets outside code alter the record. A modular design is only protective when its interface controls access as intended.

Analysis

The chapter usefully resists treating object orientation as a synonym for good modularity. Inheritance and generic dispatch can make extensions local, while an exposed slot can still let callers violate an object's invariants. The broader lesson is to evaluate abstractions by the guarantees they enforce, not by their vocabulary. Reuse is valuable, but boundaries must be designed around the risks of the data they contain.

Separate sentence structure from meaning, preserving ambiguity until context can resolve it

Parse before interpreting. A grammar can identify that a phrase is a noun phrase or verb phrase, but one sentence may have several valid structures. The sentence about hitting a table with a ball can attach the prepositional phrase to the action or to the table, producing different parses.

Carry meaning through structure. In the CD-player example, semantic rules turn phrases into operations on track lists. More expressive unification grammars can also track agreement, relative-clause gaps, and quantifier scope. The grammar can preserve multiple readings rather than arbitrarily choosing one, after which a preference or contextual process can rank them.

Analysis

This distinction between syntax and semantics is a powerful diagnostic: a parser can be structurally correct yet leave the real communicative question unanswered. Preserving ambiguity is often more honest than forcing an early guess, but it shifts the burden to later interpretation. A robust language system therefore needs both a rich representation of alternatives and a principled way to use context without erasing meaningful uncertainty.

Analysis

The book's central contribution is not a single AI algorithm but a method for moving between representations. It begins with concrete programs, then repeatedly asks what a problem looks like in its own vocabulary: a grammar as data, a plan as states and operators, a mathematical expression as a canonical polynomial, or a sentence as a structure carrying semantic constraints. Lisp matters because its uniform syntax and runtime flexibility make these shifts cheap enough to explore.

That flexibility has a price. Interpreters and unification systems defer decisions, which accelerates experimentation but can hide errors until execution. The chapters on profiling and compilation make the response practical: first preserve a clear model, then measure where time goes, and specialize only the costly portions. This is a more durable lesson than allegiance to any one language or paradigm.

The historical systems also reveal a boundary between elegant generality and useful performance. GPS demonstrates a clean planning idea but collides with interacting goals and search complexity. Prolog makes constraints concise, yet its depth-first control can undermine the declarative reading. Certainty factors make expert knowledge usable, but they are not probabilities. These are not merely defects in old programs; they show that representation, inference, and control must be designed together.

The book's strongest modern relevance is therefore methodological. A system should expose its assumptions, preserve alternatives when evidence is incomplete, and make the cost of inference observable. Its historical examples do not establish that symbolic techniques solve every contemporary AI problem. They do establish that trustworthy systems require more than plausible outputs: they require inspectable representations, disciplined testing, and a clear account of how an answer was produced.

Summary in 30 Seconds
AI programs depend on how knowledge and problems are represented: rules can become data, plans can be built from goals, and equivalent expressions can be converted to a shared form. Search methods trade memory, speed, and completeness, while unification and backtracking need careful control. Fluent pattern matching does not establish understanding, and certainty scores are not probabilities. Measure bottlenecks: targeted changes cut one simplifier's runtime from 6.6 seconds to about 0.05.
Contains spoilers

Last updated:

Report Issue

Review Summary

4.33 out of 5
Average of 500+ ratings from Goodreads and Amazon.

Paradigms of Artificial Intelligence Programming receives mostly positive reviews, with an average rating of 4.33/5. Readers praise Norvig's clear writing and the book's comprehensive coverage of AI concepts using Lisp. Many find it an excellent resource for understanding AI programming principles, though some note its content is now dated. The book is lauded for its logical structure and clarity of reasoning. While some readers find it basic or outdated, others appreciate its historical significance and its value in teaching programming fundamentals.

Your rating:
4.64
99 ratings
Want to read the full book?

Glossary

means-ends analysis

Goal-directed planning

A problem-solving method that starts from a desired goal, identifies differences between the current state and that goal, and selects actions that reduce those differences. If an action has unmet preconditions, each precondition becomes a subgoal. GPS uses this method to plan, for example, how to get a child to school.

General Problem Solver (GPS)

Operator-based planner

A historical program by Newell and Simon that attempted to solve problems through a general means-ends strategy. Norvig's reconstruction represents actions as operators with preconditions and effects, then searches for a sequence that reaches a goal. Its failures reveal limits involving interacting goals, search, and incomplete problem descriptions.

data-driven programming

Data controls program behavior

A style in which data structures determine what a program does next. Instead of writing a separate function for every grammar rule, the programmer stores rules as data and writes a general interpreter to process them. Adding or changing knowledge can then require changing the data rather than the engine.

ELIZA

Pattern-based dialogue program

Joseph Weizenbaum's program simulates a nondirective psychotherapist by matching input against linguistic patterns and transforming matched phrases into replies. Its conversational effect can be compelling, but its responses do not demonstrate deep understanding. Norvig uses it to teach pattern matching and to expose the gap between fluent output and interpretation.

STUDENT

Algebra word-problem solver

Daniel Bobrow's program translates a limited class of English algebra problems into equations and solves them symbolically. It uses pattern-based rules to identify phrases such as quantities, percentages, and relationships. Its success depends on narrow linguistic and mathematical assumptions, including how variables are named and whether equations are solvable by its routines.

unification

Make structures agree

A procedure that finds bindings making two expressions identical. Unlike ordinary pattern matching, it can compare expressions that both contain variables, binding variables to other variables or structures. Prolog uses unification to connect facts, rules, and queries. An occurs check prevents a variable from being bound to a structure containing itself.

backward chaining

Reason from goals to premises

An inference strategy that begins with a goal and searches for rules whose conclusions could establish it. Each rule's premises become subgoals. Prolog uses backward chaining with depth-first search and backtracking. The strategy is concise, but can loop or miss answers when the search order encounters an infinite branch.

definite clause grammar

Grammar written as logic rules

A grammar formalism that expresses grammatical categories as Prolog-style clauses. Difference-list arguments track the input words consumed by each constituent, so parsing can be performed through unification and backward chaining. Additional arguments can carry agreement features, semantic interpretations, and information about gaps in relative clauses.

memoization

Cache function results

A technique that stores the result of a function call and reuses it when the same input occurs again. Norvig demonstrates it with recursive Fibonacci computation and later with parsing and symbolic simplification. Memoization can turn repeated work into a lookup, though storage and key design affect whether it helps.

canonical form

Standard representation of equivalents

A selected internal representation in which equivalent expressions are normalized to the same structure. Norvig's polynomial system orders variables and stores coefficients in vectors, allowing sums with different orderings to converge on one representation. A canonical form simplifies comparison but is practical only for a chosen mathematical domain.

certainty factors

Graded rule support

EMYCIN's numerical values for the support or opposition a rule provides to a conclusion, ranging from -1 to +1. Positive values support a claim, negative values oppose it, and zero represents unknown. The system combines factors using prescribed formulas, but these values are not probabilities and rely on simplifying assumptions.

Common Lisp Object System (CLOS)

Common Lisp's object system

A Common Lisp facility for defining classes, instances, generic functions, and methods. Methods can specialize on argument classes, and classes can inherit from one or more superclasses. CLOS supports flexible method combination and reuse, but its separation of methods from slots can make strict information hiding difficult.

alpha-beta

Prune irrelevant game branches

An optimization of minimax search for two-player games. It tracks bounds on the best value each player can force and stops exploring a branch once that branch cannot change the final choice. With correct bounds, alpha-beta returns the same move as full minimax while often evaluating far fewer positions.

possible worlds

Alternative assumed situations

A representation technique for reasoning about different possible states of affairs. A new world can inherit facts from an existing one while adding alternative assumptions. This permits reasoning by cases, such as considering both possible outcomes of an uncertain classification, though practical systems must manage inheritance and search across worlds.

About the Author

Peter Norvig is a renowned computer scientist and artificial intelligence expert. He is best known for his work in AI, natural language processing, and machine learning. Norvig has authored several influential books on programming and AI, including "Artificial Intelligence: A Modern Approach." He has held prominent positions at Google, serving as Director of Research, and has been a key figure in developing search algorithms and other AI technologies. Norvig's contributions to the field of AI have been significant, and he is widely respected for his ability to explain complex concepts in accessible ways.

Download PDF

To save this Paradigms of Artificial Intelligence Programming summary for later, download the free PDF. You can print it out, or read offline at your convenience.
Download PDF
File size: 0.35 MB     Pages: 19

Download EPUB

To read this Paradigms of Artificial Intelligence Programming summary on your e-reader device or app, download the free EPUB. The .epub digital book format is ideal for reading ebooks on phones, tablets, and e-readers.
Download EPUB
File size: 1.41 MB     Pages: 20
Want to read the full book?
Follow
Listen
Home
Swipe
Library
Get App
Try Full Access for 3 Days
Listen, bookmark, and more
Compare Features Free Pro
📖 Read Summaries
Read unlimited summaries. Free users get 3 per month
🎧 Listen to Summaries
Listen to unlimited summaries in 40 languages
—
❤️ Unlimited Bookmarks
Free users are limited to 4
—
📜 Unlimited History
Free users are limited to 4
—
📥 Unlimited Downloads
Free users are limited to 1
—
Risk-Free Timeline
Today: Get Instant Access
Listen to full summaries of 26,000+ books. That's 12,000+ hours of audio!
Day 2: Trial Reminder
We'll send you a notification that your trial is ending soon.
Day 3: Your subscription begins
You'll be charged on Nov 25,
cancel anytime before.
Consume 2.8× More Books
2.8× more books Listening Reading
Our users love us
1M+ readers
Trustpilot Rating
TrustPilot
4.6 Excellent
This site is a total game-changer. I've been flying through book summaries like never before. Highly, highly recommend.
— Dave G
Worth my money and time, and really well made. I've never seen this quality of summaries on other websites. Very helpful!
— Em
Highly recommended!! Fantastic service. Perfect for those that want a little more than a teaser but not all the intricate details of a full audio book.
— Greg M
Save 62%
Yearly
$119.88 $44.99/year/yr
$3.75/mo
Monthly
$9.99/mo
Start a 3-Day Free Trial
3 days free, then $44.99/year. Cancel anytime.
Unlock a world of fiction & nonfiction books
26,000+ books for the price of 2 books
Read any book in 10 minutes
Discover new books like Tinder
Request any book if it's not summarized
Read more books than anyone you know
#1 app for book lovers
Lifelike & immersive summaries
30-day money-back guarantee
Download summaries in EPUBs or PDFs
Cancel anytime in a few clicks

Why one summary?

Scanner
Find a barcode to scan

⭐
⭐
⭐
We have a special gift for you
Open
38% off
DISCOUNT FOR YOU
⭐
⭐
⭐
$79.99
$49.99/year
Only $4.16 per month
Continue
2 taps to start, super easy to cancel
Settings
General
Widget
Loading...