Commit 5d3a95c
added csp, logic, planning and probability .ipynb (#1130)
* 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 #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
* added conflict-driven clause learning sat solver
* added tests for cdcl and heuristics
* fixed probability.py
* fixed import
* fixed kakuro
* added Martelli and Montanari rule-based unification algorithm
* removed duplicate standardize_variables
* renamed variables known as built-in functions
* fixed typos in learning.py
* renamed some files and fixed typos
* fixed typos
* fixed typos
* fixed tests
* removed unify_mm
* remove unnecessary brackets
* fixed tests
* moved utility functions to utils.py
* fixed typos
* moved utils function to utils.py, separated probability learning classes from learning.py, fixed typos and fixed imports in .ipynb files
* added missing learners
* fixed Travis build
* fixed typos
* fixed typos
* fixed typos
* fixed typos
* fixed typos in agents files
* fixed imports in agent files
* fixed deep learning .ipynb imports
* fixed typos
* added .ipynb and fixed typos
* adapted code for .ipynb
* fixed typos
* updated .ipynb
* updated .ipynb
* updated logic.py
* updated .ipynb
* updated .ipynb
* updated planning.py
* updated inf definition
* fixed typos
* fixed typos
* fixed typos
* fixed typos
* Revert "fixed typos"
This reverts commit 658309d.
* Revert "fixed typos"
This reverts commit 08ad660.
* fixed typos
* fixed typos
* fixed typos
* fixed typos
* fixed typos and utils imports in *4e.py files1 parent 9c2ffe3 commit 5d3a95c
File tree
29 files changed
+7976
-475
lines changed- tests
29 files changed
+7976
-475
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
190 | | - | |
191 | | - | |
| 189 | + | |
| 190 | + | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | | - | |
| 246 | + | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
| |||
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
258 | | - | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| |||
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
283 | | - | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | | - | |
348 | | - | |
349 | | - | |
| 348 | + | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
| 581 | + | |
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
| 589 | + | |
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
| 627 | + | |
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
709 | | - | |
| 709 | + | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
| 712 | + | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
749 | | - | |
| 749 | + | |
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
| 540 | + | |
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
| 544 | + | |
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| |||
0 commit comments