Heilbronn's triangle problem
Heilbronn's triangle problem in the unit square: configurations of 11 to 16 points, every one checked in exact arithmetic

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