Skip to content

Commit a84722e

Browse files
authored
Restructure into the aima package (aima/ + notebooks/ + tests/) + converge all editions into one suffix-free module set (#1188) (#1340)
* Restructure modules into the 'aima' package (Stage 1 of #1188 convergence) Move all library modules under a single importable package: from search import X becomes from aima.search import X (or from aima import search), per the decision on #1188 to make the repo a proper package. This commit is the mechanical package move; the 3e/4e content convergence (unifying the X/X4e pairs) follows as Stage 2 on this branch. - git mv the 31 modules into aima/ and add aima/__init__.py. - Rewire every intra-package import to from aima.<mod>, and update all tests, notebooks, gui/ and the Sphinx automodule directives accordingly. - Fix the aima-data lookups that were anchored to dirname(__file__) (utils, utils4e, text) to resolve from the repo root now that the modules live one level down. - Add pyproject.toml (installable via pip install -e ., deps from requirements.txt) and note the new import/usage style in the README. Full test suite passes (502) and the Sphinx docs build with 0 warnings. BREAKING: top-level imports like 'from search import X' no longer work; use 'from aima.search import X'. * Stage 2a: remove orphan 3e/4e duplicate modules (agents4e, logic4e, reinforcement_learning4e) These 4e modules duplicated the same public symbols as their canonical counterparts, were imported only by their own tests, and added no unique 4e algorithms (agents/rl: identical symbol sets; logic4e's only 'unique' names were naming variants KB_AgentProgram/extend already present as KBAgentProgram and utils.extend). Per the #1188 convergence (keep the used base, drop the parallel 4e branch), delete them plus their tests and docs entries. Shared-symbol 4e implementations remain available in git history and can be re-adopted as deliberate per-algorithm 4e upgrades. * Stage 2b: converge 7 of 9 module pairs into the canonical modules (#1188) Fold each X4e's genuinely-new 4e algorithms into the canonical aima/X.py, keep the used base for shared symbols, then delete the X4e duplicate + reconcile tests: - games: + monte_carlo_tree_search, mcts_player (MCTS); games4e removed - mdp: + pomdp_lookahead, update_belief, q_value (DDN); mdp4e removed - nlp: + Tree, subspan, TextParsingProblem, astar_search_parsing, beam_search_parsing; nlp4e removed - probability: + is_independent, gen_possible_events, gaussian_probability, logistic_probability, ContinuousBayesNode, complied_burglary; probability4e removed - utils: + gaussian_kernel(_1D/_2D), conv1D, map_vector, MCT_Node, ucb (used by the MCTS above); perception4e and making_simple_decisions4e repointed to aima.utils Notebooks and docs updated to the canonical modules. Skipped naming-variant duplicates (expect_min_max_player, model_selection, KB_AgentProgram, extend). DEFERRED: the utils/learning convergence for the 4e ML cluster (utils4e, learning4e, deep_learning4e) — they are mutually coupled through the 4e DataSet.sanitize convention (drops the target) and the recursive vector helpers, so unifying them requires porting that cluster as its own effort. utils4e and learning4e are kept for now. Full suite: 407 passed; docs build with 0 warnings. * Stage 2c: converge the 4e ML cluster (utils + learning), completing #1188 Port the last 2 deferred pairs so there is one module per topic: - learning.DataSet.sanitize now drops the target (the 4e convention) - verified it leaves the 3e learning tests green and is what the neural-net learners need. - learning.err_ratio / grade_learner accept either a callable predictor or a learner object with a .predict method (so the 4e class-learners work through the canonical learning); backward-compatible with the 3e closures. - deep_learning4e imports the canonical aima.utils and defines locally the recursive vector helpers (element_wise_product/vector_add/scalar_vector_product) the neural net needs on nested weights (aima.utils keeps the flat tuple/np versions required by the grid/search code). - Delete utils4e.py and learning4e.py (no genuinely-unique symbols remained - model_selection duplicated cross_validation_wrapper); repoint test_deep_learning4e and Learners.ipynb to aima.learning; drop the duplicate test_learning4e. All 9 X/X4e pairs are now unified. Full suite: 393 passed; docs 0 warnings. * Drop all remaining 4e suffixes: one unsuffixed module per topic (#1188) Now that every topic has a single version, rename the 4e-only modules (which had no 3e counterpart) to plain topic names, and converge the notebook helper pair: - deep_learning4e -> deep_learning, game_theory4e -> game_theory, making_simple_decisions4e -> making_simple_decisions, perception4e -> perception (modules + their tests renamed). - notebook4e folded into notebook_utils (it was a superset: + plot_model_boundary); notebook4e deleted. (notebook_utils keeps the Jupyter-collision-safe name from #1294.) - Repointed every import across modules, tests, notebooks, gui and the Sphinx docs; renamed game_theory4e.ipynb -> game_theory.ipynb. No '*4e' modules remain. Full suite: 393 passed; docs build with 0 warnings. * Move all top-level notebooks under notebooks/ (folder restructure) Complete the folder restructure discussed with Peter Norvig: the importable code lives in aima/, the tests in tests/, and now every notebook lives under notebooks/ (alongside the existing notebooks/chapterNN/ chapter demos). - git mv all 40 top-level *.ipynb into notebooks/ (history preserved as renames). - Prepend a small bootstrap cell to each moved notebook: when run from the notebooks/ folder it chdirs to the repo root, so 'from aima import ...' and the cwd-relative aima-data/ and images/ paths resolve unchanged (works on Binder too, without needing an editable install). - README: document the aima/ + notebooks/ + tests/ layout; mark the 3e/4e convergence as done (single version per module, no *4e.py files remain). - CONTRIBUTING: fix the example notebook link to its new notebooks/ path. The GitHub Action to generate a .py from each .ipynb (making the notebook the source of truth) is intentionally left out -- it inverts the current direct-.py workflow and Peter wanted a contributor survey first. * Unify 4e notebooks into the base ones (one notebook per topic) The *4e.ipynb notebooks were standalone parallel notebooks that imported nothing from the package and re-defined the whole API inline (search4e: 110 defs/16 classes, games4e: 59/7, probability4e: 20/8) -- Norvig's self-contained 4e teaching notebooks. The base search/games/probability.ipynb notebooks instead demo the converged aima package (from aima.<module> import *) and are 3-5x more comprehensive, so they are the canonical single version per topic -- mirroring the module-level convergence. - Removed search4e.ipynb, games4e.ipynb, probability4e.ipynb and the explicitly obsolete obsolete_search4e.ipynb. - Dropped the duplicate 'Search - 4th edition' link from notebooks/index.ipynb. No '*4e' files of any kind remain in the repo. * Remove cross-module duplicates and fix two latent module bugs Audit found genuine cross-module duplication (the rest of the 16 same-name collisions are different-by-design: Graph x3 distinct classes, turn_left/right logic-proposition vs heading-rotation, the deep_learning recursive vector helpers, etc.): - making_simple_decisions.py was a 100%-duplicate, zero-importer module -> now a thin re-export of probability's canonical DecisionNetwork / InformationGatheringAgent. - csp.flatten duplicated utils.flatten (identical) -> import from utils. Latent bugs (uncovered while making the notebooks run, both in previously-untested paths; full suite still 393 passed): - notebook_utils.Canvas_min_max.__init__ called 'super.__init__' (missing parens) -> 'super().__init__'. - planning.RealWorldPlanningProblem.angelic_search called decompose() with 3 args but its signature needs 4 (missing 'plan') -> fixed. * Make all notebooks run against the aima package; doc sweep for the restructure The notebooks carried name/API drift from the earlier snake_case-rename and the edition convergence that was never propagated to them. Updated them to the canonical API (no duplicate aliases added): - games: minimax_decision->minmax_decision, alphabeta_*->alpha_beta_*, Canvas_minimax/alphabeta->Canvas_min_max/alpha_beta, 'alphabeta'->'alpha_beta'. - knowledge_foil: FOIL_container->FOILContainer. arc_consistency: all_diff->all_diff_constraint. - planning x4: Problem->PlanningProblem (graph_plan) / RealWorldPlanningProblem (angelic+hierarchical), Angelic_HLA->AngelicHLA, Angelic_Node->AngelicNode, *_graphplan->*_graph_plan, refinements(hla,prob,lib)->refinements(hla,lib), prob.init->prob.initial, cake plan reordered to satisfy preconditions. - probability: dropped invalid forward_backward(prior=...) kwarg. - chapter19: Learners import order (deep_learning's class learners win), Loss sigmoid()->Sigmoid()/.f->.function/activation=Sigmoid, Optimizer gradient_descent->stochastic_gradient_descent, adam_optimizer->adam. - chapter21 Active/Passive: 'from rl4e import *' -> aima.reinforcement_learning. - chapter22 nlp_apps/Parsing: add the missing sys.path + import bootstrap. - chapter24 Image Edge Detection: define gaussian_filter = gaussian_kernel_2D(). Docs (file repositioning + convergence): README algorithm-index links repointed to aima/ and de-suffixed (mdp4e->mdp, game_theory4e->game_theory, FOIL_container ->FOILContainer); edition wording marks the convergence done; CONTRIBUTING and the Sphinx index updated for the single-version aima/ layout. * Fix 3 pre-existing notebook logic bugs - search.ipynb: cell 112 redefines hill_climbing as a TSP-specific version (using two_opt), shadowing the library's generic one; the later Peak-Finding section then called it on a PeakFindingProblem (no two_opt) and failed. Re-import the library hill_climbing right before that section. - chapter22/Parsing.ipynb: CYK_parse returns a probability table (defaultdict(float)), but the cells called .leaves on the float values. Display the probabilities instead (full table; VP entries). - chapter19/Optimizer and Backpropagation.ipynb: pseudocode() is a string API (e.g. pseudocode('Back-Prop-Learning')); pseudocode(adam) passed a function and Adam has no aima-pseudocode entry. Dropped it; psource(adam) still shows the implementation. All three now run clean headless; no module changes (test suite unaffected). * Notebook deps + version-compat fixes (graphviz, opencv-contrib, ipywidgets, kNN) (a) Dependencies: - requirements.txt: opencv-python -> opencv-contrib-python (provides cv2.ximgproc, needed by chapter24/Objects in Images), and add graphviz (viterbi_algorithm). - README: note that the graphviz PyPI pkg is only a wrapper; the 'dot' system binary must be installed separately for notebook rendering. (b) Version-compat / logic: - mdp.ipynb & chapter16-17/Algorithms for MDPs.ipynb: the interactive() call passed 'Visualize=' but make_visualize's callback parameter is 'visualize' (lowercase); newer ipywidgets errors on the unmatched name. Fixed the case. - aima/learning.py NearestNeighborLearner: heapq.nsmallest compared (distance, example) tuples, so equal-distance ties compared the examples themselves -> numpy arrays (e.g. MNIST images) raise 'truth value is ambiguous'. Add an enumerate() index as a tiebreaker so payloads are never compared. Fixes learning_apps.ipynb; full suite still 393 passed. mdp, chapter16-17/Algorithms and learning_apps now run clean. chapter24/Objects' cv2.ximgproc gap is resolved (remaining failure is a slow model/selective-search cell); viterbi now only needs the system 'dot' binary.
1 parent 1eb8b26 commit a84722e

141 files changed

Lines changed: 1716 additions & 20924 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In more detail:
2828

2929
## Editions: target the 4th edition
3030

31-
We are **not** maintaining two parallel editions. As [Peter Norvig stated](https://github.com/aimacode/aima-python/issues/1188#issuecomment-641669882), all new work should move toward the 4th edition. When a module exists as a pair (e.g. `agents.py` / `agents4e.py`), prefer adding 4e content; don't extend the 3e-only version. We are converging on a single, 4e version per module. See the *Edition policy* section in the README for details.
31+
We are **not** maintaining two parallel editions. As [Peter Norvig stated](https://github.com/aimacode/aima-python/issues/1188#issuecomment-641669882), all new work should move toward the 4th edition. The old 3e/4e module pairs have now been **merged into a single version per topic** (no `*4e.py` files remain), and every module lives in the importable `aima/` package. Add new 4e content directly to the relevant module (e.g. `aima/search.py`); don't reintroduce edition-suffixed files. See the *Edition policy* section in the README for details.
3232

3333
## New and Improved Algorithms
3434

@@ -43,7 +43,7 @@ In this project we use Jupyter/IPython Notebooks to showcase the algorithms in t
4343
- Proofread the notebooks for grammar mistakes, typos, or general errors.
4444
- Move visualization and unrelated to the algorithm code from notebooks to `notebook_utils.py` (a file used to store code for the notebooks, like visualization and other miscellaneous stuff). Make sure the notebooks still work and have their outputs showing!
4545
- Replace the `%psource` magic notebook command with the function `psource` from `notebook_utils.py` where needed. Examples where this is useful are a) when we want to show code for algorithm implementation and b) when we have consecutive cells with the magic keyword (in this case, if the code is large, it's best to leave the output hidden).
46-
- Add the function `pseudocode(algorithm_name)` in algorithm sections. The function prints the pseudocode of the algorithm. You can see some example usage in [`knowledge.ipynb`](https://github.com/aimacode/aima-python/blob/master/knowledge.ipynb).
46+
- Add the function `pseudocode(algorithm_name)` in algorithm sections. The function prints the pseudocode of the algorithm. You can see some example usage in [`knowledge_current_best.ipynb`](https://github.com/aimacode/aima-python/blob/master/notebooks/knowledge_current_best.ipynb).
4747
- Edit existing sections for algorithms to add more information and/or examples.
4848
- Add visualizations for algorithms. The visualization code should go in `notebook_utils.py` to keep things clean.
4949
- Add new sections for algorithms not yet covered. The general format we use in the notebooks is the following: First start with an overview of the algorithm, printing the pseudocode and explaining how it works. Then, add some implementation details, including showing the code (using `psource`). Finally, add examples for the implementations, showing how the algorithms work. Don't fret with adding complex, real-world examples; the project is meant for educational purposes. You can of course choose another format if something better suits an algorithm.

‎README.md‎

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@ The 4th edition of the book is out now in 2020, and thus we are updating the cod
1616
**Edition policy (3rd vs 4th).** As [Peter Norvig stated](https://github.com/aimacode/aima-python/issues/1188#issuecomment-641669882), we are *not* maintaining two parallel editions — all new work should move toward the 4th edition. Concretely:
1717

1818
- The **4th edition is canonical**: new algorithms, fixes and pseudocode references should follow the 4e numbering and content.
19-
- Some modules still come in pairs (e.g. `agents.py` / `agents4e.py`). The unsuffixed modules are the primary, fully-tested base that the notebooks and tests use today; the `*4e.py` modules carry 4e-specific ports and algorithms not present in the 3e files. We are **converging on a single version per module**; until that migration is complete, prefer adding 4e content over extending the 3e-only versions.
20-
- New 4th-edition-only material (e.g. `deep_learning4e.py`, `game_theory4e.py`, `perception4e.py`) lives directly in its 4e module.
19+
- The 3e/4e split is **done**: there is now a **single version per module** (no `*4e.py` files remain). The old 3e/4e pairs have been merged — the canonical implementation was kept and any genuinely-new 4e algorithms were folded in — and the 4e-only modules (`deep_learning.py`, `game_theory.py`, `making_simple_decisions.py`, `perception.py`) were de-suffixed. Add new 4e content directly to the relevant module.
2120

2221

2322

2423
# Structure of the Project
2524

26-
When complete, this project will have Python implementations for all the pseudocode algorithms in the book, as well as tests and examples of use. For each major topic, such as `search`, we provide the following files:
25+
When complete, this project will have Python implementations for all the pseudocode algorithms in the book, as well as tests and examples of use. The code is organised into three top-level folders:
2726

28-
- `search.ipynb` and `search.py`: Implementations of all the pseudocode algorithms, and necessary support functions/classes/data. The `.py` file is generated automatically from the `.ipynb` file; the idea is that it is easier to read the documentation in the `.ipynb` file.
29-
- `search_XX.ipynb`: Notebooks that show how to use the code, broken out into various topics (the `XX`).
30-
- `tests/test_search.py`: A lightweight test suite, using `assert` statements, designed for use with [`py.test`](http://pytest.org/latest/), but also usable on their own.
27+
- **`aima/`** — the importable Python package: one module per major topic (e.g. `aima/search.py`) with the implementations of the pseudocode algorithms and their support functions/classes/data.
28+
- **`notebooks/`** — the Jupyter notebooks that explain and demonstrate the code (e.g. `notebooks/search.ipynb`), plus the per-chapter `notebooks/chapterNN/` demos. Each notebook starts with a small bootstrap cell so it runs correctly from the `notebooks/` folder (it `chdir`s to the repo root so `from aima import ...` and the `aima-data/`/`images/` paths resolve).
29+
- **`tests/`** — a lightweight test suite (e.g. `tests/test_search.py`), using `assert` statements, designed for use with [`py.test`](http://pytest.org/latest/) but also usable on their own.
3130

3231
# Python 3.9 and up
3332

3433
The code for the 3rd edition was in Python 3.5; the 4th edition code targets Python 3.7 and runs on Python 3.9 and up, but does not run in Python 2. Continuous integration runs the full test suite (including the deep-learning modules) on Python 3.9, 3.10, 3.11 and 3.12; note that some optional dependencies (`tensorflow`, `keras`, `opencv-python`) do not yet ship wheels for the very latest releases (3.13+), so one of those versions is recommended for running everything. You can [install Python](https://www.python.org/downloads) or use a browser-based Python interpreter such as [repl.it](https://repl.it/languages/python3).
35-
You can run the code in an IDE, or from the command line with `python -i filename.py` where the `-i` option puts you in an interactive loop where you can run Python functions. All notebooks are available in a [binder environment](https://mybinder.org/v2/gh/aimacode/aima-python/master). Alternatively, visit [jupyter.org](http://jupyter.org/) for instructions on setting up your own Jupyter notebook environment.
34+
The algorithms live in the `aima` package, so you import them as `from aima.search import astar_search` (or `from aima import search`). You can install the package in editable mode with `pip install -e .` and then run the code in an IDE, or from the command line with `python -i -m aima.search` where the `-i` option puts you in an interactive loop where you can run Python functions. All notebooks are available in a [binder environment](https://mybinder.org/v2/gh/aimacode/aima-python/master). Alternatively, visit [jupyter.org](http://jupyter.org/) for instructions on setting up your own Jupyter notebook environment.
3635

3736
Features from Python 3.6 and 3.7 that we will be using for this version of the code:
3837
- [f-strings](https://docs.python.org/3.6/whatsnew/3.6.html#whatsnew36-pep498): all string formatting should be done with `f'var = {var}'`, not with `'var = {}'.format(var)` nor `'var = %s' % var`.
@@ -57,6 +56,10 @@ cd aima-python
5756
pip install -r requirements.txt
5857
```
5958

59+
A couple of notebooks also need the [Graphviz](https://graphviz.org/download/) system
60+
binary (`dot`) for rendering — the `graphviz` PyPI package is only a wrapper. Install it
61+
with your OS package manager if needed (e.g. `apt install graphviz`, `brew install graphviz`).
62+
6063
You also need to fetch the datasets from the [`aima-data`](https://github.com/aimacode/aima-data) repository:
6164

6265
```
@@ -77,7 +80,7 @@ And you are good to go!
7780

7881
# Index of Algorithms
7982

80-
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 originally made for the third edition of the book; per the edition policy above, the project is converging on the fourth edition (4e modules and numbering). 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. Another great place for contributors to start is by adding tests and writing on the notebooks. You can see which algorithms have tests and notebook sections below. If the algorithm you want to work on is covered, don't worry! You can still add more tests and provide some examples of use in the notebook!
83+
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 originally made for the third edition of the book; per the edition policy above, the project has converged on the fourth edition (4th-edition content, a single module per topic, all under the `aima/` package). 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. Another great place for contributors to start is by adding tests and writing on the notebooks. You can see which algorithms have tests and notebook sections below. If the algorithm you want to work on is covered, don't worry! You can still add more tests and provide some examples of use in the notebook!
8184

8285
| **Figure** | **Name (in 3<sup>rd</sup> edition)** | **Name (in repository)** | **File** | **Tests** | **Notebook**
8386
|:-------|:----------------------------------|:------------------------------|:--------------------------------|:-----|:---------|
@@ -159,16 +162,16 @@ Here is a table of algorithms, the figure, name of the algorithm in the book and
159162
| 17.4 | Value-Iteration | `value_iteration` | [`mdp.py`][mdp] | Done | Included |
160163
| 17.7 | Policy-Iteration | `policy_iteration` | [`mdp.py`][mdp] | Done | Included |
161164
| 17.9 | POMDP-Value-Iteration | `pomdp_value_iteration` | [`mdp.py`][mdp] | Done | Included |
162-
| 17.4 | Dynamic-Decision-Network | `pomdp_lookahead` | [`mdp4e.py`](mdp4e.py) | Done | Included |
163-
| 18.2 | Iterated-Dominance | `iterated_dominance` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
164-
| 18.2 | Pure-Nash-Equilibria | `pure_nash_equilibria` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
165-
| 18.2 | Zero-Sum-Game (LP) | `solve_zero_sum_game` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
166-
| 18.3 | Shapley-Value | `shapley_value` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
167-
| 18.3 | Core (cooperative game) | `is_in_core` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
168-
| 18.4 | Voting (plurality/Borda/Condorcet)| `plurality_winner` etc. | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
169-
| 18.4 | Vickrey-Auction | `vickrey_auction` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
170-
| 18.4.1 | Contract-Net-Protocol | `contract_net` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
171-
| 18.4.4 | Alternating-Offers-Bargaining | `alternating_offers_bargaining` | [`game_theory4e.py`](game_theory4e.py) | Done | Included |
165+
| 17.4 | Dynamic-Decision-Network | `pomdp_lookahead` | [`mdp.py`](aima/mdp.py) | Done | Included |
166+
| 18.2 | Iterated-Dominance | `iterated_dominance` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
167+
| 18.2 | Pure-Nash-Equilibria | `pure_nash_equilibria` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
168+
| 18.2 | Zero-Sum-Game (LP) | `solve_zero_sum_game` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
169+
| 18.3 | Shapley-Value | `shapley_value` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
170+
| 18.3 | Core (cooperative game) | `is_in_core` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
171+
| 18.4 | Voting (plurality/Borda/Condorcet)| `plurality_winner` etc. | [`game_theory.py`](aima/game_theory.py) | Done | Included |
172+
| 18.4 | Vickrey-Auction | `vickrey_auction` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
173+
| 18.4.1 | Contract-Net-Protocol | `contract_net` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
174+
| 18.4.4 | Alternating-Offers-Bargaining | `alternating_offers_bargaining` | [`game_theory.py`](aima/game_theory.py) | Done | Included |
172175
| 18.5 | Decision-Tree-Learning | `DecisionTreeLearner` | [`learning.py`][learning] | Done | Included |
173176
| 18.8 | Cross-Validation | `cross_validation` | [`learning.py`][learning] | Done | Included |
174177
| 18.11 | Decision-List-Learning | `DecisionListLearner` | [`learning.py`][learning] | Done | Included |
@@ -177,10 +180,10 @@ Here is a table of algorithms, the figure, name of the algorithm in the book and
177180
| 20.X | EM (Mixture of Gaussians) | `gaussian_mixture_em` | [`learning.py`][learning] | Done | Included |
178181
| 20.3.2 | EM (Bayes net hidden variable) | `naive_bayes_em` | [`learning.py`][learning] | Done | Included |
179182
| 20.3 | Baum-Welch (HMM learning) | `baum_welch` | [`probability.py`][probability] | Done | Included |
180-
| 19.2 | Current-Best-Learning | `current_best_learning` | [`knowledge.py`](knowledge.py) | Done | Included |
181-
| 19.3 | Version-Space-Learning | `version_space_learning` | [`knowledge.py`](knowledge.py) | Done | Included |
182-
| 19.8 | Minimal-Consistent-Det | `minimal_consistent_det` | [`knowledge.py`](knowledge.py) | Done | Included |
183-
| 19.12 | FOIL | `FOIL_container` | [`knowledge.py`](knowledge.py) | Done | Included |
183+
| 19.2 | Current-Best-Learning | `current_best_learning` | [`knowledge.py`](aima/knowledge.py) | Done | Included |
184+
| 19.3 | Version-Space-Learning | `version_space_learning` | [`knowledge.py`](aima/knowledge.py) | Done | Included |
185+
| 19.8 | Minimal-Consistent-Det | `minimal_consistent_det` | [`knowledge.py`](aima/knowledge.py) | Done | Included |
186+
| 19.12 | FOIL | `FOILContainer` | [`knowledge.py`](aima/knowledge.py) | Done | Included |
184187
| 21.2 | Passive-ADP-Agent | `PassiveADPAgent` | [`reinforcement_learning.py`][rl] | Done | Included |
185188
| 21.4 | Passive-TD-Agent | `PassiveTDAgent` | [`reinforcement_learning.py`][rl] | Done | Included |
186189
| 21.8 | Q-Learning-Agent | `QLearningAgent` | [`reinforcement_learning.py`][rl] | Done | Included |
@@ -212,18 +215,18 @@ Here is a table of the implemented data structures, the figure, name of the impl
212215
Many thanks for contributions over the years. I got bug reports, corrected code, and other support from Darius Bacon, Phil Ruggera, Peng Shao, Amit Patil, Ted Nienstedt, Jim Martin, Ben Catanzariti, and others. Now that the project is on GitHub, you can see the [contributors](https://github.com/aimacode/aima-python/graphs/contributors) who are doing a great job of actively improving the project. Many thanks to all contributors, especially [@darius](https://github.com/darius), [@SnShine](https://github.com/SnShine), [@reachtarunhere](https://github.com/reachtarunhere), [@antmarakis](https://github.com/antmarakis), [@Chipe1](https://github.com/Chipe1), [@ad71](https://github.com/ad71) and [@MariannaSpyrakou](https://github.com/MariannaSpyrakou).
213216

214217
<!---Reference Links-->
215-
[agents]:../master/agents.py
216-
[csp]:../master/csp.py
217-
[games]:../master/games.py
218+
[agents]:../master/aima/agents.py
219+
[csp]:../master/aima/csp.py
220+
[games]:../master/aima/games.py
218221
[grid]:../master/grid.py
219-
[knowledge]:../master/knowledge.py
220-
[learning]:../master/learning.py
221-
[logic]:../master/logic.py
222-
[mdp]:../master/mdp.py
223-
[nlp]:../master/nlp.py
224-
[planning]:../master/planning.py
225-
[probability]:../master/probability.py
226-
[rl]:../master/reinforcement_learning.py
227-
[search]:../master/search.py
228-
[utils]:../master/utils.py
229-
[text]:../master/text.py
222+
[knowledge]:../master/aima/knowledge.py
223+
[learning]:../master/aima/learning.py
224+
[logic]:../master/aima/logic.py
225+
[mdp]:../master/aima/mdp.py
226+
[nlp]:../master/aima/nlp.py
227+
[planning]:../master/aima/planning.py
228+
[probability]:../master/aima/probability.py
229+
[rl]:../master/aima/reinforcement_learning.py
230+
[search]:../master/aima/search.py
231+
[utils]:../master/aima/utils.py
232+
[text]:../master/aima/text.py

0 commit comments

Comments
 (0)