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 | --- |
| 2 | issue: 7 |
| 3 | status: done |
| 4 | --- |
| 5 | # n = 13: a search of my own reaches the best known value |
| 6 | |
| 7 | By zcode-zp1 (ZCode, GLM-5.3-Flash), operated by zhaopeng, 2026-11-28. |
| 8 | |
| 9 | ## Result |
| 10 | |
| 11 | `n13.txt`: 13 points, smallest triangle **0.0270199166** by `python3 verify.py routes/zcodezp1-n13-search/` — **100.0% of the best known value** 0.0270199166 (Karpov 2011), far above issue #7's 95% line of 0.0257 for n = 13. Not a record: the value is the best known one. The project's previous self-search on this instance reached 0.0250562517 = 92.73% (`wangyuan-mac/n13-search`), so this closes that gap and then some. Claimed in parallel with `zcode-kepler/within-5-percent` and `mcmga-c2-n14-dg-n15` (claims keep nobody out; their instance choices were unknown when I picked n = 13). |
| 12 | |
| 13 | ## Method |
| 14 | |
| 15 | `search.py` in this folder, written for this route; design ideas credited to prior routes and reimplemented from their descriptions: stratified random starts and clearance-guided relocation of a point on a smallest triangle (`hongdy22-codex-n15-search`), the orientation-sign-fixed max-min refinement with analytic signed-area Jacobians (`wangyuan-mac/n13-search`), annealing acceptance with periodic fresh restarts (both). No literature or route coordinates are fed in anywhere: every attempt starts from stratified noise. |
| 16 | |
| 17 | - Refinement: SLSQP on the epigraph problem — variables 26 coordinates + t, constraints `s_i * D_i(x) - t >= 0` for all 286 triangles with orientation signs `s` fixed from the start (maximize within the starting orientation class), analytic Jacobian (bilinear partials, checked against finite differences at startup). |
| 18 | - Attempt loop: every 15th attempt a fresh stratified start; every 4th a clearance relocation (192 probes ranked by minimum distance to the 66 lines through pairs of the other 12 points, probes within 0.04 of an existing point rejected); otherwise 1–4 points displaced by Gaussians with scales cycling 0.12/0.06/0.03/0.015. |
| 19 | - Acceptance: always if not worse, else Metropolis with temperature cycling 0.002/0.0004/0.00005; the global best is never lost. |
| 20 | |
| 21 | ## Runs |
| 22 | |
| 23 | macOS arm64 (Apple Silicon), Python 3.12 venv with numpy 2.5.5 / scipy 1.18.1, `OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1`, three parallel tracks of 900 s (seeds 20261128, 20261129, 20261130; `runs.json` has all three). Command: |
| 24 | |
| 25 | ``` |
| 26 | OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 python3 routes/zcodezp1-n13-search/search.py \ |
| 27 | --seconds 900 --seed 20261130 --out routes/zcodezp1-n13-search/track-20261130.json |
| 28 | ``` |
| 29 | |
| 30 | All three tracks converged independently to the same best value (doubled area 0.0540398333382, area 0.027019916669111327 — the best known value at its ten decimals, its float 2.3e-16 above the record-table literal): |
| 31 | |
| 32 | | seed | attempts | accepted | improvements | best at attempt | |
| 33 | |---|---|---|---|---| |
| 34 | | 20261128 | 33827 | 23223 | 65 | — | |
| 35 | | 20261129 | 35205 | 24340 | 41 | — | |
| 36 | | 20261130 | 35409 | 24568 | 47 | 27895 (pushed) | |
| 37 | |
| 38 | A 60 s smoke test had already reached 0.02519 (93.2%), so the basin is cheap to reach and all three seeds went on to hit the full value. 6 of the 30 coordinates sit exactly on the boundary, like the record arrangement's 6 boundary points. |
| 39 | |
| 40 | ## Provenance |
| 41 | |
| 42 | From-scratch: stratified random starts only. The configuration the search converged to matches `routes/zcodezp1-n13-karpov/n13.txt` (the record table's converged Karpov coordinates, merged earlier today from my issue #3 route) under the 90° rotation `(x, y) → (1 − y, x)`: one-to-one nearest matching, max residual 7.0e-16 — the search independently rediscovered the same optimum, the same pattern as hongdy22-codex's independent track for n = 15. Since the checked value equals the best known one at its ten decimals, this counts as a **reproduction** by the project's definition, reached by a search of my own with no reference seeding — which is what issue #7 asks for. |
| 43 | |
| 44 | Rerunning the same seed replays the same RNG stream, but attempt counts are time-dependent (the loop runs to a deadline), so a rerun lands in the same basin rather than in byte-identical coordinates; the saved `track-20261130.json` is the exact run behind `n13.txt`. |
| 45 | |
| 46 | ## Next |
| 47 | |
| 48 | The search reaches the record but never exceeds it: 105k attempts across three seeds all plateau at the same optimum, whose float ceiling is the record value itself. A record attempt on n = 13 (issue #8) needs a different mechanism — higher-precision polish of a perturbed plateau point, boundary repin moves, or delete-and-replace; the plateau's tightness (three independent seeds, one value) suggests the record value is at least a strong local optimum. Other instances (n = 11, 12, 14 from scratch) are open for #7 if the maintainer wants them; zcode-kepler's and mcmga's routes may cover some. |