@@ -26,99 +26,99 @@ When complete, this project will have Python code for all the pseudocode algorit
26
26
27
27
Here is a table of algorithms, the figure, name of the algorithm in the book and in the repository, and the file where they are implemented in the repository. This chart was made for the third edition of the book and needs to be updated for the upcoming fourth edition. Empty implementations are a good place for contributors to look for an issue. The [ aima-pseudocode] ( https://github.com/aimacode/aima-pseudocode ) project describes all the algorithms from the book. An asterisk next to the file name denotes the algorithm is not fully implemented.
28
28
29
- | ** Figure** | ** Name (in 3<sup >rd</sup > edition)** | ** Name (in repository)** | ** File**
30
- | :--------| :-------------------| :---------| :-----------|
31
- | 2.1 | Environment | ` Environment ` | [ ` agents.py ` ] [ agents ] |
32
- | 2.1 | Agent | ` Agent ` | [ ` agents.py ` ] [ agents ] |
33
- | 2.3 | Table-Driven-Vacuum-Agent | ` TableDrivenVacuumAgent ` | [ ` agents.py ` ] [ agents ] |
34
- | 2.7 | Table-Driven-Agent | ` TableDrivenAgent ` | [ ` agents.py ` ] [ agents ] |
35
- | 2.8 | Reflex-Vacuum-Agent | ` ReflexVacuumAgent ` | [ ` agents.py ` ] [ agents ] |
36
- | 2.10 | Simple-Reflex-Agent | ` SimpleReflexAgent ` | [ ` agents.py ` ] [ agents ] |
37
- | 2.12 | Model-Based-Reflex-Agent | ` ReflexAgentWithState ` | [ ` agents.py ` ] [ agents ] |
38
- | 3 | Problem | ` Problem ` | [ ` search.py ` ] [ search ] |
39
- | 3 | Node | ` Node ` | [ ` search.py ` ] [ search ] |
40
- | 3 | Queue | ` Queue ` | [ ` utils.py ` ] [ utils ] |
41
- | 3.1 | Simple-Problem-Solving-Agent | ` SimpleProblemSolvingAgent ` | [ ` search.py ` ] [ search ] |
42
- | 3.2 | Romania | ` romania ` | [ ` search.py ` ] [ search ] |
43
- | 3.7 | Tree-Search | ` tree_search ` | [ ` search.py ` ] [ search ] |
44
- | 3.7 | Graph-Search | ` graph_search ` | [ ` search.py ` ] [ search ] |
45
- | 3.11 | Breadth-First-Search | ` breadth_first_search ` | [ ` search.py ` ] [ search ] |
46
- | 3.14 | Uniform-Cost-Search | ` uniform_cost_search ` | [ ` search.py ` ] [ search ] |
47
- | 3.17 | Depth-Limited-Search | ` depth_limited_search ` | [ ` search.py ` ] [ search ] |
48
- | 3.18 | Iterative-Deepening-Search | ` iterative_deepening_search ` | [ ` search.py ` ] [ search ] |
49
- | 3.22 | Best-First-Search | ` best_first_graph_search ` | [ ` search.py ` ] [ search ] |
50
- | 3.24 | A\* -Search | ` astar_search ` | [ ` search.py ` ] [ search ] |
51
- | 3.26 | Recursive-Best-First-Search | ` recursive_best_first_search ` | [ ` search.py ` ] [ search ] |
52
- | 4.2 | Hill-Climbing | ` hill_climbing ` | [ ` search.py ` ] [ search ] |
53
- | 4.5 | Simulated-Annealing | ` simulated_annealing ` | [ ` search.py ` ] [ search ] |
54
- | 4.8 | Genetic-Algorithm | ` genetic_algorithm ` | [ ` search.py ` ] [ search ] |
55
- | 4.11 | And-Or-Graph-Search | ` and_or_graph_search ` | [ ` search.py ` ] [ search ] |
56
- | 4.21 | Online-DFS-Agent | ` online_dfs_agent ` | [ ` search.py ` ] [ search ] |
57
- | 4.24 | LRTA\* -Agent | ` LRTAStarAgent ` | [ ` search.py ` ] [ search ] |
58
- | 5.3 | Minimax-Decision | ` minimax_decision ` | [ ` games.py ` ] [ games ] |
59
- | 5.7 | Alpha-Beta-Search | ` alphabeta_search ` | [ ` games.py ` ] [ games ] |
60
- | 6 | CSP | ` CSP ` | [ ` csp.py ` ] [ csp ] |
61
- | 6.3 | AC-3 | ` AC3 ` | [ ` csp.py ` ] [ csp ] |
62
- | 6.5 | Backtracking-Search | ` backtracking_search ` | [ ` csp.py ` ] [ csp ] |
63
- | 6.8 | Min-Conflicts | ` min_conflicts ` | [ ` csp.py ` ] [ csp ] |
64
- | 6.11 | Tree-CSP-Solver | ` tree_csp_solver ` | [ ` csp.py ` ] [ csp ] |
65
- | 7 | KB | ` KB ` | [ ` logic.py ` ] [ logic ] |
66
- | 7.1 | KB-Agent | ` KB_Agent ` | [ ` logic.py ` ] [ logic ] |
67
- | 7.7 | Propositional Logic Sentence | ` Expr ` | [ ` logic.py ` ] [ logic ] |
68
- | 7.10 | TT-Entails | ` tt_entials ` | [ ` logic.py ` ] [ logic ] |
69
- | 7.12 | PL-Resolution | ` pl_resolution ` | [ ` logic.py ` ] [ logic ] |
70
- | 7.14 | Convert to CNF | ` to_cnf ` | [ ` logic.py ` ] [ logic ] |
71
- | 7.15 | PL-FC-Entails? | ` pl_fc_resolution ` | [ ` logic.py ` ] [ logic ] |
72
- | 7.17 | DPLL-Satisfiable? | ` dpll_satisfiable ` | [ ` logic.py ` ] [ logic ] |
73
- | 7.18 | WalkSAT | ` WalkSAT ` | [ ` logic.py ` ] [ logic ] |
74
- | 7.20 | Hybrid-Wumpus-Agent | ` HybridWumpusAgent ` | [ ` logic.py ` ] [ logic ] \* |
75
- | 7.22 | SATPlan | ` SAT_plan ` | [ ` logic.py ` ] [ logic ] |
76
- | 9 | Subst | ` subst ` | [ ` logic.py ` ] [ logic ] |
77
- | 9.1 | Unify | ` unify ` | [ ` logic.py ` ] [ logic ] |
78
- | 9.3 | FOL-FC-Ask | ` fol_fc_ask ` | [ ` logic.py ` ] [ logic ] |
79
- | 9.6 | FOL-BC-Ask | ` fol_bc_ask ` | [ ` logic.py ` ] [ logic ] |
80
- | 9.8 | Append | | |
81
- | 10.1 | Air-Cargo-problem | ` air_cargo ` | [ ` planning.py ` ] [ planning ] |
82
- | 10.2 | Spare-Tire-Problem | ` spare_tire ` | [ ` planning.py ` ] [ planning ] |
83
- | 10.3 | Three-Block-Tower | ` three_block_tower ` | [ ` planning.py ` ] [ planning ] |
84
- | 10.7 | Cake-Problem | ` have_cake_and_eat_cake_too ` | [ ` planning.py ` ] [ planning ] |
85
- | 10.9 | Graphplan | ` GraphPlan ` | [ ` planning.py ` ] [ planning ] |
86
- | 10.13 | Partial-Order-Planner | |
87
- | 11.1 | Job-Shop-Problem-With-Resources | ` job_shop_problem ` | [ ` planning.py ` ] [ planning ] |
88
- | 11.5 | Hierarchical-Search | ` hierarchical_search ` | [ ` planning.py ` ] [ planning ] |
89
- | 11.8 | Angelic-Search | |
90
- | 11.10 | Doubles-tennis | ` double_tennis_problem ` | [ ` planning.py ` ] [ planning ] |
91
- | 13 | Discrete Probability Distribution | ` ProbDist ` | [ ` probability.py ` ] [ probability ] |
92
- | 13.1 | DT-Agent | ` DTAgent ` | [ ` probability.py ` ] [ probability ] |
93
- | 14.9 | Enumeration-Ask | ` enumeration_ask ` | [ ` probability.py ` ] [ probability ] |
94
- | 14.11 | Elimination-Ask | ` elimination_ask ` | [ ` probability.py ` ] [ probability ] |
95
- | 14.13 | Prior-Sample | ` prior_sample ` | [ ` probability.py ` ] [ probability ] |
96
- | 14.14 | Rejection-Sampling | ` rejection_sampling ` | [ ` probability.py ` ] [ probability ] |
97
- | 14.15 | Likelihood-Weighting | ` likelihood_weighting ` | [ ` probability.py ` ] [ probability ] |
98
- | 14.16 | Gibbs-Ask | ` gibbs_ask ` | [ ` probability.py ` ] [ probability ] |
99
- | 15.4 | Forward-Backward | ` forward_backward ` | [ ` probability.py ` ] [ probability ] |
100
- | 15.6 | Fixed-Lag-Smoothing | ` fixed_lag_smoothing ` | [ ` probability.py ` ] [ probability ] |
101
- | 15.17 | Particle-Filtering | ` particle_filtering ` | [ ` probability.py ` ] [ probability ] |
102
- | 16.9 | Information-Gathering-Agent | |
103
- | 17.4 | Value-Iteration | ` value_iteration ` | [ ` mdp.py ` ] [ mdp ] |
104
- | 17.7 | Policy-Iteration | ` policy_iteration ` | [ ` mdp.py ` ] [ mdp ] |
105
- | 17.7 | POMDP-Value-Iteration | | |
106
- | 18.5 | Decision-Tree-Learning | ` DecisionTreeLearner ` | [ ` learning.py ` ] [ learning ] |
107
- | 18.8 | Cross-Validation | ` cross_validation ` | [ ` learning.py ` ] [ learning ] |
108
- | 18.11 | Decision-List-Learning | ` DecisionListLearner ` | [ ` learning.py ` ] [ learning ] \* |
109
- | 18.24 | Back-Prop-Learning | ` BackPropagationLearner ` | [ ` learning.py ` ] [ learning ] |
110
- | 18.34 | AdaBoost | ` AdaBoost ` | [ ` learning.py ` ] [ learning ] |
111
- | 19.2 | Current-Best-Learning | ` current_best_learning ` | [ ` knowledge.py ` ] ( knowledge.py ) |
112
- | 19.3 | Version-Space-Learning | ` version_space_learning ` | [ ` knowledge.py ` ] ( knowledge.py ) |
113
- | 19.8 | Minimal-Consistent-Det | |
114
- | 19.12 | FOIL | |
115
- | 21.2 | Passive-ADP-Agent | ` PassiveADPAgent ` | [ ` rl.py ` ] [ rl ] |
116
- | 21.4 | Passive-TD-Agent | ` PassiveTDAgent ` | [ ` rl.py ` ] [ rl ] |
117
- | 21.8 | Q-Learning-Agent | ` QLearningAgent ` | [ ` rl.py ` ] [ rl ] |
118
- | 22.1 | HITS | ` HITS ` | [ ` nlp.py ` ] [ nlp ] |
119
- | 23 | Chart-Parse | ` Chart ` | [ ` nlp.py ` ] [ nlp ] |
120
- | 23.5 | CYK-Parse | ` CYK_parse ` | [ ` nlp.py ` ] [ nlp ] |
121
- | 25.9 | Monte-Carlo-Localization| |
29
+ | ** Figure** | ** Name (in 3<sup >rd</sup > edition)** | ** Name (in repository)** | ** File** | ** Tests **
30
+ | :--------| :-------------------| :---------| :-----------| :------- |
31
+ | 2.1 | Environment | ` Environment ` | [ ` agents.py ` ] [ agents ] | |
32
+ | 2.1 | Agent | ` Agent ` | [ ` agents.py ` ] [ agents ] | Done |
33
+ | 2.3 | Table-Driven-Vacuum-Agent | ` TableDrivenVacuumAgent ` | [ ` agents.py ` ] [ agents ] | |
34
+ | 2.7 | Table-Driven-Agent | ` TableDrivenAgent ` | [ ` agents.py ` ] [ agents ] | |
35
+ | 2.8 | Reflex-Vacuum-Agent | ` ReflexVacuumAgent ` | [ ` agents.py ` ] [ agents ] | Done |
36
+ | 2.10 | Simple-Reflex-Agent | ` SimpleReflexAgent ` | [ ` agents.py ` ] [ agents ] | |
37
+ | 2.12 | Model-Based-Reflex-Agent | ` ReflexAgentWithState ` | [ ` agents.py ` ] [ agents ] | |
38
+ | 3 | Problem | ` Problem ` | [ ` search.py ` ] [ search ] | Done |
39
+ | 3 | Node | ` Node ` | [ ` search.py ` ] [ search ] | Done |
40
+ | 3 | Queue | ` Queue ` | [ ` utils.py ` ] [ utils ] | Done |
41
+ | 3.1 | Simple-Problem-Solving-Agent | ` SimpleProblemSolvingAgent ` | [ ` search.py ` ] [ search ] | |
42
+ | 3.2 | Romania | ` romania ` | [ ` search.py ` ] [ search ] | Done |
43
+ | 3.7 | Tree-Search | ` tree_search ` | [ ` search.py ` ] [ search ] | Done |
44
+ | 3.7 | Graph-Search | ` graph_search ` | [ ` search.py ` ] [ search ] | Done |
45
+ | 3.11 | Breadth-First-Search | ` breadth_first_search ` | [ ` search.py ` ] [ search ] | Done |
46
+ | 3.14 | Uniform-Cost-Search | ` uniform_cost_search ` | [ ` search.py ` ] [ search ] | Done |
47
+ | 3.17 | Depth-Limited-Search | ` depth_limited_search ` | [ ` search.py ` ] [ search ] | Done |
48
+ | 3.18 | Iterative-Deepening-Search | ` iterative_deepening_search ` | [ ` search.py ` ] [ search ] | Done |
49
+ | 3.22 | Best-First-Search | ` best_first_graph_search ` | [ ` search.py ` ] [ search ] | |
50
+ | 3.24 | A\* -Search | ` astar_search ` | [ ` search.py ` ] [ search ] | Done |
51
+ | 3.26 | Recursive-Best-First-Search | ` recursive_best_first_search ` | [ ` search.py ` ] [ search ] | Done |
52
+ | 4.2 | Hill-Climbing | ` hill_climbing ` | [ ` search.py ` ] [ search ] | |
53
+ | 4.5 | Simulated-Annealing | ` simulated_annealing ` | [ ` search.py ` ] [ search ] | |
54
+ | 4.8 | Genetic-Algorithm | ` genetic_algorithm ` | [ ` search.py ` ] [ search ] | Done |
55
+ | 4.11 | And-Or-Graph-Search | ` and_or_graph_search ` | [ ` search.py ` ] [ search ] | Done |
56
+ | 4.21 | Online-DFS-Agent | ` online_dfs_agent ` | [ ` search.py ` ] [ search ] | |
57
+ | 4.24 | LRTA\* -Agent | ` LRTAStarAgent ` | [ ` search.py ` ] [ search ] | Done |
58
+ | 5.3 | Minimax-Decision | ` minimax_decision ` | [ ` games.py ` ] [ games ] | Done |
59
+ | 5.7 | Alpha-Beta-Search | ` alphabeta_search ` | [ ` games.py ` ] [ games ] | Done |
60
+ | 6 | CSP | ` CSP ` | [ ` csp.py ` ] [ csp ] | Done |
61
+ | 6.3 | AC-3 | ` AC3 ` | [ ` csp.py ` ] [ csp ] | Done |
62
+ | 6.5 | Backtracking-Search | ` backtracking_search ` | [ ` csp.py ` ] [ csp ] | Done |
63
+ | 6.8 | Min-Conflicts | ` min_conflicts ` | [ ` csp.py ` ] [ csp ] | |
64
+ | 6.11 | Tree-CSP-Solver | ` tree_csp_solver ` | [ ` csp.py ` ] [ csp ] | Done |
65
+ | 7 | KB | ` KB ` | [ ` logic.py ` ] [ logic ] | Done |
66
+ | 7.1 | KB-Agent | ` KB_Agent ` | [ ` logic.py ` ] [ logic ] | Done |
67
+ | 7.7 | Propositional Logic Sentence | ` Expr ` | [ ` logic.py ` ] [ logic ] | Done |
68
+ | 7.10 | TT-Entails | ` tt_entails ` | [ ` logic.py ` ] [ logic ] | Done |
69
+ | 7.12 | PL-Resolution | ` pl_resolution ` | [ ` logic.py ` ] [ logic ] | Done |
70
+ | 7.14 | Convert to CNF | ` to_cnf ` | [ ` logic.py ` ] [ logic ] | Done |
71
+ | 7.15 | PL-FC-Entails? | ` pl_fc_resolution ` | [ ` logic.py ` ] [ logic ] | Done |
72
+ | 7.17 | DPLL-Satisfiable? | ` dpll_satisfiable ` | [ ` logic.py ` ] [ logic ] | Done |
73
+ | 7.18 | WalkSAT | ` WalkSAT ` | [ ` logic.py ` ] [ logic ] | Done |
74
+ | 7.20 | Hybrid-Wumpus-Agent | ` HybridWumpusAgent ` | [ ` logic.py ` ] [ logic ] \* | |
75
+ | 7.22 | SATPlan | ` SAT_plan ` | [ ` logic.py ` ] [ logic ] | Done |
76
+ | 9 | Subst | ` subst ` | [ ` logic.py ` ] [ logic ] | Done |
77
+ | 9.1 | Unify | ` unify ` | [ ` logic.py ` ] [ logic ] | Done |
78
+ | 9.3 | FOL-FC-Ask | ` fol_fc_ask ` | [ ` logic.py ` ] [ logic ] | Done |
79
+ | 9.6 | FOL-BC-Ask | ` fol_bc_ask ` | [ ` logic.py ` ] [ logic ] | Done |
80
+ | 9.8 | Append | | | |
81
+ | 10.1 | Air-Cargo-problem | ` air_cargo ` | [ ` planning.py ` ] [ planning ] | Done |
82
+ | 10.2 | Spare-Tire-Problem | ` spare_tire ` | [ ` planning.py ` ] [ planning ] | Done |
83
+ | 10.3 | Three-Block-Tower | ` three_block_tower ` | [ ` planning.py ` ] [ planning ] | Done |
84
+ | 10.7 | Cake-Problem | ` have_cake_and_eat_cake_too ` | [ ` planning.py ` ] [ planning ] | Done |
85
+ | 10.9 | Graphplan | ` GraphPlan ` | [ ` planning.py ` ] [ planning ] | |
86
+ | 10.13 | Partial-Order-Planner | | | |
87
+ | 11.1 | Job-Shop-Problem-With-Resources | ` job_shop_problem ` | [ ` planning.py ` ] [ planning ] | Done |
88
+ | 11.5 | Hierarchical-Search | ` hierarchical_search ` | [ ` planning.py ` ] [ planning ] | |
89
+ | 11.8 | Angelic-Search | | | |
90
+ | 11.10 | Doubles-tennis | ` double_tennis_problem ` | [ ` planning.py ` ] [ planning ] | |
91
+ | 13 | Discrete Probability Distribution | ` ProbDist ` | [ ` probability.py ` ] [ probability ] | Done |
92
+ | 13.1 | DT-Agent | ` DTAgent ` | [ ` probability.py ` ] [ probability ] | |
93
+ | 14.9 | Enumeration-Ask | ` enumeration_ask ` | [ ` probability.py ` ] [ probability ] | Done |
94
+ | 14.11 | Elimination-Ask | ` elimination_ask ` | [ ` probability.py ` ] [ probability ] | Done |
95
+ | 14.13 | Prior-Sample | ` prior_sample ` | [ ` probability.py ` ] [ probability ] | |
96
+ | 14.14 | Rejection-Sampling | ` rejection_sampling ` | [ ` probability.py ` ] [ probability ] | Done |
97
+ | 14.15 | Likelihood-Weighting | ` likelihood_weighting ` | [ ` probability.py ` ] [ probability ] | Done |
98
+ | 14.16 | Gibbs-Ask | ` gibbs_ask ` | [ ` probability.py ` ] [ probability ] | |
99
+ | 15.4 | Forward-Backward | ` forward_backward ` | [ ` probability.py ` ] [ probability ] | Done |
100
+ | 15.6 | Fixed-Lag-Smoothing | ` fixed_lag_smoothing ` | [ ` probability.py ` ] [ probability ] | Done |
101
+ | 15.17 | Particle-Filtering | ` particle_filtering ` | [ ` probability.py ` ] [ probability ] | Done |
102
+ | 16.9 | Information-Gathering-Agent | | |
103
+ | 17.4 | Value-Iteration | ` value_iteration ` | [ ` mdp.py ` ] [ mdp ] | Done |
104
+ | 17.7 | Policy-Iteration | ` policy_iteration ` | [ ` mdp.py ` ] [ mdp ] | Done |
105
+ | 17.7 | POMDP-Value-Iteration | | | |
106
+ | 18.5 | Decision-Tree-Learning | ` DecisionTreeLearner ` | [ ` learning.py ` ] [ learning ] | Done |
107
+ | 18.8 | Cross-Validation | ` cross_validation ` | [ ` learning.py ` ] [ learning ] | |
108
+ | 18.11 | Decision-List-Learning | ` DecisionListLearner ` | [ ` learning.py ` ] [ learning ] \* | |
109
+ | 18.24 | Back-Prop-Learning | ` BackPropagationLearner ` | [ ` learning.py ` ] [ learning ] | Done |
110
+ | 18.34 | AdaBoost | ` AdaBoost ` | [ ` learning.py ` ] [ learning ] | |
111
+ | 19.2 | Current-Best-Learning | ` current_best_learning ` | [ ` knowledge.py ` ] ( knowledge.py ) | Done |
112
+ | 19.3 | Version-Space-Learning | ` version_space_learning ` | [ ` knowledge.py ` ] ( knowledge.py ) | Done |
113
+ | 19.8 | Minimal-Consistent-Det | | |
114
+ | 19.12 | FOIL | | |
115
+ | 21.2 | Passive-ADP-Agent | ` PassiveADPAgent ` | [ ` rl.py ` ] [ rl ] | Done |
116
+ | 21.4 | Passive-TD-Agent | ` PassiveTDAgent ` | [ ` rl.py ` ] [ rl ] | Done |
117
+ | 21.8 | Q-Learning-Agent | ` QLearningAgent ` | [ ` rl.py ` ] [ rl ] | Done |
118
+ | 22.1 | HITS | ` HITS ` | [ ` nlp.py ` ] [ nlp ] | Done |
119
+ | 23 | Chart-Parse | ` Chart ` | [ ` nlp.py ` ] [ nlp ] | |
120
+ | 23.5 | CYK-Parse | ` CYK_parse ` | [ ` nlp.py ` ] [ nlp ] | Done |
121
+ | 25.9 | Monte-Carlo-Localization| ` monte_carlo_localization ` | [ ` probability.py ` ] [ probability ] | Done |
122
122
123
123
124
124
# Index of data structures
0 commit comments