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 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 6:28:55 AM 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

2 sources
Yep, and after that I'd jump into PAIP, Paradigms of AI Programming. Code: https://github.com/norvig/paip-lisp The EPUB looks broken in my machine, try the PDF: https://commons.wikimedia.org/wiki/File:Peter_Norvig._Paradi... Altough Scheme and CL are different paths. CL's loop it's really, really complex and Scheme it's pretty much straightforward to understand. Any advanced CL user will have to implement Scheme's syntax (and an interpreter) as an exercise for PAIP. CL in CL... well, CL is too huge, T3X tried with Kilo Lisp 23 http://t3x.org/klisp/22/index.html and I doubt if anyone can even complete anything but the few starting chapters from Intro to Common Lisp with it.
In The seven programming ur-languages (2022)
This is a nice and unexpected release, thanks for writing it. Getting a RPG endorsement is great. I just finished reading his foreword and skimming the table of contents and bibliography from the preview. I'd have liked to see a sample of a middle chapter to really see how technical and deep it gets (e.g. Land of Lisp gives its chapter 8 as a sample which I think is very representative for that book). But I plan to get this book regardless -- just not right now. The back blurb hints that expert systems might be mentioned, but how much? No one ever seems to go much into their implementation or usage.[0] It also mentions writing some JS, which I guess is part of chapter 5, I wonder if that was a publisher request. (My favorite take on that subject in recent years is https://github.com/jart/sectorlisp) Would it be fair to say this is mainly
Read the rest
a history told through the lens of AI and PL research? Amusingly I think part of me is already setting myself up for some disappointment -- it seems too short with too few references! But it's good to have a Lisp history book like this looks to be and I'm sure I'll learn things from it, and the promise of more RPG writings inside is enticing. Besides, any complete telling would take multiple books. (There's so much of historical interest locked up in proprietary applications and companies with their own histories, and so many papers published, there's also so much that can be dug through in the standardization mailing list (and other lists, like emacs) archives[1], the SAIL archives[2], the Xerox PARC archives[3], the CMU archives[4], and the many undigitized things sitting in boxes at the computer history museum...[5]) [0] Norvig's PAIP gives a small taste, one of the files: https://github.com/norvig/paip-lisp/blob/main/lisp/mycin-r.l... And a book about a particular system, MYCIN: https://www.shortliffe.net/Buchanan-Shortliffe-1984/MYCIN%20... And a short video: https://youtube.com/watch?v=a65uwr_O7mM [1] http://ml.cddddr.org/ and http://cl-su-ai.lisp.se/ [2] https://www.saildart.org/ [3] The url I had before is down... I made a local copy but https://archive.org/details/2014.01.ftp.parc.xerox.com might be the same content [4] https://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/... [5] Even in the earliest Lisp reports like https://www.researchgate.net/publication/42766480_Artificial... there are interesting things mentioned like a two-move checkmate program or "Other projects on which work continues include the Advice Taker, visual pattern recognition, and an artificial hand." Multiple times I've tried to track down those sorts of things mentioned in really old papers only to hit dead-ends on so many of them. Sometimes things were embellished, or were abandoned, or were just lost to time, and sometimes there's an undigitized box at the museum that might contain printouts etc. (There might be MYCIN source code, even.)
In Show HN: I wrote a technical history book on 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.