simpleai 0.3

Simple AI

This lib implements many of the artificial intelligence algorithms described on the book “Artificial Ingelligence, a Modern Approach”, from Stuart Russel and Peter Norvig. We strongly recommend you to read the book, or at least the introductory chapters and the ones related to the components you want to use, because we won’t explain the algorithms here.

This implementation takes some of the ideas from the Norvig’s implementation (the aima-python <https://code.google.com/p/aima-python/> lib), but it’s made with a more “pythonic” approach, and more enphasis on creating a stable, modern, and mantenible version. We are testing the majority of the lib, it’s available via pip install, has a standar repo and lib architecture, well documented, respects the python pep8 guidelines, provides only working code (no placeholders for future things), etc. Even the internal code is written with readability in mind, not only the external API.

At this moment, the implementation includes:

Search algorithms (not informed and informed)

Local Search algorithms

Constraint Satisfaction Problems algorithms

Installation

Just get it:

pip install simpleai

Examples

Simple AI allows you to define problems and look for the solution with
different strategies. Another samples are in the samples directory, but
here is an easy one.

This problem tries to create the string “HELLO WORLD” using the A* algorithm: