solver: select skyline candidate policy

Make candidate ordering an explicit deterministic policy and benchmark ascending, descending, and exact-width-first choices. Keep ascending as the default because it produces the best measured time to first solution despite best-fit's slightly smaller tree.

Retain the benchmark v1 interface and document why randomized and duplicate-work portfolio policies are deferred.

Tests: Release and Debug CTest (10 passed each)

Refs: #12
This commit was merged in pull request #24.
This commit is contained in:
Codex instance
2026-07-30 18:07:29 +01:00
parent d751d1b13e
commit 74bde266d0
6 changed files with 141 additions and 49 deletions
+7 -6
View File
@@ -79,11 +79,11 @@ def environment(binary):
}
def run_once(binary, order, mode, candidate_order, search_route, timeout):
def run_once(binary, order, mode, search_policy, search_route, timeout):
started = time.monotonic()
try:
process = subprocess.run(
[str(binary), str(order), mode, candidate_order, search_route],
[str(binary), str(order), mode, search_policy, search_route],
check=False,
capture_output=True,
text=True,
@@ -218,7 +218,8 @@ def main():
parser.add_argument("--timeout", type=float, default=600.0)
parser.add_argument(
"--candidate-order",
choices=("ascending", "descending"),
dest="search_policy",
choices=("ascending", "descending", "best-fit"),
default="ascending",
)
parser.add_argument("--direct-search", action="store_true")
@@ -251,7 +252,7 @@ def main():
args.binary,
order,
mode,
args.candidate_order,
args.search_policy,
"direct" if args.direct_search else "public",
args.timeout,
)
@@ -262,7 +263,7 @@ def main():
args.binary,
order,
mode,
args.candidate_order,
args.search_policy,
"direct" if args.direct_search else "public",
args.timeout,
)
@@ -290,7 +291,7 @@ def main():
"warmup_runs": args.warmup,
"measured_repetitions": args.repetitions,
"per_run_timeout_seconds": args.timeout,
"candidate_order": args.candidate_order,
"candidate_order": args.search_policy,
"search_route": "direct" if args.direct_search else "public",
"stdout": "captured; rendered grid suppressed by probe",
},