-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Options for additional strategies #16
Conversation
i think this is out of date, newest version is 4.0.6 and i'm actually working on updating the codebase to that version so i can use the parallel stuff. lots and lots of stuff has changed since 3.3.3 |
You're right, Loco has fallen behind and should probably be updated to the latest Choco version. I'd welcome a pull request if you manage to port everything over. |
would you be able to explain the code changes in this patch? I'm still pretty new to choco and constraint solving. I have been able to partially update to 4.0.6, but some stuff was really over my head, so I got distracted and focused on other stuff, but now I'm able to work more on making the rest of the tests in the codebase pass, and I may be able to incorporate the changes in this patch, but I have to make tests for them first, which I'm not able to without a better understanding. |
@boxxxie sorry for the late response. The changes here are to allow setting different propagation strategies for the Choco engine. There are more details about what this means in the Choco docs. A majority of the code (in Strategies introduce a priority order to the search, which mostly helps performance, so I'm not totally sure how one could test them effectively. The value selectors are predictable enough that you could write test cases that verify that in scenarios with multiple solutions, the right solution is chosen first. e.g. (is (= {:x 5} (solution [($in :x 1 5)]
:strategy (strategy/custom :var-selector (strategy/lexico-var-selector)
:val-selector (strategy/max-value-selector))))) For the other less predictable ones (like the random selectors, or dom-over-w-deg) you could at least write some sanity checks for correctness, that verify they still work properly in basic success/failure cases and nothing out of the ordinary happens when you try to use that strategy. Hopefully that helps. |
hey, thanks a lot. |
@boxxxie any news ? |
I have a fork with 2 branches. one adds some functionality to choco 3 code, the other is a rewrite that adds lots of the choco 4 features, including tasks, sets, tuples. I will have to add the real number stuff soon too, but it takes a long time to do all this. choco 4 just has a ton of features |
@boxxxie Any plans to make a PR? I had a look at your fork and the |
@yuhan0 i want to do some cleanup and finish some features once i find some more time to work on it, i think i'll be able to produce a PR soon. in it's current state, many things are working. anything using my fancy test macro should be working. |
Closing this PR to avoid clutter as I don't anticipate working on this in the near future, but more PRs welcome if someone else wants to take it over the line. |
My progress as I add the capability to choose "propagation strategy" in Loco. End goal is to provide all options Choco provides. WIP
(fixes #11)