aimacode/aima-lisp
About
Common Lisp implementations of the algorithms of Russell and Norvig's "Artificial Intelligence: A Modern Approach"
AI & Machine LearningMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalaima-lisp

Common Lisp code for the book Artificial Intelligence: A Modern Approach.
This was the original code base of the book (1995), written for its earlier editions (the last version is from 2002); the algorithms of the 4th edition have since been added next to the original code.
Installation
Clone the repository where ASDF looks for systems (e.g., ~/common-lisp/), or register aima.asd by hand, then load the system aima and run its tests; with SBCL:
git clone --recurse-submodules https://github.com/aimacode/aima-lisp.git
cd aima-lisp
sbcl --non-interactive \
--eval '(require "asdf")' \
--eval '(asdf:load-asd (truename "aima.asd"))' \
--eval '(asdf:test-system "aima")'
(asdf:load-system "aima") loads every subsystem into CL-USER. Without ASDF, (load "aima.lisp") followed by (aima-load 'all) does the same, (aima-load 'search) loads a single subsystem, and (test 'all) runs the test examples. The user guide and the overview document the code.
Index of algorithms
The table has one row per algorithm, in the order of the book, and the same rows in all the aimacode repositories. The column Figure gives the figure of the 4th edition or, followed by "(3e)", the one of the 3rd edition when the pseudocode of the algorithm is only there; § gives the section of the 4th edition of an algorithm described in the text, and — marks an algorithm that is not in the book. The names link to the pseudocode in aima-pseudocode.
Data structures
Exercises
This table lists the exercises of aima-exercises whose answer a program can check, with the same tests in all the repositories; the chapters are those of the 3rd edition, as on that site.
Other code in this repository
| Name | Code | Tests |
|---|---|---|
| FOL KB queried by resolution | fol-kb |
test-logic.lisp |
| Shopping world | shopping-world |
test-logic.lisp |
| Q-iteration | q-iteration |
test-learning.lisp |
| Missionaries and cannibals | cannibal-problem |
test-search.lisp |
| Path planning among polygonal obstacles | make-path-planning-problem |
test-search.lisp |
| Binary search trees | create-sorted-tree |
test-utilities.lisp |
Contributing
See CONTRIBUTING.md.
Authors
In order of the lines they wrote in the current files: Donato Meoli, Peter Norvig; see also all the contributors.
Other aimacode projects
aima-python · aima-java · aima-csharp · aima-scala · aima-julia · aima-javascript · aima-pseudocode · aima-exercises · aima-data · aima-glossary
Explore related projects
Loading…