33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
"""问题三冻结基准集配对对比:bayes(最优) vs grid(基线) vs seven(中间)。"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from project.common import (RESULTS_DIR, closed_loop_payload, episodes_markdown,
|
|
execute_variants, problem_config, write_json,
|
|
write_text)
|
|
from project.q3 import baseline, optimal
|
|
|
|
VARIANTS = (
|
|
("optimal", optimal.build_loop),
|
|
("seven", baseline.build_seven),
|
|
("baseline", baseline.build_grid),
|
|
)
|
|
LABELS = [label for label, _ in VARIANTS]
|
|
BASE_LABEL = "baseline"
|
|
|
|
|
|
def run(quick: bool = False) -> dict:
|
|
from mcm26b.harness.suites import suite
|
|
scenes = suite("core", 3)
|
|
if quick:
|
|
scenes = scenes[:6]
|
|
config = problem_config()
|
|
rows = execute_variants(scenes, VARIANTS, config)
|
|
payload = closed_loop_payload(3, "core", scenes, VARIANTS, rows,
|
|
LABELS, BASE_LABEL, config)
|
|
write_json(RESULTS_DIR / "q3.json", payload)
|
|
write_text(RESULTS_DIR / "q3.md",
|
|
episodes_markdown("问题三:全向闭环配对对比(core 基准集)",
|
|
rows, LABELS, BASE_LABEL))
|
|
return payload
|