Gather data
This commit is contained in:
@@ -79,7 +79,7 @@ public class Main {
|
||||
}
|
||||
|
||||
section("Result");
|
||||
info(String.format(Locale.ROOT, "simplicity : %.2f", res.filled().simplicity()));
|
||||
info(String.format(Locale.ROOT, "simplicity : %.2f", res.filled().stats().simplicity));
|
||||
|
||||
section("Mask");
|
||||
System.out.print(indentLines(res.mask().gridToString(), " "));
|
||||
@@ -347,12 +347,12 @@ public class Main {
|
||||
TOTAL_BACKTRACKS.addAndGet(filled.stats().backtracks);
|
||||
if (filled.ok()) {
|
||||
TOTAL_SUCCESS.incrementAndGet();
|
||||
TOTAL_SIMPLICITY.addAndGet((long) (filled.simplicity() * 100));
|
||||
TOTAL_SIMPLICITY.addAndGet((long) (filled.stats().simplicity * 100));
|
||||
}
|
||||
|
||||
var name = Thread.currentThread().getName();
|
||||
var status = filled.ok() ? "SUCCESS" : "FAILED";
|
||||
var simplicity = String.format(Locale.ROOT, "%.2f", filled.simplicity());
|
||||
var simplicity = String.format(Locale.ROOT, "%.2f", filled.stats().simplicity);
|
||||
var nps = (int) (filled.stats().nodes / Math.max(0.001, filled.stats().seconds));
|
||||
|
||||
System.out.printf(Locale.ROOT,
|
||||
@@ -360,14 +360,14 @@ public class Main {
|
||||
name, status, filled.stats().nodes, filled.stats().backtracks, nps, simplicity, filled.stats().seconds
|
||||
);
|
||||
|
||||
if (filled.ok() && (opts.minSimplicity <= 0 || filled.simplicity() >= opts.minSimplicity)) {
|
||||
if (filled.ok() && (opts.minSimplicity <= 0 || filled.stats().simplicity >= opts.minSimplicity)) {
|
||||
return new PuzzleResult(swe, dict, new Gridded(mask), filled);
|
||||
}
|
||||
|
||||
if (opts.verbose && filled.ok()) {
|
||||
System.err.printf(Locale.ROOT,
|
||||
"simplicity : %.2f (below min %.2f)%n",
|
||||
filled.simplicity(), opts.minSimplicity
|
||||
filled.stats().simplicity, opts.minSimplicity
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user