← all repositories
aimacode/aima-python

The AIMA algorithms, ready to leave the textbook

It turns the pseudocode in Russell and Norvig's standard AI textbook into working Python you can execute, test, and break.

★8.8k stars Jupyter Notebook LearningML Frameworks
aima-python
Not currently ranked — collecting fresh signals.
star history

What it does

aima-python is the companion code for Artificial Intelligence: A Modern Approach, the Russell and Norvig textbook. It implements the book’s pseudocode algorithms in Python 3.7+, covering search, games, constraint satisfaction, logic, and planning. Each topic gets a module with runnable implementations, explanatory Jupyter notebooks, and lightweight tests.

The interesting bit

The project updated for the book’s 4th edition by inverting the usual code-notebook relationship: the .py files are auto-generated from Jupyter notebooks, which serve as the primary documentation. It also modernized the codebase with type hints, dataclasses, and f-strings.

Key highlights

  • Broad coverage of classical AI: A*, minimax, alpha-beta, CSP solvers, propositional and first-order logic, SATPlan, and more.
  • Notebooks are the source of truth; readable .py files are generated from them.
  • Uses modern Python 3.7 features like type hints, dataclasses, and f-strings.
  • Includes a public algorithm index tracking implementation status, tests, and notebook coverage.
  • Runs in a browser via Binder without local setup.

Caveats

  • The algorithm index is still being updated for the 4th edition, and some entries—such as HybridWumpusAgent—lack any implementation, tests, or notebooks.
  • Datasets live in a separate aima-data submodule that the README warns can take a while to fetch.
  • Algorithms marked with an asterisk are noted as “not fully implemented.”

Verdict

Students and self-learners working through AIMA will find this indispensable; if you aren’t following the book or an AI course, it’s well-organized reference material you can largely find in dedicated libraries.

Frequently asked

What is aimacode/aima-python?
It turns the pseudocode in Russell and Norvig's standard AI textbook into working Python you can execute, test, and break.
Is aima-python open source?
Yes — aimacode/aima-python is open source, released under the MIT license.
What language is aima-python written in?
aimacode/aima-python is primarily written in Jupyter Notebook.
How popular is aima-python?
aimacode/aima-python has 8.8k stars on GitHub.
Where can I find aima-python?
aimacode/aima-python is on GitHub at https://github.com/aimacode/aima-python.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.