Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dmeoli
Copy link
Contributor

@dmeoli dmeoli commented Sep 12, 2019

  • fixed planning.py: expanded_actions( ) generates actions which doesn't satisfy the arguments' domain #1111
  • added the CSPlan [Section 10.4.3] with the definition of a CSP with n-ary constraints and some problems including the cryptarithmetic puzzle T W O + T W O = F O U R [Figure 6.2]
  • AC3b, an improved version of AC-3 with double-support check domain-heuristic which has the same complexity of AC-3, O(cd^3), but is faster on average cases
  • AC4 (page 210, footnote 1) which runs in O(cd^2) worst-case time but can be slower than AC-3 on average cases

dmeoli added 30 commits March 24, 2019 17:03
Changed queue to set in AC3 (as in the pseudocode of the original algorithm) to reduce the number of consistency-check due to the redundancy of the same arcs in queue. For example, on the harder1 configuration of the Sudoku CSP the number consistency-check has been reduced from 40464 to 12562!
AC3 algorithm has non-optimal worst case time-complexity O(cd^3 ), while AC4 algorithm runs in O(cd^2) worst case time
…he constant propagation algorithm in mac inference
… are already present in test_csp.py"

This reverts commit b3cd24c.
…oosing the constant propagation algorithm in mac inference"

This reverts commit 6986247.
This reverts commit 6641c2c.
@dmeoli dmeoli changed the title fixed expanded_actions( ), added CSPlan and tests with NaryCSP definition fixed expanded_actions( ), added CSPlan with n-ary CSP definition and tests Sep 12, 2019
Copy link
Collaborator

@antmarakis antmarakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall pretty good, but I want to double-check whether the @staticmethod markers can be removed or not. I would like to keep code as consistent as possible, and if the program runs without them, then they should be removed.

@dmeoli
Copy link
Contributor Author

dmeoli commented Sep 15, 2019 via email

@dmeoli dmeoli changed the title fixed expanded_actions( ), added CSPlan with n-ary CSP definition and tests fixed expanded_actions( ), added CSPlan with n-ary CSP definition, problems and tests, AC3b and AC4 with tests Sep 15, 2019
@antmarakis antmarakis merged commit 440142c into aimacode:master Sep 16, 2019
dj5x5 pushed a commit to dj5x5/aima-python that referenced this pull request Jul 17, 2025
…oblems and tests, AC3b and AC4 with tests (aimacode#1113)

* changed queue to set in AC3

Changed queue to set in AC3 (as in the pseudocode of the original algorithm) to reduce the number of consistency-check due to the redundancy of the same arcs in queue. For example, on the harder1 configuration of the Sudoku CSP the number consistency-check has been reduced from 40464 to 12562!

* re-added test commented by mistake

* added the mentioned AC4 algorithm for constraint propagation

AC3 algorithm has non-optimal worst case time-complexity O(cd^3 ), while AC4 algorithm runs in O(cd^2) worst case time

* added doctest in Sudoku for AC4 and and the possibility of choosing the constant propagation algorithm in mac inference

* removed useless doctest for AC4 in Sudoku because AC4's tests are already present in test_csp.py

* added map coloring SAT problems

* fixed typo errors and removed unnecessary brackets

* reformulated the map coloring problem

* Revert "reformulated the map coloring problem"

This reverts commit 20ab0e5.

* Revert "fixed typo errors and removed unnecessary brackets"

This reverts commit f743146.

* Revert "added map coloring SAT problems"

This reverts commit 9e0fa55.

* Revert "removed useless doctest for AC4 in Sudoku because AC4's tests are already present in test_csp.py"

This reverts commit b3cd24c.

* Revert "added doctest in Sudoku for AC4 and and the possibility of choosing the constant propagation algorithm in mac inference"

This reverts commit 6986247.

* Revert "added the mentioned AC4 algorithm for constraint propagation"

This reverts commit 03551fb.

* added map coloring SAT problem

* fixed build error

* Revert "added map coloring SAT problem"

This reverts commit 93af259.

* Revert "fixed build error"

This reverts commit 6641c2c.

* added map coloring SAT problem

* removed redundant parentheses

* added Viterbi algorithm

* added monkey & bananas planning problem

* simplified condition in search.py

* added tests for monkey & bananas planning problem

* removed monkey & bananas planning problem

* Revert "removed monkey & bananas planning problem"

This reverts commit 9d37ae0.

* Revert "added tests for monkey & bananas planning problem"

This reverts commit 24041e9.

* Revert "simplified condition in search.py"

This reverts commit 6d229ce.

* Revert "added monkey & bananas planning problem"

This reverts commit c74933a.

* defined the PlanningProblem as a specialization of a search.Problem & fixed typo errors

* fixed doctest in logic.py

* fixed doctest for cascade_distribution

* added ForwardPlanner and tests

* added __lt__ implementation for Expr

* added more tests

* renamed forward planner

* Revert "renamed forward planner"

This reverts commit c4139e5.

* renamed forward planner class & added doc

* added backward planner and tests

* fixed mdp4e.py doctests

* removed ignore_delete_lists_heuristic flag

* fixed heuristic for forward and backward planners

* added SATPlan and tests

* fixed ignore delete lists heuristic in forward and backward planners

* fixed backward planner and added tests

* updated doc

* added nary csp definition and examples

* added CSPlan and tests

* fixed CSPlan

* added book's cryptarithmetic puzzle example

* fixed typo errors in test_csp

* fixed aimacode#1111

* added sortedcontainers to yml and doc to CSPlan

* added tests for n-ary csp

* fixed utils.extend

* updated test_probability.py

* converted static methods to functions

* added AC3b and AC4 with heuristic and tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

planning.py: expanded_actions( ) generates actions which doesn't satisfy the arguments' domain
2 participants