Implement missing 4th-edition algorithms (game theory, EM, Kalman, DBN, DDN, SARSA) with tests and demo notebooks, plus bug fixes and CI modernization#1323
Open
dmeoli wants to merge 283 commits into
Open
Conversation
… fixed typo errors
This reverts commit c4139e5.
…laky value_iteration test
…, Vickrey auction)
…point, battle of the sexes, stag hunt, DBN sequence, Kalman steady state)
Contributor
Author
Cover the previously untested non-book algorithms so they match the baseline test coverage: - test_dpll_branching_heuristics / test_cdcl_restart_strategies exercise every branching heuristic (moms, momsf, posit, dlis, dlcs, jw, jw2, zm) and restart strategy (no_restart, luby, glucose) on small SAT/UNSAT instances. - test_nary_csp, test_ac_solver_classes, test_crossword, test_kakuro cover NaryCSP/Constraint, the ACSolver/ACSearchSolver classes directly, and the Crossword/Kakuro models.
- game_theory.py -> game_theory4e.py (module written against 4th-edition chapter 18 numbering, consistent with the other 4e-structured modules); test file, notebook and README links updated accordingly. - making_simple_decision4e.py -> making_simple_decisions4e.py to match the book chapter title 'Making Simple Decisions'. - planning_graphPlan.ipynb -> planning_graph_plan.ipynb and knowledge_FOIL.ipynb -> knowledge_foil.ipynb (snake_case). - images/pluralityLearner_plot.png and images/knowledge_FOIL_grandparent.png renamed to snake_case; notebook references updated.
Make function and variable names consistent with the snake_case style used across the rest of the codebase: - planning.py: the *_graphPlan example helpers become *_graph_plan, plus graphPlan_solution, initialPlan, nConstraints, nPartial. - nlp.py: loadPageHTML, initPages, stripRawHTML, determineInlinks, findOutlinks, onlyWikipediaURLS, getInLinks, getOutLinks and their local variables (pagesIndex, pagesContent, inLinks, outLinks, etc.). - Updated all call sites in tests and notebooks, and snake_cased the affected test names and test-local variables. Class names (PascalCase) and the canvas strokeWidth method, which mirrors the JS canvas API, are intentionally left unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fills in several algorithms from the 4th edition that were not yet implemented, adds tests (including cases taken from the book and the 3rd-edition solutions manual) and runnable demo notebooks, fixes a few bugs, and modernizes the CI. The full test suite passes (446 tests).
New algorithms
game_theory.py (new module) - Chapter 18, Multiagent Decision Making
probability.py
learning.py
mdp4e.py
reinforcement_learning.py and reinforcement_learning4e.py
Bug fixes
Tests
steady-state variance
Demo notebooks
Cleanup
CI