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

Question regarding enumerating solutions #1

Open
MushroomHunting opened this issue Dec 5, 2023 · 0 comments
Open

Question regarding enumerating solutions #1

MushroomHunting opened this issue Dec 5, 2023 · 0 comments

Comments

@MushroomHunting
Copy link

Hi there!

Got a question regarding modifying the code to continually enumerate SAT solutions (if they exist).
As I currently understand once a SAT is found, self.decide() returns -1 (i.e. we've assigned all variables, and no conflict is found).
After that, there the check for SAT occurs

if var_decided == -1: 
   ...
   break

Which then exits the main loop leaving us with just the first found solution. However I want to continue enumerating more solutions if they exist. However I'm not sure the best way to modify the code to do so. I've got many open questions but don't know where to start: Would a new Stats object need to be instantiated for every new search? Does the found solution need to be converted to a new conflict clause? Is it possible to just call self.backtrack(0,None) to restart after adding the just-learned SAT as a conflict clause?

I would be grateful if you have some advice on the above

cheers!

P.S. This codebase a masterpiece of code and commentary... thanks for the awesome release

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

1 participant