aimacode / aima-pseudocode

Pseudocode descriptions of the algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
Other
868 stars 421 forks source link

Pseudocode

Pseudocode descriptions of the algorithms from Russell and Norvig's Artificial Intelligence - A Modern Approach.

The algorithms as they appear in the book are available in pdf format:

The files listed below give the same algorithms, but in markdown format. We need help checking that the 4th edition versions are correct. We are in the process of updating from the old 3rd edition algorithms. (Note: when editing pseudocode in a md/*.md file, put two spaces at the end of a line; this keeps the line separate from the following line.)

3rd ed. 4th ed. Pseudo-code Algorithm
2.3 2.7 TABLE-DRIVEN-AGENT
2.4 2.8 REFLEX-VACUUM-AGENT
2.6 2.10 SIMPLE-REFLEX-AGENT
2.8 2.12 MODEL-BASED-REFLEX-AGENT
3.1 x SIMPLE-PROBLEM-SOLVING-AGENT
3.7 3.7 BEST-FIRST-SEARCH
3.11 3.9 BREADTH-FIRST-SEARCH
3.17 3.12 ITERATIVE-DEEPENING-SEARCH
x 3.14 [BIBF-SEARCH]() (Bidirectional Best-First)
3.13 x UNIFORM-COST-SEARCH
3.16 x DEPTH-LIMITED-SEARCH
3.24 3.22 RECURSIVE-BEST-FIRST-SEARCH
4.2 4.2 HILL-CLIMBING
4.5 4.4 SIMULATED-ANNEALING
4.8 4.7 GENETIC-ALGORITHM
4.11 4.10 AND-OR-GRAPH-SEARCH
4.21 4.20 ONLINE-DFS-AGENT
4.24 4.23 LRTA*-AGENT
5.3 5.3 MINIMAX-SEARCH (was MINIMAX-DECISION in 3e)
5.7 5.7 ALPHA-BETA-SEARCH
x 5.11 MONTE-CARLO-TREE-SEARCH
6.3 6.3 AC-3
6.5 6.5 BACKTRACKING-SEARCH
6.8 6.9 MIN-CONFLICTS
6.11 6.11 TREE-CSP-SOLVER
7.1 7.1 KB-AGENT
7.8 7.10 TT-ENTAILS
7.9 7.13 PL-RESOLUTION
7.12 7.15 PL-FC-ENTAILS?
7.14 7.17 DPLL-SATISFIABLE?
7.15 7.18 WALKSAT
7.17 7.20 HYBRID-WUMPUS-AGENT
7.19 7.22 SATPLAN
9.1 9.1 UNIFY
9.3 9.3 FOL-FC-ASK
9.6 9.6 FOL-BC-ASK
9.8 9.8 APPEND
10.1 11.1 AIR-CARGO-TRANSPORT-PROBLEM
10.2 11.2 SPARE-TIRE-PROBLEM
10.3 11.4 BLOCKS-WORLD
10.7 x HAVE-CAKE-AND-EAT-CAKE-TOO-PROBLEM
10.9 x GRAPHPLAN
11.4 11.7 REFINEMENT-HIGH-LEVEL-ACTIONS
11.5 11.8 HIERARCHICAL-SEARCH
11.8 11.11 ANGELIC-SEARCH
11.1 11.13 JOB-SHOP-SCHEDULING-PROBLEM
13.1 12.1 DT-AGENT
14.9 13.11 ENUMERATION-ASK
14.10 13.13 ELIMINATION-ASK
14.12 13.16 PRIOR-SAMPLE
14.13 13.17 REJECTION-SAMPLING
14.14 13.18 LIKELIHOOD-WEIGHTING
14.15 13.20 GIBBS-ASK
15.4 14.4 FORWARD-BACKWARD
15.6 14.6 FIXED-LAG-SMOOTHING
15.17 14.17 PARTICLE-FILTERING
x 15.5 OUPM (for citation extraction)
x 15.6 NET-VISA
x 15.9 RADAR (OUPM for radar tracking)
x 15.11 GENERATE-IMAGE
x 15.15 GENERATE-MARKOV-LETTERS
16.9 16.9 INFORMATION-GATHERING-AGENT
17.4 17.6 VALUE-ITERATION
17.7 17.9 POLICY-ITERATION
17.9 17.16 POMDP-VALUE-ITERATION
11.10 18.1 DOUBLES-TENNIS-PROBLEM
18.4 19.5 LEARN-DECISION-TREE
18.7 19.8 CROSS-VALIDATION-WRAPPER
18.10 19.11 DECISION-LIST-LEARNING
18.33 19.25 ADABOOST
19.2 x CURRENT-BEST-LEARNING
19.3 x VERSION-SPACE-LEARNING
19.8 x MINIMAL-CONSISTENT-DET
19.12 x FOIL
21.2 22.2 PASSIVE-ADP-AGENT
21.4 22.4 PASSIVE-TD-AGENT
21.8 22.8 Q-LEARNING-AGENT
22.1 x HITS
23.4 23.5 CYK-PARSE
23.5 23.8 SENTENCE-TREE
25.9 26.6 MONTE-CARLO-LOCALIZATION
29.1 x POWERS-OF-2