HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
norvig
paip-lisp
Common Lisp2018–2026
norvig / paip-lisp

paip-lisp

Lisp code for the textbook "Paradigms of Artificial Intelligence Programming"

63Distinct people
102Mentions
6Explicit recommenders
7.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Lisp code for the textbook "Paradigms of Artificial Intelligence Programming"

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

This is the Logic Theorist: https://en.wikipedia.org/wiki/Logic_Theorist I love Simon's anecdote of using his wife and children as the stack as he developed IPS. This…

kjander79 used a recommendation phrase. 6 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 9:01:12 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year102 dated mentions

Observed mentions: 2018-02-26 21:33:21 UTC to 2026-04-19 12:10:13 UTC.

051015202018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 11 mentions; 3 submissions, 8 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 14 mentions; 3 submissions, 11 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 15 mentions; 0 submissions, 15 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 15 mentions; 2 submissions, 13 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 19 mentions; 1 submissions, 18 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC1138
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC14311
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC11110
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC15015
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC15213
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC707
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC19118
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC808
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

From the project README

An excerpt from the repository, fetched Nov 12, 2026.

Read the project’s introduction
This is an open-source repository for the book Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp by Peter Norvig (1992), and the code contained therein. The copyright has reverted to the author, who has shared it here under MIT license. On the list of most influential books for programmers. As seen on TV. See also: errata, comments, retrospective. The book is available in these formats: we're generating ebooks - epub and pdf - from the markdown files, see Releases scanned pdfs 4th edition, 1998: higher resolution, better OCR, smaller file thanks to better compression 6th edition, 2001: newer printing text: PAIP.txt (from OCR'ing the scanned pdf, containing many errors) a source epub: see releases for a cleaned up version downloaded from Safari (much cleaner than the scanned versions) and chapter?.md markdown files: Table of Contents Paradigms of Artificial Intelligence Programming Front matter Preface Part I: Introduction to Common Lisp 1 Introduction to Lisp 2 A Simple Lisp Program 3 Overview of Lisp Part II: Early AI Programs 4 GPS: The General problem Solver 5 Eliza: Dialog with a Machine 6 Building Software Tools 7 Student: Solving Algebra Word Problems 8 Symbolic Mathematics: A Simplification Program Part III: Tools and Techniques 9 Efficiency Issues 10 Low-Level Efficiency Issues 11 Logic Programming 12 Compiling Logic programs 13 Object-Oriented Programming 14 Knowledge Representation and Reasoning Part IV: Advanced AI Programs 15 Symbolic Mathematics with Canonical Forms 16 Expert Systems 17 Line-Diagram Labeling by Constraint Satisfaction 18 Search and the Game of Othello 19 Introduction to Natural Language 20 Unification Grammars 21 A Grammar of English Part V: The Rest of Lisp 22 Scheme: An Uncommon Lisp 23 Compiling Lisp 24 ANSI Common Lisp 25 Troubleshooting The Lisp Files The Lisp code files are listed here: CH Filename Description - examples.lisp A list of example inputs taken from the book - tutor.lisp An interpreter for running the examples - auxfns.lisp Auxiliary functions; load this before anything else 1 intro.lisp A few simple definitions 2 simple.lisp Random sentence generator (two versions) 3 overview.lisp 14 versions of LENGTH and other examples 4 gps1.lisp Simple version of General Problem Solver 4 gps.lisp Final version of General Problem Solver 5 eliza1.lisp Basic version of Eliza program 5 eliza.lisp Eliza with more rules; different reader 6 patmatch.lisp Pattern Matching Utility 6 eliza-pm.lisp Version of Eliza using utilities 6 search.lisp Search Utility 6 gps-srch.lisp Version of GPS using the search utility 7 student.lisp The Student Program 8 macsyma.lisp The Macsyma Program 8 macsymar.lisp Simplification and integration rules for Macsyma 9-10 auxfns.lisp Auxiliary functions 11 unify.lisp Unification functions 11 prolog1.lisp First version of Prolog interpreter 11 prolog.lisp Final version of Prolog interpreter 12 prologc1.lisp First version of Prolog compiler 12 prologc2.lisp Second version of Prolog compiler 12 prologc.lisp Final version of Prolog compiler 12 prologcp.lisp Primitives for Prolog compiler 13 clos.lisp Some object-oriented and CLOS code 14 krep1.lisp Knowledge Representation code: first version 14 krep2.lisp Knowledge Representation code with conjunctions 14 krep.lisp Final KR code: worlds and attached functions 15 cmacsyma.lisp Efficient Macsyma with canonical form 16 mycin.lisp The Emycin expert system shell 16 mycin-r.lisp Some rules for a medical application of emycin 17 waltz.lisp A Line-Labeling program using the Waltz algorithm 18 othello.lisp The Othello playing program and some strategies 18 othello2.lisp Additional strategies for Othello 18 edge-tab.lisp Edge table for Iago strategy 19 syntax1.lisp Syntactic Parser 19 syntax2.lisp Syntactic Parser with semantics 19 syntax3.lisp Syntactic Parser with semantics and preferences 20 unifgram.lisp Unification Parser 21 grammar.lisp Comprehensive grammar of English 21 lexicon.lisp Sample Lexicon of English 22 interp1.lisp Scheme interpreter, including version with macros 22 interp2.lisp A tail recursive Scheme interpreter 22 interp3.lisp A Scheme interpreter that handles call/cc 23 compile1.lisp Simple Scheme compiler 23 compile2.lisp Compiler with tail recursion and primitives 23 compile3.lisp Compiler with peephole optimizer 23 compopt.lisp Peephole optimizers for compile3.lisp Running the Code There is no single "application" to run. Rather, there is a collection of source code files, duplicating the code in the book. You can read and/or run whatever you like. Lisp is an interactive language, and you will need to interact with the code to get benefit from it. Some hints: You will need a Common Lisp interpreter/compiler/environment. Here's a discussion of the options. You will always need (load "auxfns.lisp"). You will need (requires "file"), for the various instances of file that you want to use. (If requires does not work properly on your system you may have to alter its definition, in auxfns.lisp. The function do-examples, which takes as an argument either :all or a chapter number or a list of chapter numbers, can be used to see examples of the use of various functions. For example, (do-examples 1) shows the examples from chapter 1. Access this by doing (requires "examples"). Other resources I wrote a retrospective on the book in 2002. There is a nice Python version of the code, by Daniel Connelly at Georgia Tech, supervised by Ashok Goel.
Read the full README on GitHub

