From 3abc4462cad39cb9fedb0d307a192c49c73c5284 Mon Sep 17 00:00:00 2001 From: Google Code Exporter Date: Fri, 24 Jul 2015 08:37:04 -0400 Subject: [PATCH] Migrating wiki contents from Google Code --- ProjectHome.md | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++ ReadMe.md | 54 ++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 ProjectHome.md create mode 100644 ReadMe.md diff --git a/ProjectHome.md b/ProjectHome.md new file mode 100644 index 0000000..9a363f2 --- /dev/null +++ b/ProjectHome.md @@ -0,0 +1,97 @@ +Python implementation of algorithms from Russell and Norvig's _[Artificial Intelligence: A Modern Approach](http://aima.cs.berkeley.edu)_. + +The [Subversion checkout](http://code.google.com/p/aima-python/source/checkout) is actively developed as of October 2011; you'll probably prefer it to the .zip download for now. + +# Index of Code # + +| **Fig** | **Page** | **Name (in book)** | **Code** | +|:--------|:---------|:-------------------|:---------| +| 2 | 32 | Environment | [Environment](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 2.1 | 33 | Agent | [Agent](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 2.3 | 34 | Table-Driven-Vacuum-Agent | [TableDrivenVacuumAgent](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 2.7 | 45 | Table-Driven-Agent | [TableDrivenAgent](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 2.8 | 46 | Reflex-Vacuum-Agent | [ReflexVacuumAgent](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 2.10 | 47 | Simple-Reflex-Agent | [SimpleReflexAgent](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 2.12 | 49 | Reflex-Agent-With-State | [ReflexAgentWithState](http://aima-python.googlecode.com/svn/trunk/agents.py) | +| 3.1 | 61 | Simple-Problem-Solving-Agent | [SimpleProblemSolvingAgent](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3 | 62 | Problem | [Problem](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3.2 | 63 | Romania | [romania](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3 | 69 | Node | [Node](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3.7 | 70 | Tree-Search | [tree\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3 | 71 | Queue | [Queue](http://aima-python.googlecode.com/svn/trunk/utils.py) | +| 3.9 | 72 | Tree-Search | [tree\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3.13 | 77 | Depth-Limited-Search | [depth\_limited\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3.14 | 79 | Iterative-Deepening-Search | [iterative\_deepening\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 3.19 | 83 | Graph-Search | [graph\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4 | 95 | Best-First-Search | [best\_first\_graph\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4 | 97 | A`*`-Search | [astar\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4.5 | 102 | Recursive-Best-First-Search | [recursive\_best\_first\_search](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4.11 | 112 | Hill-Climbing | [hill\_climbing](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4.14 | 116 | Simulated-Annealing | [simulated\_annealing](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4.17 | 119 | Genetic-Algorithm | [genetic\_algorithm](http://aima-python.googlecode.com/svn/trunk/search.py) | +| 4.20 | 126 | Online-DFS-Agent | | +| 4.23 | 128 | LRTA`*`-Agent | | +| 5 | 137 | CSP | [CSP](http://aima-python.googlecode.com/svn/trunk/csp.py) | +| 5.3 | 142 | Backtracking-Search | [backtracking\_search](http://aima-python.googlecode.com/svn/trunk/csp.py) | +| 5.7 | 146 | AC-3 | [AC3](http://aima-python.googlecode.com/svn/trunk/csp.py) | +| 5.8 | 151 | Min-Conflicts | [min\_conflicts](http://aima-python.googlecode.com/svn/trunk/csp.py) | +| 6.3 | 166 | Minimax-Decision | [minimax\_decision](http://aima-python.googlecode.com/svn/trunk/games.py) | +| 6.7 | 170 | Alpha-Beta-Search | [alphabeta\_search](http://aima-python.googlecode.com/svn/trunk/games.py) | +| 7 | 195 | KB | [KB](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.1 | 196 | KB-Agent | [KB\_Agent](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.7 | 205 | Propositional Logic Sentence | [Expr](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.10 | 209 | TT-Entails | [tt\_entials](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7 | 215 | Convert to CNF | [to\_cnf](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.12 | 216 | PL-Resolution | [pl\_resolution](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.14 | 219 | PL-FC-Entails? | [pl\_fc\_resolution](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.16 | 222 | DPLL-Satisfiable? | [dpll\_satisfiable](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.17 | 223 | WalkSAT | [WalkSAT](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 7.19 | 226 | PL-Wumpus-Agent | [PLWumpusAgent](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 9 | 273 | Subst | [subst](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 9.1 | 278 | Unify | [unify](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 9.3 | 282 | FOL-FC-Ask | [fol\_fc\_ask](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 9.6 | 288 | FOL-BC-Ask | [fol\_bc\_ask](http://aima-python.googlecode.com/svn/trunk/logic.py) | +| 9.14 | 307 | Otter | | +| 11.2 | 380 | Airport-problem | | +| 11.3 | 381 | Spare-Tire-Problem | | +| 11.4 | 383 | Three-Block-Tower | | +| 11 | 390 | Partial-Order-Planner | | +| 11.11 | 396 | Cake-Problem | | +| 11.13 | 399 | Graphplan | | +| 11.15 | 403 | SATPlan | | +| 12.1 | 418 | Job-Shop-Problem | | +| 12.3 | 421 | Job-Shop-Problem-With-Resources | | +| 12.6 | 424 | House-Building-Problem | | +| 12.10 | 435 | And-Or-Graph-Search | | +| 12.22 | 449 | Continuous-POP-Agent | | +| 12.23 | 450 | Doubles-tennis | | +| 13.1 | 466 | DT-Agent | [DTAgent](http://aima-python.googlecode.com/svn/trunk/probability.py) | +| 13 | 469 | Discrete Probability Distribution | [DiscreteProbDist](http://aima-python.googlecode.com/svn/trunk/probability.py) | +| 13.4 | 477 | Enumerate-Joint-Ask | | +| 14.10 | 509 | Elimination-Ask | | +| 14.12 | 512 | Prior-Sample | | +| 14.13 | 513 | Rejection-Sampling | | +| 14.14 | 515 | Likelihood-Weighting | | +| 14.15 | 517 | MCMC-Ask | | +| 15.4 | 546 | Forward-Backward | | +| 15.6 | 552 | Fixed-Lag-Smoothing | | +| 15.15 | 566 | Particle-Filtering | | +| 16.8 | 603 | Information-Gathering-Agent | | +| 17.4 | 621 | Value-Iteration | [value\_iteration](http://aima-python.googlecode.com/svn/trunk/mdp.py) | +| 17.7 | 624 | Policy-Iteration | [policy\_iteration](http://aima-python.googlecode.com/svn/trunk/mdp.py) | +| 18.5 | 658 | Decision-Tree-Learning | [DecisionTreeLearner](http://aima-python.googlecode.com/svn/trunk/learning.py) | +| 18.10 | 667 | AdaBoost | | +| 18.14 | 672 | Decision-List-Learning | | +| 19.2 | 681 | Current-Best-Learning | | +| 19.3 | 683 | Version-Space-Learning | | +| 19.8 | 696 | Minimal-Consistent-Det | | +| 19.12 | 702 | FOIL | | +| 20.21 | 742 | Perceptron-Learning | | +| 20.25 | 746 | Back-Prop-Learning | | +| 21.2 | 768 | Passive-ADP-Agent | | +| 21.4 | 769 | Passive-TD-Agent | | +| 21.8 | 776 | Q-Learning-Agent | | +| 22.2 | 796 | Naive-Communicating-Agent | | +| 22.7 | 801 | Chart-Parse | [Chart](http://aima-python.googlecode.com/svn/trunk/nlp.py) | +| 23.1 | 837 | Viterbi-Segmentation | [viterbi\_segment](http://aima-python.googlecode.com/svn/trunk/text.py) | +| 24.21 | 892 | Align | | \ No newline at end of file diff --git a/ReadMe.md b/ReadMe.md new file mode 100644 index 0000000..8c21b4d --- /dev/null +++ b/ReadMe.md @@ -0,0 +1,54 @@ +# Introduction # + +This file gives an overview of the Python code for the algorithms in +the textbook _Artificial Intelligence: A Modern +Approach_, also known as _[AIMA](http://aima.cs.berkeley.edu)_. The code is offered free for your use under the MIT License. +As you may know, the textbook presents algorithms in +pseudo-code format; as a supplement we provide this code. +The intent is to implement all the algorithms in the book, +but we are not done yet. + +# Prerequisites # + +The code is meant for Python 2.5 through 2.7. + +# How to Browse the Code # + +You can get some use out of the code here just by browsing, starting +at the +[root of the source tree](http://code.google.com/p/aima-python/source/browse/#svn%2Ftrunk) or by clicking on the links in the +[index on the project home page](http://code.google.com/p/aima-python). +The source code is in the **.py files; the**.txt files give examples of +how to use the code. + +# How to Install the Code # + +If you like what you see, install the code using either one of these methods: + + 1. From a command shell on your computer, execute the `svn checkout` command given on the [source tab](http://code.google.com/p/aima-python/source) of the project. This assumes you have previously installed the version control system [Subversion](http://subversion.tigris.org/) (svn). + 1. Download and unzip the zip file listed as a "Featured download"on the right hand side of the [project home page](http://code.google.com/p/aima-python/). This is currently (Oct 2011) long out of date; we mean to make a new .zip when the svn checkout settles down. + +You'll also need to install the data files from the [aima-data](http://code.google.com/p/aima-data) project. These are text files that are used by the tests in the aima-python project, and may be useful for yout own work. + +You can put the code anywhere you want on your computer, but it should be in one +directory (you might call it _aima_ but you are free to use whatever name you want) with _aima-python_ as a subdirectory that contains all the files from this project, and _data_ as a parallel subdirectory that contains all the files from the aima-data project. + +# How to Test the Code # + +First, you need to install Python (version 2.5 through 2.7; parts of the code may work in other versions, but don't expect it to). Python comes preinstalled on most versions of Linux and Mac OS. Versions are also available for Windows, Solaris, and other operating systems. If your system does not have Python installed, you can [download](http://python.org/download/) and install it for free. + +In the _aima-python_ directory, execute the command + +> `python doctests.py -v *.py` + +The "-v" is optional; it means "verbose". Various output is printed, but if all goes well there should be no instances of the word "`Failure`", nor of a long line of "**". +If you do use the "-v" option, the last line printed should be "Test passed."** + +# How to Run the Code # + +You're on your own -- experiment! Create a new python file, import the modules you need, +and call the functions you want. + +# Acknowledgements # + +Many thanks for the bug reports, corrected code, and other support from Phil Ruggera, Peng Shao, Amit Patil, Ted Nienstedt, Jim Martin, Ben Catanzariti, and others. \ No newline at end of file