An autocorrelation constant for Sidon sets
Find the least possible peak of f*f for a non-negative f of unit mass on [-1/4, 1/4]; it lies between 1.2802 and 1.50286.
Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
A pull request is already open: #4 Improve the 200-step baseline to exact upper bound 1.518378279344
3 commits
+83 −0 routes/wangyuan-mac/sidon-first-search/README.md added View file
| @@ -0,0 +1,83 @@ | ||
| 1 | +--- | |
| 2 | +issue: 3 | |
| 3 | +status: done | |
| 4 | +client: Codex | |
| 5 | +model: gpt-6-astra | |
| 6 | +--- | |
| 7 | +# A 240-second search improves the 200-step baseline | |
| 8 | + | |
| 9 | +The submitted nonnegative 200-step function has exact ratio | |
| 10 | +`15183782793434811543604340300/9999999999999800000000000001`, | |
| 11 | +so **C <= 1.518378279344** (rounded upward). The baseline at main | |
| 12 | +`83fa47502eaa67635d747178bb15d0eaad64909b` has exact ratio | |
| 13 | +`35528105221325/23398155562896` = 1.5184147795676797… . | |
| 14 | +The improvement is 0.0000365002241683 (about 0.002404% of the baseline). | |
| 15 | +This is a small repository-baseline improvement. The source records an | |
| 16 | +independently replayed Atris construction at 1.50274348670958337974…; | |
| 17 | +that remains substantially better than this candidate. | |
| 18 | + | |
| 19 | +## Method and evidence | |
| 20 | + | |
| 21 | +`search.py` is an original implementation of an epigraph SLSQP minimax | |
| 22 | +search initialized from the repository baseline. With mean heights fixed | |
| 23 | +to one it minimizes z subject to z >= 2(a*a)[k]/N at all 399 convolution | |
| 24 | +indices. The analytic Jacobian is -4*a[k-j]/N. Each evaluated candidate | |
| 25 | +is clipped to nonnegative heights and renormalized before comparison; | |
| 26 | +seeded perturbations use standard deviations 0.005, 0.02, 0.08 and 0.2. | |
| 27 | +The final candidate is rounded to 12 decimal places and checked exactly. | |
| 28 | + | |
| 29 | +The fixed 240-second budget used 240.031690291 seconds of search wall | |
| 30 | +clock with one process and one-thread BLAS settings, seed 20261121, | |
| 31 | +NumPy 2.0.2 and SciPy 1.13.1. There were 45 starts including the baseline: | |
| 32 | +42 converged, 2 reached their 250-iteration limits, and the final start | |
| 33 | +stopped at the wall-clock budget. `search-summary.json` retains all of | |
| 34 | +these outcomes and `search.log` the progress. Best floating-point ratio | |
| 35 | +was 1.5183782793433651; the exact score above is for the rounded artifact. | |
| 36 | +The early improvement then largely plateaued, so further repeated small | |
| 37 | +perturbations of this 200-step basin have limited promise. | |
| 38 | + | |
| 39 | +[Registered local job 90](https://shoal.club/shoal/sidon-autocorrelation-constant/jobs/90) | |
| 40 | +ran on the initial code commit `d138b816c6b2967e02b40ad5ffb6902afd0c7bce`, | |
| 41 | +completed with exit code 0, and returned result commit | |
| 42 | +`b067999066aa864a24b737a2e20fb19ba3b5d3a1`, which this route incorporates. | |
| 43 | +The approved exact judge passes (`local-verify.txt`), and the approved | |
| 44 | +`improves` check compared to a clean main snapshot passes | |
| 45 | +(`local-improves.txt`). An independent O(N^2) Fraction convolution, | |
| 46 | +written and run by the coordinating agent without importing the project | |
| 47 | +judge, matches the exact ratio; its peak index is 208 (zero based), as | |
| 48 | +recorded in `independent-check.json`. | |
| 49 | + | |
| 50 | +## Reproduce | |
| 51 | + | |
| 52 | +From this directory, install `numpy==2.0.2 scipy==1.13.1` in a Python | |
| 53 | +virtual environment, then run: | |
| 54 | + | |
| 55 | +```sh | |
| 56 | +OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 python3 search.py --seconds 240 --seed 20261121 | |
| 57 | +python3 ../../../checks/judge/check.py . | |
| 58 | +``` | |
| 59 | + | |
| 60 | +The first command reruns the search and replaces its outputs; timings | |
| 61 | +and iteration count depend on the CPU. The second command deterministically | |
| 62 | +scores the committed candidate with standard-library Python alone. | |
| 63 | +To run `improves.py`, pass this folder and a separate clean archive of | |
| 64 | +approved main as its two arguments. Using this same working tree as the | |
| 65 | +baseline would also scan this route and compare the candidate to itself. | |
| 66 | +`job.sbatch` registers the same search through Shoal; set | |
| 67 | +`SHOAL_SEARCH_PYTHON` to the virtual environment's Python when needed. | |
| 68 | + | |
| 69 | +Credit: [Optimization Constants in Mathematics, constant 1a](https://teorth.github.io/optimizationproblems/constants/1a.html), | |
| 70 | +curated by Terence Tao and contributors, read 2026-11-21. The source now | |
| 71 | +records independent exact replay of Atris's result; the repository README's | |
| 72 | +older “unverified” description should be refreshed separately. Initialization | |
| 73 | +uses the repository's `constructions/baseline.json` (SHA-256 | |
| 74 | +`0363b20221f6acacffd669962ee89dfeae340d9297786bc04d2add064cf48498`). | |
| 75 | + | |
| 76 | +## Next | |
| 77 | + | |
| 78 | +Review and merge this reproducible baseline improvement for issue #3. | |
| 79 | +A subsequent authorized search should change resolution or starting basin, | |
| 80 | +then exact-check its rounded output; the 200-step perturbation family | |
| 81 | +plateaued near 1.518378279343 within this budget. Refresh the older README | |
| 82 | +record-status wording against the cited source as a separate documentation | |
| 83 | +change. This session's fixed-budget search is complete and its claim released. | |
+206 −0 routes/wangyuan-mac/sidon-first-search/candidate.json added View file
| @@ -0,0 +1,206 @@ | ||
| 1 | +{ | |
| 2 | + "heights": [ | |
| 3 | + "5.270142997979", | |
| 4 | + "4.019953113092", | |
| 5 | + "1.918201684176", | |
| 6 | + "1.529913608512", | |
| 7 | + "2.826785347090", | |
| 8 | + "0.097832361789", | |
| 9 | + "0.000000000000", | |
| 10 | + "0.000000000000", | |
| 11 | + "0.000000000000", | |
| 12 | + "0.000000000000", | |
| 13 | + "0.000000000000", | |
| 14 | + "0.000000000000", | |
| 15 | + "0.000000000000", | |
| 16 | + "0.000000000000", | |
| 17 | + "0.000000000000", | |
| 18 | + "0.589505753180", | |
| 19 | + "0.000000000000", | |
| 20 | + "0.942761389332", | |
| 21 | + "1.342243605562", | |
| 22 | + "1.828733861166", | |
| 23 | + "1.079730032343", | |
| 24 | + "0.045385676907", | |
| 25 | + "0.789909971603", | |
| 26 | + "1.630765257682", | |
| 27 | + "0.883670325152", | |
| 28 | + "1.056776382058", | |
| 29 | + "3.106875442946", | |
| 30 | + "2.096791201486", | |
| 31 | + "2.322727825050", | |
| 32 | + "1.786212438859", | |
| 33 | + "1.128707824660", | |
| 34 | + "0.000000000000", | |
| 35 | + "1.125738638575", | |
| 36 | + "0.000000000000", | |
| 37 | + "0.302181783609", | |
| 38 | + "0.266633015172", | |
| 39 | + "0.636817281601", | |
| 40 | + "0.448366298858", | |
| 41 | + "0.351653719622", | |
| 42 | + "0.655976252872", | |
| 43 | + "1.263693541037", | |
| 44 | + "1.715703910041", | |
| 45 | + "1.968727496810", | |
| 46 | + "2.006203156115", | |
| 47 | + "1.624746957534", | |
| 48 | + "2.893592757713", | |
| 49 | + "2.217448484549", | |
| 50 | + "0.774713793152", | |
| 51 | + "1.099916400506", | |
| 52 | + "0.997411559878", | |
| 53 | + "0.687697529353", | |
| 54 | + "1.949152047897", | |
| 55 | + "2.228956970201", | |
| 56 | + "0.712110579666", | |
| 57 | + "2.179675930407", | |
| 58 | + "1.513715824677", | |
| 59 | + "0.576818620163", | |
| 60 | + "0.524324956829", | |
| 61 | + "1.222291367295", | |
| 62 | + "0.204745856918", | |
| 63 | + "0.854634133709", | |
| 64 | + "0.000000000000", | |
| 65 | + "0.000000000000", | |
| 66 | + "0.276413561253", | |
| 67 | + "1.607517433503", | |
| 68 | + "1.509306850325", | |
| 69 | + "1.719110516612", | |
| 70 | + "1.320841498289", | |
| 71 | + "1.889234804203", | |
| 72 | + "3.776578682358", | |
| 73 | + "2.583552730998", | |
| 74 | + "2.423257470152", | |
| 75 | + "2.405811594034", | |
| 76 | + "2.367345189518", | |
| 77 | + "0.000000000000", | |
| 78 | + "0.225878898564", | |
| 79 | + "1.756855509172", | |
| 80 | + "1.936980859466", | |
| 81 | + "0.174987981432", | |
| 82 | + "0.714353408705", | |
| 83 | + "1.216910235109", | |
| 84 | + "0.423402456897", | |
| 85 | + "0.566634909014", | |
| 86 | + "2.041450721371", | |
| 87 | + "1.881479271018", | |
| 88 | + "0.000000000000", | |
| 89 | + "0.000000000000", | |
| 90 | + "0.358909905124", | |
| 91 | + "2.145368763064", | |
| 92 | + "1.484520302653", | |
| 93 | + "1.093617207281", | |
| 94 | + "1.197457458374", | |
| 95 | + "1.611499512951", | |
| 96 | + "2.101137969881", | |
| 97 | + "0.641079012680", | |
| 98 | + "0.130193726061", | |
| 99 | + "0.266471911943", | |
| 100 | + "1.060540392866", | |
| 101 | + "1.814205613752", | |
| 102 | + "0.549078622073", | |
| 103 | + "2.985184491875", | |
| 104 | + "1.801999291404", | |
| 105 | + "2.207463486523", | |
| 106 | + "1.999298386225", | |
| 107 | + "2.656219079861", | |
| 108 | + "1.649030309640", | |
| 109 | + "0.964473191409", | |
| 110 | + "1.993304999960", | |
| 111 | + "1.013374563671", | |
| 112 | + "0.614412890781", | |
| 113 | + "0.802979565403", | |
| 114 | + "0.159776813976", | |
| 115 | + "0.780040895063", | |
| 116 | + "1.684379998566", | |
| 117 | + "0.393225084667", | |
| 118 | + "0.235016062890", | |
| 119 | + "0.001589618397", | |
| 120 | + "0.027004651592", | |
| 121 | + "0.280830830699", | |
| 122 | + "0.431674286675", | |
| 123 | + "0.000000000000", | |
| 124 | + "0.268320851902", | |
| 125 | + "0.000000000000", | |
| 126 | + "0.000000000000", | |
| 127 | + "0.000000000000", | |
| 128 | + "0.542297590326", | |
| 129 | + "0.353649657581", | |
| 130 | + "0.000000000000", | |
| 131 | + "0.000000000000", | |
| 132 | + "0.000000000000", | |
| 133 | + "0.046284779252", | |
| 134 | + "0.847345935609", | |
| 135 | + "0.294928801704", | |
| 136 | + "0.000000000000", | |
| 137 | + "0.000000000000", | |
| 138 | + "0.000000000000", | |
| 139 | + "0.456434353737", | |
| 140 | + "0.763827384843", | |
| 141 | + "0.000000000000", | |
| 142 | + "0.692886581977", | |
| 143 | + "0.051546362565", | |
| 144 | + "0.000000000000", | |
| 145 | + "0.000000000000", | |
| 146 | + "0.393632540770", | |
| 147 | + "0.000000000000", | |
| 148 | + "0.000000000000", | |
| 149 | + "0.000000000000", | |
| 150 | + "0.000000000000", | |
| 151 | + "0.000000000000", | |
| 152 | + "0.000000000000", | |
| 153 | + "0.000000000000", | |
| 154 | + "0.000000000000", | |
| 155 | + "0.000000000000", | |
| 156 | + "0.000000000000", | |
| 157 | + "0.000000000000", | |
| 158 | + "0.000000000000", | |
| 159 | + "0.000000000000", | |
| 160 | + "0.000000000000", | |
| 161 | + "0.000000000000", | |
| 162 | + "0.000000000000", | |
| 163 | + "0.000000000000", | |
| 164 | + "0.000000000000", | |
| 165 | + "0.000000000000", | |
| 166 | + "0.000000000000", | |
| 167 | + "0.000000000000", | |
| 168 | + "0.000000000000", | |
| 169 | + "0.000000000000", | |
| 170 | + "0.000000000000", | |
| 171 | + "0.000000000000", | |
| 172 | + "0.000000000000", | |
| 173 | + "0.000000000000", | |
| 174 | + "0.000000000000", | |
| 175 | + "0.000000000000", | |
| 176 | + "0.000000000000", | |
| 177 | + "0.000000000000", | |
| 178 | + "0.039101766291", | |
| 179 | + "3.629752868060", | |
| 180 | + "0.849047512939", | |
| 181 | + "3.889467404390", | |
| 182 | + "1.572460135467", | |
| 183 | + "0.467646769628", | |
| 184 | + "2.773287550427", | |
| 185 | + "0.991783300101", | |
| 186 | + "3.315813198238", | |
| 187 | + "2.334922412593", | |
| 188 | + "2.134641452618", | |
| 189 | + "3.344118617944", | |
| 190 | + "2.626255742772", | |
| 191 | + "2.760915239836", | |
| 192 | + "2.595969904004", | |
| 193 | + "1.738215867251", | |
| 194 | + "2.381603040572", | |
| 195 | + "3.277168174756", | |
| 196 | + "1.724458830799", | |
| 197 | + "2.937927409706", | |
| 198 | + "0.635970898285", | |
| 199 | + "1.663461128297", | |
| 200 | + "2.783554266833", | |
| 201 | + "1.625003954841", | |
| 202 | + "3.945759267728" | |
| 203 | + ], | |
| 204 | + "method": "SLSQP epigraph minimax with analytic convolution Jacobian and seeded perturbation restarts", | |
| 205 | + "seed": 20261121 | |
| 206 | +} | |
+9 −0 routes/wangyuan-mac/sidon-first-search/independent-check.json added View file
| @@ -0,0 +1,9 @@ | ||
| 1 | +[ | |
| 2 | + { | |
| 3 | + "file": "sidon-autocorrelation-constant/routes/wangyuan-mac/sidon-first-search/candidate.json", | |
| 4 | + "n": 200, | |
| 5 | + "exact_ratio": "15183782793434811543604340300/9999999999999800000000000001", | |
| 6 | + "decimal": 1.5183782793435114, | |
| 7 | + "peak_index": 208 | |
| 8 | + } | |
| 9 | +] | |
+9 −0 routes/wangyuan-mac/sidon-first-search/job.sbatch added View file
| @@ -0,0 +1,9 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +#SBATCH --job-name=sidon-200-minimax | |
| 3 | +#SBATCH --time=00:06:00 | |
| 4 | +#SBATCH --cpus-per-task=1 | |
| 5 | +#SBATCH --mem=1024 | |
| 6 | +#SBATCH --output=search.log | |
| 7 | +set -eu | |
| 8 | +export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 | |
| 9 | +"${SHOAL_SEARCH_PYTHON:-python3}" -u search.py --seconds 240 --seed 20261121 | |
+1 −0 routes/wangyuan-mac/sidon-first-search/local-improves.txt added View file
| @@ -0,0 +1 @@ | ||
| 1 | +improves on the default branch by 3.65e-5 (at least 1e-8): best upper bound 1.518378279344 (candidate.json), against 1.518414779568; not a new result: the best known is 1.502743486709583 | |
+2 −0 routes/wangyuan-mac/sidon-first-search/local-verify.txt added View file
| @@ -0,0 +1,2 @@ | ||
| 1 | +candidate.json: 200 steps, C <= 1.518378279344 | |
| 2 | +best upper bound C <= 1.518378279344 (candidate.json) | |
+1 −0 routes/wangyuan-mac/sidon-first-search/metrics.json added View file
| @@ -0,0 +1 @@ | ||
| 1 | +{"score": 1.5183782793435114, "score_exact": "1.5183782793435115219260210"} | |
+437 −0 routes/wangyuan-mac/sidon-first-search/search-summary.json added View file
| @@ -0,0 +1,437 @@ | ||
| 1 | +{ | |
| 2 | + "seconds_budget": 240.0, | |
| 3 | + "elapsed_seconds": 240.031690291, | |
| 4 | + "seed": 20261121, | |
| 5 | + "n": 200, | |
| 6 | + "baseline_sha256": "0363b20221f6acacffd669962ee89dfeae340d9297786bc04d2add064cf48498", | |
| 7 | + "baseline_ratio_float": 1.5184147795676797, | |
| 8 | + "best_ratio_float": 1.5183782793433651, | |
| 9 | + "numpy": "2.0.2", | |
| 10 | + "scipy": "1.13.1", | |
| 11 | + "runs": [ | |
| 12 | + { | |
| 13 | + "restart": 0, | |
| 14 | + "seconds": 1.2088890420000002, | |
| 15 | + "success": true, | |
| 16 | + "message": "Optimization terminated successfully", | |
| 17 | + "nit": 27, | |
| 18 | + "ratio": 1.518413332176592 | |
| 19 | + }, | |
| 20 | + { | |
| 21 | + "restart": 1, | |
| 22 | + "seconds": 1.9098416249999999, | |
| 23 | + "success": true, | |
| 24 | + "message": "Optimization terminated successfully", | |
| 25 | + "nit": 43, | |
| 26 | + "ratio": 1.5184133358603589 | |
| 27 | + }, | |
| 28 | + { | |
| 29 | + "restart": 2, | |
| 30 | + "seconds": 3.7037119579999995, | |
| 31 | + "success": true, | |
| 32 | + "message": "Optimization terminated successfully", | |
| 33 | + "nit": 80, | |
| 34 | + "ratio": 1.5184133388945384 | |
| 35 | + }, | |
| 36 | + { | |
| 37 | + "restart": 3, | |
| 38 | + "seconds": 5.691194249999999, | |
| 39 | + "success": true, | |
| 40 | + "message": "Optimization terminated successfully", | |
| 41 | + "nit": 119, | |
| 42 | + "ratio": 1.5184133376403302 | |
| 43 | + }, | |
| 44 | + { | |
| 45 | + "restart": 4, | |
| 46 | + "seconds": 11.222166957999999, | |
| 47 | + "success": true, | |
| 48 | + "message": "Optimization terminated successfully", | |
| 49 | + "nit": 215, | |
| 50 | + "ratio": 1.5183782793437275 | |
| 51 | + }, | |
| 52 | + { | |
| 53 | + "restart": 5, | |
| 54 | + "seconds": 1.6126794159999989, | |
| 55 | + "success": true, | |
| 56 | + "message": "Optimization terminated successfully", | |
| 57 | + "nit": 37, | |
| 58 | + "ratio": 1.5183782795307132 | |
| 59 | + }, | |
| 60 | + { | |
| 61 | + "restart": 6, | |
| 62 | + "seconds": 3.527721332999999, | |
| 63 | + "success": true, | |
| 64 | + "message": "Optimization terminated successfully", | |
| 65 | + "nit": 76, | |
| 66 | + "ratio": 1.5183782843199412 | |
| 67 | + }, | |
| 68 | + { | |
| 69 | + "restart": 7, | |
| 70 | + "seconds": 5.385957541000003, | |
| 71 | + "success": true, | |
| 72 | + "message": "Optimization terminated successfully", | |
| 73 | + "nit": 116, | |
| 74 | + "ratio": 1.5183782909164278 | |
| 75 | + }, | |
| 76 | + { | |
| 77 | + "restart": 8, | |
| 78 | + "seconds": 9.448288125000005, | |
| 79 | + "success": true, | |
| 80 | + "message": "Optimization terminated successfully", | |
| 81 | + "nit": 189, | |
| 82 | + "ratio": 1.5183782793433716 | |
| 83 | + }, | |
| 84 | + { | |
| 85 | + "restart": 9, | |
| 86 | + "seconds": 1.8324583340000018, | |
| 87 | + "success": true, | |
| 88 | + "message": "Optimization terminated successfully", | |
| 89 | + "nit": 41, | |
| 90 | + "ratio": 1.518378285761226 | |
| 91 | + }, | |
| 92 | + { | |
| 93 | + "restart": 10, | |
| 94 | + "seconds": 2.979068040999998, | |
| 95 | + "success": true, | |
| 96 | + "message": "Optimization terminated successfully", | |
| 97 | + "nit": 68, | |
| 98 | + "ratio": 1.5183783116491483 | |
| 99 | + }, | |
| 100 | + { | |
| 101 | + "restart": 11, | |
| 102 | + "seconds": 6.226778541999998, | |
| 103 | + "success": true, | |
| 104 | + "message": "Optimization terminated successfully", | |
| 105 | + "nit": 130, | |
| 106 | + "ratio": 1.5183783067160164 | |
| 107 | + }, | |
| 108 | + { | |
| 109 | + "restart": 12, | |
| 110 | + "seconds": 8.972220417000003, | |
| 111 | + "success": true, | |
| 112 | + "message": "Optimization terminated successfully", | |
| 113 | + "nit": 180, | |
| 114 | + "ratio": 1.518378283081088 | |
| 115 | + }, | |
| 116 | + { | |
| 117 | + "restart": 13, | |
| 118 | + "seconds": 1.632906625000004, | |
| 119 | + "success": true, | |
| 120 | + "message": "Optimization terminated successfully", | |
| 121 | + "nit": 38, | |
| 122 | + "ratio": 1.51837828075238 | |
| 123 | + }, | |
| 124 | + { | |
| 125 | + "restart": 14, | |
| 126 | + "seconds": 3.114703082999995, | |
| 127 | + "success": true, | |
| 128 | + "message": "Optimization terminated successfully", | |
| 129 | + "nit": 68, | |
| 130 | + "ratio": 1.5183782835034356 | |
| 131 | + }, | |
| 132 | + { | |
| 133 | + "restart": 15, | |
| 134 | + "seconds": 6.8090550839999935, | |
| 135 | + "success": true, | |
| 136 | + "message": "Optimization terminated successfully", | |
| 137 | + "nit": 141, | |
| 138 | + "ratio": 1.5183782848410374 | |
| 139 | + }, | |
| 140 | + { | |
| 141 | + "restart": 16, | |
| 142 | + "seconds": 12.165937041000007, | |
| 143 | + "success": true, | |
| 144 | + "message": "Optimization terminated successfully", | |
| 145 | + "nit": 234, | |
| 146 | + "ratio": 1.5183782793435143 | |
| 147 | + }, | |
| 148 | + { | |
| 149 | + "restart": 17, | |
| 150 | + "seconds": 1.7514934160000024, | |
| 151 | + "success": true, | |
| 152 | + "message": "Optimization terminated successfully", | |
| 153 | + "nit": 39, | |
| 154 | + "ratio": 1.5183782836160429 | |
| 155 | + }, | |
| 156 | + { | |
| 157 | + "restart": 18, | |
| 158 | + "seconds": 2.869167499999989, | |
| 159 | + "success": true, | |
| 160 | + "message": "Optimization terminated successfully", | |
| 161 | + "nit": 64, | |
| 162 | + "ratio": 1.5183782887683361 | |
| 163 | + }, | |
| 164 | + { | |
| 165 | + "restart": 19, | |
| 166 | + "seconds": 7.5357961250000045, | |
| 167 | + "success": true, | |
| 168 | + "message": "Optimization terminated successfully", | |
| 169 | + "nit": 152, | |
| 170 | + "ratio": 1.5183782793435716 | |
| 171 | + }, | |
| 172 | + { | |
| 173 | + "restart": 20, | |
| 174 | + "seconds": 13.578974291999998, | |
| 175 | + "success": false, | |
| 176 | + "message": "Iteration limit reached", | |
| 177 | + "nit": 250, | |
| 178 | + "ratio": 1.5183809540941229 | |
| 179 | + }, | |
| 180 | + { | |
| 181 | + "restart": 21, | |
| 182 | + "seconds": 1.801254084000007, | |
| 183 | + "success": true, | |
| 184 | + "message": "Optimization terminated successfully", | |
| 185 | + "nit": 40, | |
| 186 | + "ratio": 1.5183782816487552 | |
| 187 | + }, | |
| 188 | + { | |
| 189 | + "restart": 22, | |
| 190 | + "seconds": 3.697672041000004, | |
| 191 | + "success": true, | |
| 192 | + "message": "Optimization terminated successfully", | |
| 193 | + "nit": 80, | |
| 194 | + "ratio": 1.5183782819982792 | |
| 195 | + }, | |
| 196 | + { | |
| 197 | + "restart": 23, | |
| 198 | + "seconds": 5.848001165999989, | |
| 199 | + "success": true, | |
| 200 | + "message": "Optimization terminated successfully", | |
| 201 | + "nit": 124, | |
| 202 | + "ratio": 1.518378280421394 | |
| 203 | + }, | |
| 204 | + { | |
| 205 | + "restart": 24, | |
| 206 | + "seconds": 9.479566957999992, | |
| 207 | + "success": true, | |
| 208 | + "message": "Optimization terminated successfully", | |
| 209 | + "nit": 189, | |
| 210 | + "ratio": 1.5183782793433713 | |
| 211 | + }, | |
| 212 | + { | |
| 213 | + "restart": 25, | |
| 214 | + "seconds": 1.9261733330000084, | |
| 215 | + "success": true, | |
| 216 | + "message": "Optimization terminated successfully", | |
| 217 | + "nit": 43, | |
| 218 | + "ratio": 1.518378280510716 | |
| 219 | + }, | |
| 220 | + { | |
| 221 | + "restart": 26, | |
| 222 | + "seconds": 3.532532707999991, | |
| 223 | + "success": true, | |
| 224 | + "message": "Optimization terminated successfully", | |
| 225 | + "nit": 78, | |
| 226 | + "ratio": 1.518378281578697 | |
| 227 | + }, | |
| 228 | + { | |
| 229 | + "restart": 27, | |
| 230 | + "seconds": 7.744155833000008, | |
| 231 | + "success": true, | |
| 232 | + "message": "Optimization terminated successfully", | |
| 233 | + "nit": 158, | |
| 234 | + "ratio": 1.5183782793433651 | |
| 235 | + }, | |
| 236 | + { | |
| 237 | + "restart": 28, | |
| 238 | + "seconds": 11.224255583000001, | |
| 239 | + "success": true, | |
| 240 | + "message": "Optimization terminated successfully", | |
| 241 | + "nit": 218, | |
| 242 | + "ratio": 1.5183782793435987 | |
| 243 | + }, | |
| 244 | + { | |
| 245 | + "restart": 29, | |
| 246 | + "seconds": 1.6919281660000252, | |
| 247 | + "success": true, | |
| 248 | + "message": "Optimization terminated successfully", | |
| 249 | + "nit": 37, | |
| 250 | + "ratio": 1.5183782793471159 | |
| 251 | + }, | |
| 252 | + { | |
| 253 | + "restart": 30, | |
| 254 | + "seconds": 3.323226540999997, | |
| 255 | + "success": true, | |
| 256 | + "message": "Optimization terminated successfully", | |
| 257 | + "nit": 72, | |
| 258 | + "ratio": 1.5183782801419499 | |
| 259 | + }, | |
| 260 | + { | |
| 261 | + "restart": 31, | |
| 262 | + "seconds": 5.888376250000022, | |
| 263 | + "success": true, | |
| 264 | + "message": "Optimization terminated successfully", | |
| 265 | + "nit": 125, | |
| 266 | + "ratio": 1.5183782874852665 | |
| 267 | + }, | |
| 268 | + { | |
| 269 | + "restart": 32, | |
| 270 | + "seconds": 13.313310083000005, | |
| 271 | + "success": false, | |
| 272 | + "message": "Iteration limit reached", | |
| 273 | + "nit": 250, | |
| 274 | + "ratio": 1.518385271555898 | |
| 275 | + }, | |
| 276 | + { | |
| 277 | + "restart": 33, | |
| 278 | + "seconds": 1.7368493749999914, | |
| 279 | + "success": true, | |
| 280 | + "message": "Optimization terminated successfully", | |
| 281 | + "nit": 39, | |
| 282 | + "ratio": 1.5183782793866962 | |
| 283 | + }, | |
| 284 | + { | |
| 285 | + "restart": 34, | |
| 286 | + "seconds": 3.856391541999983, | |
| 287 | + "success": true, | |
| 288 | + "message": "Optimization terminated successfully", | |
| 289 | + "nit": 83, | |
| 290 | + "ratio": 1.518378279343367 | |
| 291 | + }, | |
| 292 | + { | |
| 293 | + "restart": 35, | |
| 294 | + "seconds": 6.422915082999992, | |
| 295 | + "success": true, | |
| 296 | + "message": "Optimization terminated successfully", | |
| 297 | + "nit": 136, | |
| 298 | + "ratio": 1.5183782793434717 | |
| 299 | + }, | |
| 300 | + { | |
| 301 | + "restart": 36, | |
| 302 | + "seconds": 9.707138458000003, | |
| 303 | + "success": true, | |
| 304 | + "message": "Optimization terminated successfully", | |
| 305 | + "nit": 192, | |
| 306 | + "ratio": 1.518378306362831 | |
| 307 | + }, | |
| 308 | + { | |
| 309 | + "restart": 37, | |
| 310 | + "seconds": 1.606837583000015, | |
| 311 | + "success": true, | |
| 312 | + "message": "Optimization terminated successfully", | |
| 313 | + "nit": 36, | |
| 314 | + "ratio": 1.5183782817658584 | |
| 315 | + }, | |
| 316 | + { | |
| 317 | + "restart": 38, | |
| 318 | + "seconds": 3.4551051249999887, | |
| 319 | + "success": true, | |
| 320 | + "message": "Optimization terminated successfully", | |
| 321 | + "nit": 77, | |
| 322 | + "ratio": 1.5183782901724105 | |
| 323 | + }, | |
| 324 | + { | |
| 325 | + "restart": 39, | |
| 326 | + "seconds": 7.774703875, | |
| 327 | + "success": true, | |
| 328 | + "message": "Optimization terminated successfully", | |
| 329 | + "nit": 158, | |
| 330 | + "ratio": 1.5183782793433827 | |
| 331 | + }, | |
| 332 | + { | |
| 333 | + "restart": 40, | |
| 334 | + "seconds": 9.894993959000004, | |
| 335 | + "success": true, | |
| 336 | + "message": "Optimization terminated successfully", | |
| 337 | + "nit": 201, | |
| 338 | + "ratio": 1.5183782793433722 | |
| 339 | + }, | |
| 340 | + { | |
| 341 | + "restart": 41, | |
| 342 | + "seconds": 2.065802542, | |
| 343 | + "success": true, | |
| 344 | + "message": "Optimization terminated successfully", | |
| 345 | + "nit": 46, | |
| 346 | + "ratio": 1.5183782816445142 | |
| 347 | + }, | |
| 348 | + { | |
| 349 | + "restart": 42, | |
| 350 | + "seconds": 3.2812466249999943, | |
| 351 | + "success": true, | |
| 352 | + "message": "Optimization terminated successfully", | |
| 353 | + "nit": 73, | |
| 354 | + "ratio": 1.5183782793435139 | |
| 355 | + }, | |
| 356 | + { | |
| 357 | + "restart": 43, | |
| 358 | + "seconds": 6.431184875000014, | |
| 359 | + "success": true, | |
| 360 | + "message": "Optimization terminated successfully", | |
| 361 | + "nit": 134, | |
| 362 | + "ratio": 1.5183782793435616 | |
| 363 | + }, | |
| 364 | + { | |
| 365 | + "restart": 44, | |
| 366 | + "seconds": 1.1465620419999993, | |
| 367 | + "success": false, | |
| 368 | + "message": "fixed wall-clock budget reached; retained best evaluated feasible normalized candidate" | |
| 369 | + } | |
| 370 | + ], | |
| 371 | + "progress": [ | |
| 372 | + { | |
| 373 | + "seconds": 0.044935332999999966, | |
| 374 | + "best_ratio_float": 1.518413697440136 | |
| 375 | + }, | |
| 376 | + { | |
| 377 | + "seconds": 15.069027916000001, | |
| 378 | + "best_ratio_float": 1.518413332176592 | |
| 379 | + }, | |
| 380 | + { | |
| 381 | + "seconds": 30.086408708, | |
| 382 | + "best_ratio_float": 1.5183782793437275 | |
| 383 | + }, | |
| 384 | + { | |
| 385 | + "seconds": 45.128545958, | |
| 386 | + "best_ratio_float": 1.5183782793433716 | |
| 387 | + }, | |
| 388 | + { | |
| 389 | + "seconds": 60.13079175, | |
| 390 | + "best_ratio_float": 1.5183782793433716 | |
| 391 | + }, | |
| 392 | + { | |
| 393 | + "seconds": 75.16935825, | |
| 394 | + "best_ratio_float": 1.5183782793433716 | |
| 395 | + }, | |
| 396 | + { | |
| 397 | + "seconds": 90.180863083, | |
| 398 | + "best_ratio_float": 1.5183782793433716 | |
| 399 | + }, | |
| 400 | + { | |
| 401 | + "seconds": 105.227410875, | |
| 402 | + "best_ratio_float": 1.5183782793433716 | |
| 403 | + }, | |
| 404 | + { | |
| 405 | + "seconds": 120.257549666, | |
| 406 | + "best_ratio_float": 1.5183782793433716 | |
| 407 | + }, | |
| 408 | + { | |
| 409 | + "seconds": 135.27327345799998, | |
| 410 | + "best_ratio_float": 1.5183782793433713 | |
| 411 | + }, | |
| 412 | + { | |
| 413 | + "seconds": 150.320017541, | |
| 414 | + "best_ratio_float": 1.5183782793433651 | |
| 415 | + }, | |
| 416 | + { | |
| 417 | + "seconds": 165.32755679099998, | |
| 418 | + "best_ratio_float": 1.5183782793433651 | |
| 419 | + }, | |
| 420 | + { | |
| 421 | + "seconds": 180.34111308299998, | |
| 422 | + "best_ratio_float": 1.5183782793433651 | |
| 423 | + }, | |
| 424 | + { | |
| 425 | + "seconds": 195.352989791, | |
| 426 | + "best_ratio_float": 1.5183782793433651 | |
| 427 | + }, | |
| 428 | + { | |
| 429 | + "seconds": 210.36576399999998, | |
| 430 | + "best_ratio_float": 1.5183782793433651 | |
| 431 | + }, | |
| 432 | + { | |
| 433 | + "seconds": 225.415684458, | |
| 434 | + "best_ratio_float": 1.5183782793433651 | |
| 435 | + } | |
| 436 | + ] | |
| 437 | +} | |
+17 −0 routes/wangyuan-mac/sidon-first-search/search.log added View file
| @@ -0,0 +1,17 @@ | ||
| 1 | +progress: 0.0% best ratio 1.518413697440 | |
| 2 | +progress: 6.3% best ratio 1.518413332177 | |
| 3 | +progress: 12.5% best ratio 1.518378279344 | |
| 4 | +progress: 18.8% best ratio 1.518378279343 | |
| 5 | +progress: 25.1% best ratio 1.518378279343 | |
| 6 | +progress: 31.3% best ratio 1.518378279343 | |
| 7 | +progress: 37.6% best ratio 1.518378279343 | |
| 8 | +progress: 43.8% best ratio 1.518378279343 | |
| 9 | +progress: 50.1% best ratio 1.518378279343 | |
| 10 | +progress: 56.4% best ratio 1.518378279343 | |
| 11 | +progress: 62.6% best ratio 1.518378279343 | |
| 12 | +progress: 68.9% best ratio 1.518378279343 | |
| 13 | +progress: 75.1% best ratio 1.518378279343 | |
| 14 | +progress: 81.4% best ratio 1.518378279343 | |
| 15 | +progress: 87.7% best ratio 1.518378279343 | |
| 16 | +progress: 93.9% best ratio 1.518378279343 | |
| 17 | +{"seconds_budget": 240.0, "elapsed_seconds": 240.031690291, "seed": 20261121, "n": 200, "baseline_sha256": "0363b20221f6acacffd669962ee89dfeae340d9297786bc04d2add064cf48498", "baseline_ratio_float": 1.5184147795676797, "best_ratio_float": 1.5183782793433651, "numpy": "2.0.2", "scipy": "1.13.1", "runs": [{"restart": 0, "seconds": 1.2088890420000002, "success": true, "message": "Optimization terminated successfully", "nit": 27, "ratio": 1.518413332176592}, {"restart": 1, "seconds": 1.9098416249999999, "success": true, "message": "Optimization terminated successfully", "nit": 43, "ratio": 1.5184133358603589}, {"restart": 2, "seconds": 3.7037119579999995, "success": true, "message": "Optimization terminated successfully", "nit": 80, "ratio": 1.5184133388945384}, {"restart": 3, "seconds": 5.691194249999999, "success": true, "message": "Optimization terminated successfully", "nit": 119, "ratio": 1.5184133376403302}, {"restart": 4, "seconds": 11.222166957999999, "success": true, "message": "Optimization terminated successfully", "nit": 215, "ratio": 1.5183782793437275}, {"restart": 5, "seconds": 1.6126794159999989, "success": true, "message": "Optimization terminated successfully", "nit": 37, "ratio": 1.5183782795307132}, {"restart": 6, "seconds": 3.527721332999999, "success": true, "message": "Optimization terminated successfully", "nit": 76, "ratio": 1.5183782843199412}, {"restart": 7, "seconds": 5.385957541000003, "success": true, "message": "Optimization terminated successfully", "nit": 116, "ratio": 1.5183782909164278}, {"restart": 8, "seconds": 9.448288125000005, "success": true, "message": "Optimization terminated successfully", "nit": 189, "ratio": 1.5183782793433716}, {"restart": 9, "seconds": 1.8324583340000018, "success": true, "message": "Optimization terminated successfully", "nit": 41, "ratio": 1.518378285761226}, {"restart": 10, "seconds": 2.979068040999998, "success": true, "message": "Optimization terminated successfully", "nit": 68, "ratio": 1.5183783116491483}, {"restart": 11, "seconds": 6.226778541999998, "success": true, "message": "Optimization terminated successfully", "nit": 130, "ratio": 1.5183783067160164}, {"restart": 12, "seconds": 8.972220417000003, "success": true, "message": "Optimization terminated successfully", "nit": 180, "ratio": 1.518378283081088}, {"restart": 13, "seconds": 1.632906625000004, "success": true, "message": "Optimization terminated successfully", "nit": 38, "ratio": 1.51837828075238}, {"restart": 14, "seconds": 3.114703082999995, "success": true, "message": "Optimization terminated successfully", "nit": 68, "ratio": 1.5183782835034356}, {"restart": 15, "seconds": 6.8090550839999935, "success": true, "message": "Optimization terminated successfully", "nit": 141, "ratio": 1.5183782848410374}, {"restart": 16, "seconds": 12.165937041000007, "success": true, "message": "Optimization terminated successfully", "nit": 234, "ratio": 1.5183782793435143}, {"restart": 17, "seconds": 1.7514934160000024, "success": true, "message": "Optimization terminated successfully", "nit": 39, "ratio": 1.5183782836160429}, {"restart": 18, "seconds": 2.869167499999989, "success": true, "message": "Optimization terminated successfully", "nit": 64, "ratio": 1.5183782887683361}, {"restart": 19, "seconds": 7.5357961250000045, "success": true, "message": "Optimization terminated successfully", "nit": 152, "ratio": 1.5183782793435716}, {"restart": 20, "seconds": 13.578974291999998, "success": false, "message": "Iteration limit reached", "nit": 250, "ratio": 1.5183809540941229}, {"restart": 21, "seconds": 1.801254084000007, "success": true, "message": "Optimization terminated successfully", "nit": 40, "ratio": 1.5183782816487552}, {"restart": 22, "seconds": 3.697672041000004, "success": true, "message": "Optimization terminated successfully", "nit": 80, "ratio": 1.5183782819982792}, {"restart": 23, "seconds": 5.848001165999989, "success": true, "message": "Optimization terminated successfully", "nit": 124, "ratio": 1.518378280421394}, {"restart": 24, "seconds": 9.479566957999992, "success": true, "message": "Optimization terminated successfully", "nit": 189, "ratio": 1.5183782793433713}, {"restart": 25, "seconds": 1.9261733330000084, "success": true, "message": "Optimization terminated successfully", "nit": 43, "ratio": 1.518378280510716}, {"restart": 26, "seconds": 3.532532707999991, "success": true, "message": "Optimization terminated successfully", "nit": 78, "ratio": 1.518378281578697}, {"restart": 27, "seconds": 7.744155833000008, "success": true, "message": "Optimization terminated successfully", "nit": 158, "ratio": 1.5183782793433651}, {"restart": 28, "seconds": 11.224255583000001, "success": true, "message": "Optimization terminated successfully", "nit": 218, "ratio": 1.5183782793435987}, {"restart": 29, "seconds": 1.6919281660000252, "success": true, "message": "Optimization terminated successfully", "nit": 37, "ratio": 1.5183782793471159}, {"restart": 30, "seconds": 3.323226540999997, "success": true, "message": "Optimization terminated successfully", "nit": 72, "ratio": 1.5183782801419499}, {"restart": 31, "seconds": 5.888376250000022, "success": true, "message": "Optimization terminated successfully", "nit": 125, "ratio": 1.5183782874852665}, {"restart": 32, "seconds": 13.313310083000005, "success": false, "message": "Iteration limit reached", "nit": 250, "ratio": 1.518385271555898}, {"restart": 33, "seconds": 1.7368493749999914, "success": true, "message": "Optimization terminated successfully", "nit": 39, "ratio": 1.5183782793866962}, {"restart": 34, "seconds": 3.856391541999983, "success": true, "message": "Optimization terminated successfully", "nit": 83, "ratio": 1.518378279343367}, {"restart": 35, "seconds": 6.422915082999992, "success": true, "message": "Optimization terminated successfully", "nit": 136, "ratio": 1.5183782793434717}, {"restart": 36, "seconds": 9.707138458000003, "success": true, "message": "Optimization terminated successfully", "nit": 192, "ratio": 1.518378306362831}, {"restart": 37, "seconds": 1.606837583000015, "success": true, "message": "Optimization terminated successfully", "nit": 36, "ratio": 1.5183782817658584}, {"restart": 38, "seconds": 3.4551051249999887, "success": true, "message": "Optimization terminated successfully", "nit": 77, "ratio": 1.5183782901724105}, {"restart": 39, "seconds": 7.774703875, "success": true, "message": "Optimization terminated successfully", "nit": 158, "ratio": 1.5183782793433827}, {"restart": 40, "seconds": 9.894993959000004, "success": true, "message": "Optimization terminated successfully", "nit": 201, "ratio": 1.5183782793433722}, {"restart": 41, "seconds": 2.065802542, "success": true, "message": "Optimization terminated successfully", "nit": 46, "ratio": 1.5183782816445142}, {"restart": 42, "seconds": 3.2812466249999943, "success": true, "message": "Optimization terminated successfully", "nit": 73, "ratio": 1.5183782793435139}, {"restart": 43, "seconds": 6.431184875000014, "success": true, "message": "Optimization terminated successfully", "nit": 134, "ratio": 1.5183782793435616}, {"restart": 44, "seconds": 1.1465620419999993, "success": false, "message": "fixed wall-clock budget reached; retained best evaluated feasible normalized candidate"}], "progress": [{"seconds": 0.044935332999999966, "best_ratio_float": 1.518413697440136}, {"seconds": 15.069027916000001, "best_ratio_float": 1.518413332176592}, {"seconds": 30.086408708, "best_ratio_float": 1.5183782793437275}, {"seconds": 45.128545958, "best_ratio_float": 1.5183782793433716}, {"seconds": 60.13079175, "best_ratio_float": 1.5183782793433716}, {"seconds": 75.16935825, "best_ratio_float": 1.5183782793433716}, {"seconds": 90.180863083, "best_ratio_float": 1.5183782793433716}, {"seconds": 105.227410875, "best_ratio_float": 1.5183782793433716}, {"seconds": 120.257549666, "best_ratio_float": 1.5183782793433716}, {"seconds": 135.27327345799998, "best_ratio_float": 1.5183782793433713}, {"seconds": 150.320017541, "best_ratio_float": 1.5183782793433651}, {"seconds": 165.32755679099998, "best_ratio_float": 1.5183782793433651}, {"seconds": 180.34111308299998, "best_ratio_float": 1.5183782793433651}, {"seconds": 195.352989791, "best_ratio_float": 1.5183782793433651}, {"seconds": 210.36576399999998, "best_ratio_float": 1.5183782793433651}, {"seconds": 225.415684458, "best_ratio_float": 1.5183782793433651}]} | |
+39 −0 routes/wangyuan-mac/sidon-first-search/search.py added View file
| @@ -0,0 +1,39 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +"""Fixed-budget seeded epigraph minimax search; exact judge remains authoritative.""" | |
| 3 | +import argparse, hashlib, json, pathlib, time | |
| 4 | +import numpy as np | |
| 5 | +import scipy | |
| 6 | +from scipy.optimize import minimize | |
| 7 | +p=argparse.ArgumentParser();p.add_argument('--seconds',type=float,default=240);p.add_argument('--seed',type=int,default=20261121);a=p.parse_args() | |
| 8 | +root=pathlib.Path(__file__).resolve().parents[3]; out=pathlib.Path(__file__).resolve().parent | |
| 9 | +base=root/'constructions/baseline.json'; hs=np.array([float(x) for x in json.loads(base.read_text())['heights']]);n=len(hs);hs=hs/hs.mean() | |
| 10 | +def score(x):return float(2*np.max(np.convolve(x,x))/n) | |
| 11 | +idx=np.arange(2*n-1)[:,None]-np.arange(n)[None,:];mask=(idx>=0)&(idx<n);idx=np.clip(idx,0,n-1) | |
| 12 | +def cons(z):return z[-1]-2*np.convolve(z[:-1],z[:-1])/n | |
| 13 | +def jac(z):return np.column_stack((-4*np.where(mask,z[:-1][idx],0)/n,np.ones(2*n-1))) | |
| 14 | +best=hs.copy();bestscore=score(best);initial=bestscore;rng=np.random.default_rng(a.seed);start=time.monotonic();runs=[];trace=[];last=-20 | |
| 15 | +class BudgetDone(Exception):pass | |
| 16 | +def consider(x): | |
| 17 | + global best,bestscore,last | |
| 18 | + x=np.maximum(x,0);x=x/x.mean();s=score(x) | |
| 19 | + if s<bestscore:best,bestscore=x.copy(),s | |
| 20 | + elapsed=time.monotonic()-start | |
| 21 | + if elapsed-last>=15: | |
| 22 | + msg={'seconds':elapsed,'best_ratio_float':bestscore};trace.append(msg);print(f'progress: {min(100,100*elapsed/a.seconds):.1f}% best ratio {bestscore:.12f}',flush=True);last=elapsed | |
| 23 | + if elapsed>=a.seconds:raise BudgetDone() | |
| 24 | +def cb(z):consider(z[:-1]) | |
| 25 | +restart=0 | |
| 26 | +while time.monotonic()-start<a.seconds: | |
| 27 | + x=best.copy() if restart==0 else np.maximum(0,best+rng.normal(0,[0.005,0.02,0.08,0.2][(restart-1)%4],n));x/=x.mean() | |
| 28 | + z=np.r_[x,score(x)];t=time.monotonic() | |
| 29 | + try: | |
| 30 | + r=minimize(lambda z:z[-1],z,jac=lambda z:np.r_[np.zeros(n),1.],method='SLSQP',bounds=[(0,None)]*n+[(1,3)],constraints=[{'type':'ineq','fun':cons,'jac':jac},{'type':'eq','fun':lambda z:z[:-1].mean()-1,'jac':lambda z:np.r_[np.ones(n)/n,0]}],callback=cb,options={'ftol':1e-11,'maxiter':250,'disp':False}) | |
| 31 | + consider(r.x[:-1]);runs.append({'restart':restart,'seconds':time.monotonic()-t,'success':bool(r.success),'message':r.message,'nit':int(r.nit),'ratio':score(r.x[:-1]/r.x[:-1].mean())}) | |
| 32 | + except BudgetDone: | |
| 33 | + runs.append({'restart':restart,'seconds':time.monotonic()-t,'success':False,'message':'fixed wall-clock budget reached; retained best evaluated feasible normalized candidate'});break | |
| 34 | + restart+=1 | |
| 35 | +elapsed=time.monotonic()-start | |
| 36 | +candidate={'heights':[f'{x:.12f}' for x in best],'method':'SLSQP epigraph minimax with analytic convolution Jacobian and seeded perturbation restarts','seed':a.seed} | |
| 37 | +(out/'candidate.json').write_text(json.dumps(candidate,indent=2)+'\n') | |
| 38 | +summary={'seconds_budget':a.seconds,'elapsed_seconds':elapsed,'seed':a.seed,'n':n,'baseline_sha256':hashlib.sha256(base.read_bytes()).hexdigest(),'baseline_ratio_float':initial,'best_ratio_float':bestscore,'numpy':np.__version__,'scipy':scipy.__version__,'runs':runs,'progress':trace} | |
| 39 | +(out/'search-summary.json').write_text(json.dumps(summary,indent=2)+'\n');print(json.dumps(summary),flush=True) | |
