blue wrote:Oops ... I messed up again
Ha, I envy the quality of your mess-ups, and would gladly trade them for mine! The Mathimagics Mess-up is usually of the "gross logical blunder" variety.
Well, it was all down to encoding in the end, particularly MY encoding, which was quite OK as it turns out,
but had a bug which caused it to generate far too many clauses (36K vs 14K)! Unfortunately for me, these were merely redundant, not inconsistent with the puzzle definition. So it was just like driving with the handbrake full on.
I would probably never have found it without you pointing out the time discrepancy!
In the end, "variable compaction" (reducing the SAT variables from 4096 to 1045 in this case) was a non-issue (although it is still rather elegant!), and binary-encoding of the "exactly 1 of" clauses also seems to make little difference here. But at these speeds this is an appearance that could be deceptive ...
For the 20 puzzles, I now get a total time (32-bit mode DLL) of
0.062s for "SolveU",
4.047s for "Check Minimal". That's with my original encoding method (with bug fix). I can't test Win64 mode just now, I have yet to make a C version of the CNF generator function.
That changes the SAT vs
dSolver16 comparison completely, ie estimates for the full "Check Minimal" job on tarek's data. SAT might give close to 300 puzzles per minute if it keeps that up, while my best rate for
dSolver16 is currently 250, and that with only 55% of the set actually resolved.
SAT could do the entire job in just 50-60 CPU hours it seems! Throwing 4 cores at it, this reduces to just 12-15 hours.
I have a prototype of an alternative NCS strategy that looks promising - dramatic reductions in time for minimality checking for some BGS cases (825s reduced to 22s, 2600s reduced to 160s). But the bar has been raised by SAT. Matching it will definitely be a challenge …
Cheers!