{"id":13442816,"url":"https://github.com/norvig/paip-lisp","last_synced_at":"2026-01-30T07:04:12.453Z","repository":{"id":37547755,"uuid":"120367500","full_name":"norvig/paip-lisp","owner":"norvig","description":"Lisp code for the textbook \"Paradigms of Artificial Intelligence Programming\"","archived":false,"fork":false,"pushed_at":"2024-10-15T03:26:54.000Z","size":76497,"stargazers_count":7408,"open_issues_count":35,"forks_count":719,"subscribers_count":237,"default_branch":"main","last_synced_at":"2026-01-04T22:32:09.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/norvig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-05T22:02:34.000Z","updated_at":"2026-01-04T14:09:02.000Z","dependencies_parsed_at":"2023-02-09T16:45:57.226Z","dependency_job_id":"fe58bbc5-6a0b-41d8-b760-ebf7e5b78d26","html_url":"https://github.com/norvig/paip-lisp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/norvig/paip-lisp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norvig%2Fpaip-lisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norvig%2Fpaip-lisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norvig%2Fpaip-lisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norvig%2Fpaip-lisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norvig","download_url":"https://codeload.github.com/norvig/paip-lisp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norvig%2Fpaip-lisp/sbom","scorecard":{"id":694593,"data":{"date":"2025-08-11","repo":{"name":"github.com/norvig/paip-lisp","commit":"9cea73837e439d331fe78d7b585e994c7113aac2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":9,"reason":"Found 9/10 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.3 not signed: https://api.github.com/repos/norvig/paip-lisp/releases/68688350","Warn: release artifact v2.0 not signed: https://api.github.com/repos/norvig/paip-lisp/releases/64043150","Warn: release artifact v1.2 not signed: https://api.github.com/repos/norvig/paip-lisp/releases/61455954","Warn: release artifact 1.1 not signed: https://api.github.com/repos/norvig/paip-lisp/releases/19369204","Warn: release artifact v1.0 not signed: https://api.github.com/repos/norvig/paip-lisp/releases/18907336","Warn: release artifact v1.3 does not have provenance: https://api.github.com/repos/norvig/paip-lisp/releases/68688350","Warn: release artifact v2.0 does not have provenance: https://api.github.com/repos/norvig/paip-lisp/releases/64043150","Warn: release artifact v1.2 does not have provenance: https://api.github.com/repos/norvig/paip-lisp/releases/61455954","Warn: release artifact 1.1 does not have provenance: https://api.github.com/repos/norvig/paip-lisp/releases/19369204","Warn: release artifact v1.0 does not have provenance: https://api.github.com/repos/norvig/paip-lisp/releases/18907336"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T03:18:14.654Z","repository_id":37547755,"created_at":"2025-08-22T03:18:14.654Z","updated_at":"2025-08-22T03:18:14.654Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28813223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:51.558Z","updated_at":"2026-01-30T07:04:12.419Z","avatar_url":"https://github.com/norvig.png","language":"Common Lisp","funding_links":[],"categories":["Common Lisp","A01_机器学习教程","Programming","Angular","Online Books","Offline ##"],"sub_categories":[],"readme":"\n\u003cimg src=\"paip-cover.png\" title=\"Paradigms of Artificial Intelligence Programming\" width=413\u003e\n\nThis is an open-source repository for the book *Paradigms of Artificial\nIntelligence 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](https://github.com/cs-books/influential-cs-books). As seen on [TV](https://norvig.com/paip-tv.html). See also: [errata](https://norvig.com/paip-errata.html), [comments](https://norvig.com/paip-comments.html),  [retrospective](https://norvig.com/Lisp-retro.html).\n\nThe book is available in these formats:\n\n* we're generating ebooks - epub and pdf - from the markdown files, see [Releases](https://github.com/norvig/paip-lisp/releases)\n* [scanned pdfs](https://github.com/norvig/paip-lisp/releases/tag/v1.3)\n  * 4th edition, 1998: higher resolution, better OCR, smaller file thanks to better compression\n  * 6th edition, 2001: newer printing\n* text: [PAIP.txt](https://github.com/norvig/paip-lisp/blob/master/PAIP.txt) (from OCR'ing the scanned pdf, containing many errors)\n* a source epub: [see releases](https://github.com/norvig/paip-lisp/releases/tag/1.1) for a cleaned up version downloaded from Safari (much cleaner than the scanned versions)\n* and `chapter?.md` markdown files:\n\n# Table of Contents\n\n- **Paradigms of Artificial Intelligence Programming**\n  * [Front matter](docs/frontmatter.md)\n  * [Preface](docs/preface.md)\n- **Part I:  Introduction to Common Lisp**\n  * 1  [Introduction to Lisp](docs/chapter1.md)\n  * 2  [A Simple Lisp Program](docs/chapter2.md)\n  * 3 [Overview of Lisp](docs/chapter3.md)\n- **Part II: Early AI Programs**\n  * 4  [GPS:  The General problem Solver](docs/chapter4.md)\n  * 5  [Eliza:  Dialog with a Machine](docs/chapter5.md)\n  * 6  [Building Software Tools](docs/chapter6.md)\n  * 7 [Student:  Solving Algebra Word Problems](docs/chapter7.md)\n  * 8 [Symbolic Mathematics:  A Simplification Program](docs/chapter8.md)\n- **Part III:  Tools and Techniques**\n  * 9  [Efficiency Issues](docs/chapter9.md)\n  * 10  [Low-Level Efficiency Issues](docs/chapter10.md)\n  * 11  [Logic Programming](docs/chapter11.md)\n  * 12  [Compiling Logic programs](docs/chapter12.md)\n  * 13  [Object-Oriented Programming](docs/chapter13.md)\n  * 14  [Knowledge Representation and Reasoning](docs/chapter14.md)\n- **Part IV:  Advanced AI Programs**\n  * 15  [Symbolic Mathematics with Canonical Forms](docs/chapter15.md)\n  * 16  [Expert Systems](docs/chapter16.md)\n  * 17  [Line-Diagram Labeling by Constraint Satisfaction](docs/chapter17.md)\n  * 18  [Search and the Game of Othello](docs/chapter18.md)\n  * 19  [Introduction to Natural Language](docs/chapter19.md)\n  * 20  [Unification Grammars](docs/chapter20.md)\n  * 21  [A Grammar of English](docs/chapter21.md)\n- **Part V:  The Rest of Lisp**\n  * 22  [Scheme:  An Uncommon Lisp](docs/chapter22.md)\n  * 23  [Compiling Lisp](docs/chapter23.md)\n  * 24  [ANSI Common Lisp](docs/chapter24.md)\n  * 25  [Troubleshooting](docs/chapter25.md)\n\n## The Lisp Files\n\nThe [Lisp code files](https://github.com/norvig/paip-lisp/tree/master/lisp) are listed here:\n\n| CH   | Filename                            | Description                                                            |\n|------|-------------------------------------|------------------------------------------------------------------------|\n| -    | [examples.lisp](lisp/examples.lisp) | A list of example inputs taken from the book                           |\n| -    | [tutor.lisp](lisp/tutor.lisp)       | An interpreter for running the examples                                |\n| -    | [auxfns.lisp](lisp/auxfns.lisp)     | Auxiliary functions; load this before anything else                    |\n| 1    | [intro.lisp](lisp/intro.lisp)       | A few simple definitions                                               |\n| 2    | [simple.lisp](lisp/simple.lisp)     | Random sentence generator (two versions)                               |\n| 3    | [overview.lisp](lisp/overview.lisp) | 14 versions of LENGTH and other examples                               |\n| 4    | [gps1.lisp](lisp/gps1.lisp)         | Simple version of General Problem Solver                               |\n| 4    | [gps.lisp](lisp/gps.lisp)           | Final version of General Problem Solver                                |\n| 5    | [eliza1.lisp](lisp/eliza1.lisp)     | Basic version of Eliza program                                         |\n| 5    | [eliza.lisp](lisp/eliza.lisp)       | Eliza with more rules; different reader                                |\n| 6    | [patmatch.lisp](lisp/patmatch.lisp) | Pattern Matching Utility                                               |\n| 6    | [eliza-pm.lisp](lisp/eliza-pm.lisp) | Version of Eliza using utilities                                       |\n| 6    | [search.lisp](lisp/search.lisp)     | Search Utility                                                         |\n| 6    | [gps-srch.lisp](lisp/gps-srch.lisp) | Version of GPS using the search utility                                |\n| 7    | [student.lisp](lisp/student.lisp)   | The Student Program                                                    |\n| 8    | [macsyma.lisp](lisp/macsyma.lisp)   | The Macsyma Program                                                    |\n| 8    | [macsymar.lisp](lisp/macsymar.lisp) | Simplification and integration rules for Macsyma                       |\n| 9-10 | [auxfns.lisp](lisp/auxfns.lisp)     | Auxiliary functions                                                    |\n| 11   | [unify.lisp](lisp/unify.lisp)       | Unification functions                                                  |\n| 11   | [prolog1.lisp](lisp/prolog1.lisp)   | First version of Prolog interpreter                                    |\n| 11   | [prolog.lisp](lisp/prolog.lisp)     | Final version of Prolog interpreter                                    |\n| 12   | [prologc1.lisp](lisp/prologc1.lisp) | First version of Prolog compiler                                       |\n| 12   | [prologc2.lisp](lisp/prologc2.lisp) | Second version of Prolog compiler                                      |\n| 12   | [prologc.lisp](lisp/prologc.lisp)   | Final version of Prolog compiler                                       |\n| 12   | [prologcp.lisp](lisp/prologcp.lisp) | Primitives for Prolog compiler                                         |\n| 13   | [clos.lisp](lisp/clos.lisp)         | Some object-oriented and CLOS code                                     |\n| 14   | [krep1.lisp](lisp/krep1.lisp)       | Knowledge Representation code: first version                           |\n| 14   | [krep2.lisp](lisp/krep2.lisp)       | Knowledge Representation code with conjunctions                        |\n| 14   | [krep.lisp](lisp/krep.lisp)         | Final KR code: worlds and attached functions                           |\n| 15   | [cmacsyma.lisp](lisp/cmacsyma.lisp) | Efficient Macsyma with canonical form                                  |\n| 16   | [mycin.lisp](lisp/mycin.lisp)       | The Emycin expert system shell                                         |\n| 16   | [mycin-r.lisp](lisp/mycin-r.lisp)   | Some rules for a medical application of emycin                         |\n| 17   | [waltz.lisp](lisp/waltz.lisp)       | A Line-Labeling program using the Waltz algorithm                      |\n| 18   | [othello.lisp](lisp/othello.lisp)   | The Othello playing program and some strategies                        |\n| 18   | [othello2.lisp](lisp/othello2.lisp) | Additional strategies for Othello                                      |\n| 18   | [edge-tab.lisp](lisp/edge-tab.lisp) | Edge table for Iago strategy                                           |\n| 19   | [syntax1.lisp](lisp/syntax1.lisp)   | Syntactic Parser                                                       |\n| 19   | [syntax2.lisp](lisp/syntax2.lisp)   | Syntactic Parser with semantics                                        |\n| 19   | [syntax3.lisp](lisp/syntax3.lisp)   | Syntactic Parser with semantics and preferences                        |\n| 20   | [unifgram.lisp](lisp/unifgram.lisp) | Unification Parser                                                     |\n| 21   | [grammar.lisp](lisp/grammar.lisp)   | Comprehensive grammar of English                                       |\n| 21   | [lexicon.lisp](lisp/lexicon.lisp)   | Sample Lexicon of English                                              |\n| 22   | [interp1.lisp](lisp/interp1.lisp)   | Scheme interpreter, including version with macros                      |\n| 22   | [interp2.lisp](lisp/interp2.lisp)   | A tail recursive Scheme interpreter                                    |\n| 22   | [interp3.lisp](lisp/interp3.lisp)   | A Scheme interpreter that handles call/cc                              |\n| 23   | [compile1.lisp](lisp/compile1.lisp) | Simple Scheme compiler                                                 |\n| 23   | [compile2.lisp](lisp/compile2.lisp) | Compiler with tail recursion and primitives                            |\n| 23   | [compile3.lisp](lisp/compile3.lisp) | Compiler with peephole optimizer                                       |\n| 23   | [compopt.lisp](lisp/compopt.lisp)   | Peephole optimizers for compile3.lisp                                  |\n\n# Running the Code\n\nThere is no single \"application\" to run. Rather, there is a collection of source code files,\nduplicating the code in the book. You can read and/or run whatever you like. Lisp is an interactive language,\nand you will need to interact with the code to get benefit from it. Some hints:\n\n* You will need a Common Lisp interpreter/compiler/environment. Here's a [discussion](https://www.reddit.com/r/lisp/comments/752wxe/what_is_the_best_common_lisp_interpreter_out_there/) of the options.\n* You will always need `(load \"auxfns.lisp\")`.\n* You will need `(requires \"`*file*`\")`, for the various\ninstances of *file* that you want to use. (If `requires` does not work properly on\nyour system you may have to alter its definition, in \n`auxfns.lisp`.  \n* The function `do-examples`, which takes as an argument either `:all`\nor a chapter number or a list of chapter numbers, can be used to see examples\nof the use of various functions.  For example, `(do-examples 1)` shows\nthe examples from chapter 1. Access this by doing `(requires \"examples\")`.\n\n# Other resources\n\n* I wrote a [retrospective](http://norvig.com/Lisp-retro.html) on the book in 2002.\n* There is a nice [Python version](https://github.com/dhconnelly/paip-python) of the code, by Daniel Connelly at Georgia Tech, supervised by Ashok Goel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorvig%2Fpaip-lisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorvig%2Fpaip-lisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorvig%2Fpaip-lisp/lists"}