Skip to content
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

How to get non-deterministic solutions? #27

Open
bergwerf opened this issue Sep 21, 2021 · 1 comment
Open

How to get non-deterministic solutions? #27

bergwerf opened this issue Sep 21, 2021 · 1 comment

Comments

@bergwerf
Copy link

I want to use mSAT to solve (a lot of) quite small CNFs (~40 variables), but I want to get non-deterministic solutions (e.g. a uniform pick from the set of solutions). Could I (easily) do that with this library? I appreciate all suggestions :).

@Gbury
Copy link
Owner

Gbury commented Sep 21, 2021

I haven't yet thought about this use-case.
Currently, I'd say you can get some amount of non-determinism by randomizing the order in which you add clauses to the solver (which will in turn randomize the order in which the variables are added to the heap, and thus which variables are decided on when there is a tie in the activity score, which is what should happen for all the first decisions, which is likely to significantly influence how the solver will explore the clauses, and thus the solution returned), but I haven't tried it before, so it'd probably be best to try it on some small hand-crafted examples and see whether it works.

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

No branches or pull requests

2 participants