gitmyhub

aima-python

Jupyter Notebook ★ 8.8k updated 1mo ago

Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"

Python implementations of every algorithm from the Artificial Intelligence: A Modern Approach textbook, with interactive Jupyter notebooks so students can run and explore each concept hands-on.

PythonJupyter Notebookpytestsetup: easycomplexity 2/5

This repository contains Python code that goes alongside the textbook "Artificial Intelligence: A Modern Approach" by Stuart Russell and Peter Norvig, which is one of the most widely used university textbooks on AI. The repository provides working Python implementations of the algorithms described in the book, so that students and self-learners can read the pseudocode in the text and then run actual code to see how each algorithm behaves.

The project is organized by topic, mirroring the chapters of the book. For topics like search, planning, logic, learning, and probabilistic reasoning, there are corresponding Python files and Jupyter notebooks. Jupyter notebooks are interactive documents that mix explanatory text, code, and output in one place, making them well suited for learning. The notebooks let you run code examples step by step and see the results immediately without setting up a full programming environment.

The code targets Python 3.7 and later versions and does not support Python 2. Setup involves cloning the repository, installing dependencies via pip, and pulling in a companion dataset repository. A test suite is included and can be run using a tool called pytest to verify that the implementations are working correctly.

The README includes a large index table listing every algorithm from the textbook, which file implements it, whether tests exist for it, and whether a notebook section covers it. This makes it easy to find a specific algorithm from the book and jump straight to its code or explanation.

The project is associated with the 4th edition of the textbook, published in 2020. It welcomes contributions, particularly for algorithms that are not yet fully implemented or that lack tests and notebook coverage. This is primarily a learning and reference resource rather than a production library.

Where it fits