Skip to main content

I made this package to help me on my learning journey through the AIMA book and contains all algorithms I build whilst learning through the book

Project description

aima_toolkit

aima_toolkit is my personal implementation of algorithms and problems from Artificial Intelligence: A Modern Approach (4th edition).
It serves as both a learning project and a reusable package that I can import into other projects without copy–pasting code.


🎯 Why I built this

While studying AIMA, I quickly realized that each chapter builds on a shared set of abstractions (problems, nodes, queues, heuristics, etc.).
Copying files around between my “Chapter 3 search agents” and my “Chapter 4 local search” projects became repetitive and messy.

This package solves that by:

  • Providing a central library of reusable AI building blocks.
  • Letting me install it locally (or eventually from PyPI) and just import aima_toolkit.
  • Forcing me to design my code as modular, tested, and reusable software rather than scattered scripts.

📦 What it contains

The package is organized following the structure of AIMA:

  • Problems
    • Classic AI problems: 8-queens, Romania map search, simple tree problems.
  • SearchProblemPackage
    • Uninformed Search: BFS, DFS, Depth-limited, Iterative Deepening, Uniform Cost.
    • Informed Search: A*.
    • Local Search: Hill Climbing, Stochastic Hill Climbing, Simulated Annealing, Local Beam, Genetic Algorithms.
    • Nondeterministic, Online, and Partially Observable Search (scaffolding for future chapters).
  • Sampling
    • Utilities like reservoir sampling.
  • Core utilities
    • Node, Problem, Queue, expand functions, etc.

Tests are included under tests/ to ensure correctness.


🚀 Goals

This isn’t just about getting AIMA exercises done—it’s about pushing myself to:

  1. Write library-quality code
    • Consistent API
    • Clear separation of subpackages
    • MIT licensed for others to learn from.
  2. Cover the book’s progression
    • Start with search (Chapters 3–4)
    • Move into CSPs (Chapter 5), games (Chapter 6), logic (Chapters 7–10), planning (Chapter 11), uncertainty (Chapters 12–16), machine learning (Chapters 19–23), and beyond.
  3. Make it reusable for my own projects
    • Example: using the same Problem abstraction for both toy textbook problems and custom agents (like N-puzzle solvers or experimental planners).

🔧 Installation

For now (local development):

git clone <this-repo>
cd aima_toolkit
python -m pip install -e .

Then in Python:

from aima_toolkit.SearchProblemPackage.SearchAlgorithms.InformedSearch.a_star_search import astar

🛠️ Roadmap

  • ✅ Chapter 3: Uninformed search
  • ✅ Chapter 4: Local search & optimization
  • 🔜 Chapter 5: CSPs (backtracking, inference, local search)
  • 🔜 Chapter 6: Adversarial search & games
  • 🔜 Chapter 7+: Logic, Planning, Uncertainty, ML, RL…

My long-term goal is to have a complete, working reference implementation of all core algorithms in AIMA 4e, with clean Python packaging and tests.


📜 License

MIT License — free to use, modify, and learn from, with attribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aima_toolkit-1.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aima_toolkit-1.1.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file aima_toolkit-1.1.0.tar.gz.

File metadata

  • Download URL: aima_toolkit-1.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aima_toolkit-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1b097c232be13c55311157d9af84edd7b49f1de4b5a49710ecc183a705a70335
MD5 43dcc1c7a0aa75a3d12287c389199dba
BLAKE2b-256 56ba8daf0f5bc1e96b71b486b8452a5c526b6941ba14ec642d5a50f112f9c1cc

See more details on using hashes here.

File details

Details for the file aima_toolkit-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: aima_toolkit-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aima_toolkit-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5cf01948e5b4e2a67bf90fbdfd748860ccccc28d6664256612986b48ed10114
MD5 f87e6e65353792c8ea775e5852376ca0
BLAKE2b-256 54d0033ad37ff70d6e71b078480ff6c0320809d960fc2a6c2e7c7bd0b80561f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page