"""Run from the repository root: python3 routes/wutao-n14/generate.py""" import importlib.util from pathlib import Path root = Path(__file__).resolve().parents[2] spec = importlib.util.spec_from_file_location("search", root / "examples/search.py") search = importlib.util.module_from_spec(spec) spec.loader.exec_module(search) best, points = search.anneal(14, 17, 100000) Path(__file__).with_name("n14.txt").write_text( "# Provided simulated annealing; n=14 seed=17 steps=100000; full float precision\n" + "".join(f"{x:.17g} {y:.17g}\n" for x, y in points)) print(f"Floating search objective: {best:.17g}")