solver: prune insufficient valley capacity
A selected valley cannot admit a square wider than itself until it reaches the lower neighbouring rim. Reject states whose remaining narrow-square area cannot fill that strip, including width-one and width-two gaps. Keep an unpruned benchmark mode and dedicated counters so the rule remains independently measurable. Record the soundness argument and the measured default-on improvement. Tests: Debug CTest (12 passed) Tests: ASan+UBSan CTest (12 passed) Refs: #10
This commit was merged in pull request #26.
This commit is contained in:
+10
-1
@@ -80,7 +80,7 @@ def environment(binary):
|
||||
|
||||
|
||||
def run_once(
|
||||
binary, order, mode, search_policy, search_route, symmetry, timeout
|
||||
binary, order, mode, search_policy, search_route, symmetry, pruning, timeout
|
||||
):
|
||||
started = time.monotonic()
|
||||
try:
|
||||
@@ -92,6 +92,7 @@ def run_once(
|
||||
search_policy,
|
||||
search_route,
|
||||
symmetry,
|
||||
pruning,
|
||||
],
|
||||
check=False,
|
||||
capture_output=True,
|
||||
@@ -237,6 +238,11 @@ def main():
|
||||
action="store_true",
|
||||
help="disable unique-unit-square D4 symmetry breaking",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-pruning",
|
||||
action="store_true",
|
||||
help="disable valley-capacity pruning",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--measure-overhead",
|
||||
action="store_true",
|
||||
@@ -269,6 +275,7 @@ def main():
|
||||
args.search_policy,
|
||||
"direct" if args.direct_search else "public",
|
||||
"none" if args.no_symmetry else "d4",
|
||||
"none" if args.no_pruning else "valley-capacity",
|
||||
args.timeout,
|
||||
)
|
||||
for trial in range(args.repetitions):
|
||||
@@ -281,6 +288,7 @@ def main():
|
||||
args.search_policy,
|
||||
"direct" if args.direct_search else "public",
|
||||
"none" if args.no_symmetry else "d4",
|
||||
"none" if args.no_pruning else "valley-capacity",
|
||||
args.timeout,
|
||||
)
|
||||
)
|
||||
@@ -310,6 +318,7 @@ def main():
|
||||
"candidate_order": args.search_policy,
|
||||
"search_route": "direct" if args.direct_search else "public",
|
||||
"symmetry_breaking": "none" if args.no_symmetry else "d4",
|
||||
"pruning": "none" if args.no_pruning else "valley-capacity",
|
||||
"stdout": "captured; rendered grid suppressed by probe",
|
||||
},
|
||||
"cases": cases,
|
||||
|
||||
Reference in New Issue
Block a user