Python implementations of some of the classic AI programs from Peter Norvig's fantastic textbook "Paradigms of Artificial Intelligence Programming."
This is meant to be a learning resource for beginning AI programmers. Although PAIP is a fantastic book, it is no longer common for students to have a background in Lisp programming, as many universities have replaced Lisp with other languages in introductory programming and introductory artificial intelligence courses. It is my hope that making the programs from PAIP available in a commonly-taught language will provide a useful hands-on resource for beginning AI students.
The following programs are available, each with annotated source:
- General Problem Solver, means-ends analysis problem solving
- Eliza, a pattern-matching psychiatrist
- Search, a collection of search algorithms
- Logic, a library for logic programming
- Prolog, a basic Prolog interpreter
- Emycin, an expert system shell
- Othello, some game-playing strategies for the Othello board game
Unit tests and some example applications are provided for each of these; see the
paip/examples directories or the links from the annotated
Also make sure you have Python 2.7.
- To run the examples:
python run_examples.pyand follow the prompts.
- To run the Prolog interpreter:
./prolog.py. Pass the
-hflag for more details on its use and capabilities.
- To run the unit tests:
- To build the documentation:
- fork on GitHub
- write code in
- add unit tests in
- make sure all tests pass:
- send me a pull request