What Hacker News says

11 sources
Thanks for this guide, I'll keep referring to it often. My current road to Common Lisp is working through Peter Norvig's book Paradigms of Artificial Intelligence Programming [0]. It's not a direct route to the kind of programming most people do nowadays, but I hope to at least get a taste of what it was to be a researcher in classical AI. [0] https://github.com/norvig/paip-lisp
In A Road to Common Lisp
I think of full-featured pattern matching as a fairly recent addition even to Lisp. Lisp has had some pattern-matching constructs forever of course (cond, destructuring-bind, Norvig's sexp matcher from PAIP [1], etc.). But it's only with the more recent emergence of optima [2] as a de-facto standard that it now has really good pattern matching. It was probably the #1 thing I missed in Lisp, after having used ML a bit, until optima came along. [1] https://github.com/norvig/paip-lisp/blob/master/lisp/patmatc... [2] https://github.com/m2ym/optima
In JavaScript Pattern Matching Proposal
Use Practical Common Lisp [0] as the book to start learning Lisp, Common Lisp is the more production version lisp. Download LispWorks Personal Edition [1], if you want to start working with an IDE setup. Use it when working through PCL. LW also has GUI library, mobile runtimes and other libraries available from QuickLisp [2], CL's package manager to install various libraries. After working through PCL, you will have a good CL foundation. You can expand your macro (pun unintended) knowledge by working through [3]. Other good resources: PAIP and Land of Lisp. Note about PAIP is more a specific application of CL to solve classical AI Problems, despite that it is still counted as among the best programming books out there. Hope this helps and `Welcome to the Dark Side`. PS: Except `Land of Lisp` cited in the resources, everything is free. [0]
Read the rest
In Ask HN: What is the best way to get started with practical LISP?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.