{"method":"Small-amplitude basin hopping with Gaussian position/angle perturbations 1e-4, 1e-3, 1e-2, 3e-2; exact-support SLSQP repair, contact-specific area allowances, low-temperature Metropolis acceptance. Later repair passes constrain sliding-seam circular areas directly and try rounding phases / mixed-integer local rounding.","seed":23004,"derived_seeds":[1336728322,950278438,1184289033,1141635015,907673142,1793093813,726428989,680520054,321499256,940708590,1817230273,735308165,1699501430,396429709,1188623303,703923979],"seed_derivation":"numpy.random.default_rng(23004).integers(0, 2**31-1, 20), in order; first 16 used, each listed in runs.","official_valid":true,"official_score":"2.94852695","official_score_full":2.948526950912552,"solution_sha256":"cefac3368caae7f9dea0c4cdc0e87d869f3a9bd76ba75292b1cd4b7fff7c8fb9","mec":[-0.0001819080616875258,0.00013448997007248039,2.948526950912552],"max_pair_area":9.997822348073144e-07,"solution":[{"x":0.545425,"y":0.67215,"theta":-0.570778},{"x":1.135484,"y":-1.23874,"theta":2.227365},{"x":-0.584124,"y":-0.217653,"theta":-1.671787},{"x":1.843118,"y":0.631801,"theta":-0.722762},{"x":0.278186,"y":1.928675,"theta":2.264578},{"x":-0.723715,"y":1.809349,"theta":3.126118},{"x":-1.624637,"y":1.076193,"theta":-2.992325},{"x":-0.56981,"y":0.785952,"theta":-1.682231},{"x":0.032918,"y":1.724683,"theta":-0.877015},{"x":1.261991,"y":1.484613,"theta":0.453135},{"x":-1.944933,"y":-0.121111,"theta":-2.464295},{"x":-1.573106,"y":-1.149938,"theta":-1.641622},{"x":1.049635,"y":-2.567295,"theta":1.95895},{"x":-0.789401,"y":-1.781407,"theta":-0.792106},{"x":1.811166,"y":-0.718041,"theta":-0.914204}],"solution_json":"[\n  {\n    \"x\": 0.545425,\n    \"y\": 0.67215,\n    \"theta\": -0.570778\n  },\n  {\n    \"x\": 1.135484,\n    \"y\": -1.23874,\n    \"theta\": 2.227365\n  },\n  {\n    \"x\": -0.584124,\n    \"y\": -0.217653,\n    \"theta\": -1.671787\n  },\n  {\n    \"x\": 1.843118,\n    \"y\": 0.631801,\n    \"theta\": -0.722762\n  },\n  {\n    \"x\": 0.278186,\n    \"y\": 1.928675,\n    \"theta\": 2.264578\n  },\n  {\n    \"x\": -0.723715,\n    \"y\": 1.809349,\n    \"theta\": 3.126118\n  },\n  {\n    \"x\": -1.624637,\n    \"y\": 1.076193,\n    \"theta\": -2.992325\n  },\n  {\n    \"x\": -0.56981,\n    \"y\": 0.785952,\n    \"theta\": -1.682231\n  },\n  {\n    \"x\": 0.032918,\n    \"y\": 1.724683,\n    \"theta\": -0.877015\n  },\n  {\n    \"x\": 1.261991,\n    \"y\": 1.484613,\n    \"theta\": 0.453135\n  },\n  {\n    \"x\": -1.944933,\n    \"y\": -0.121111,\n    \"theta\": -2.464295\n  },\n  {\n    \"x\": -1.573106,\n    \"y\": -1.149938,\n    \"theta\": -1.641622\n  },\n  {\n    \"x\": 1.049635,\n    \"y\": -2.567295,\n    \"theta\": 1.95895\n  },\n  {\n    \"x\": -0.789401,\n    \"y\": -1.781407,\n    \"theta\": -0.792106\n  },\n  {\n    \"x\": 1.811166,\n    \"y\": -0.718041,\n    \"theta\": -0.914204\n  }\n]\n","inherited_baseline":true,"baseline":{"source":"The 15 rows supplied in this task; requester describes them as a published packing. No external priority claim independently established.","official_valid":true,"official_score_full":2.948526950912552,"official_score":"2.94852695","preserved_before_search":true},"best_new_score":2.9485298229650656,"best_fresh_score":3.0192761772071766,"best_new":{"seed":1184289033,"start_kind":"baseline","solution":[{"x":0.535036,"y":0.680531,"theta":-0.555105},{"x":1.155003,"y":-1.220868,"theta":2.243088},{"x":-0.580466,"y":-0.226975,"theta":-1.656004},{"x":1.833144,"y":0.660568,"theta":-0.707001},{"x":0.248107,"y":1.932669,"theta":2.280474},{"x":-0.7518,"y":1.797655,"theta":3.141804},{"x":-1.641147,"y":1.05043,"theta":-2.976704},{"x":-0.581918,"y":0.776726,"theta":-1.666832},{"x":0.005945,"y":1.72466,"theta":-0.861118},{"x":1.238673,"y":1.504146,"theta":0.469017},{"x":-1.942609,"y":-0.151787,"theta":-2.448623},{"x":-1.554652,"y":-1.174659,"theta":-1.625939},{"x":1.090052,"y":-2.550611,"theta":1.974672},{"x":-0.761113,"y":-1.793732,"theta":-0.776412},{"x":1.822417,"y":-0.689612,"theta":-0.898505}],"improves_inherited_baseline":false},"best_fresh":{"seed":907673142,"solution":[{"x":-0.10586,"y":-1.088806,"theta":3.100551},{"x":1.945787,"y":-2.080851,"theta":2.322664},{"x":-1.723451,"y":-1.052232,"theta":2.369132},{"x":-0.873313,"y":0.758,"theta":-0.962643},{"x":1.126559,"y":0.771781,"theta":-2.227569},{"x":-1.007304,"y":-1.75009,"theta":-2.972376},{"x":-1.055645,"y":1.849452,"theta":-0.053302},{"x":1.700963,"y":1.088209,"theta":1.560375},{"x":-1.062711,"y":1.717009,"theta":-3.194894},{"x":-0.053162,"y":-2.018576,"theta":-0.941862},{"x":1.887716,"y":-1.077629,"theta":1.728068},{"x":-2.018889,"y":-0.039521,"theta":2.178949},{"x":0.943249,"y":1.785429,"theta":2.156793},{"x":-0.094498,"y":-0.812105,"theta":-0.041041},{"x":2.01749,"y":0.08492,"theta":0.914024}]},"strict_radius":2.9486849095427226,"strict_witness":{"official_valid":true,"radius":2.9486849095427226,"min_support_gap":6.161676751048617e-07,"max_exact_area":0.0,"solution":[{"x":0.545727,"y":0.672032,"theta":-0.570962},{"x":1.135751,"y":-1.238958,"theta":2.227364},{"x":-0.583955,"y":-0.21787,"theta":-1.671943},{"x":1.843476,"y":0.631639,"theta":-0.722766},{"x":0.278379,"y":1.928698,"theta":2.2653},{"x":-0.723641,"y":1.809341,"theta":3.125735},{"x":-1.624612,"y":1.076107,"theta":-2.992312},{"x":-0.569705,"y":0.785824,"theta":-1.682413},{"x":0.033237,"y":1.724508,"theta":-0.876293},{"x":1.262341,"y":1.484543,"theta":0.453143},{"x":-1.944906,"y":-0.121285,"theta":-2.464276},{"x":-1.573031,"y":-1.150194,"theta":-1.641646},{"x":1.049959,"y":-2.567553,"theta":1.95898},{"x":-0.789194,"y":-1.781725,"theta":-0.79271},{"x":1.811503,"y":-0.718213,"theta":-0.914229}]},"structure":{"full_disk_pairs":[],"near_opposed_sliding_seams":[{"indices":[1,14],"angle_error":2.365358979350418e-05,"slide":0.8530378735524133,"normal_offset":3.190160845822909e-06},{"indices":[4,8],"angle_error":3.4641020674186507e-07,"slide":0.3190127393814539,"normal_offset":5.835752388549942e-07}],"boundary_indices":[3,4,5,6,9,10,11,12,13,14],"flat_edge_equation":"u_i dot (p-c_i)=0, u_i=(cos(theta_i),sin(theta_i)); curved side has nonnegative dot product","symmetry":"No imposed symmetry; asymmetric by numerical matching of centers and orientation normals.","description":"Zero full disks. Two nearly opposed pairs slide along shared diameter seams: indices [1,14] and [4,8]. Nine outward-facing arc supports plus inward-facing cap 12 touch the enclosing circle; cap 12 touches at both diameter endpoints. The remaining five pieces are interior. All indices are zero based. The packing is an inherited published configuration, not a newly discovered topology."},"scorer_check":{"pair_cases":250,"decision_disagreements":0,"max_area_difference":1.968274907504508e-07,"mec_cases":30,"max_radius_difference":8.917311333789257e-13,"max_jacobian_error":2.4914908025586158e-08,"rounding":"All cross-check inputs rounded to 6 decimals before either calculation.","pair_cases_breakdown":"200 random pairs and 50 near contacts split among arc/arc, arc/flat and flat/flat.","mec_cases_breakdown":"20 random 15-piece packings and 10 perturbed baseline packings. MEC compared directly, including invalid packings.","baseline_exact_max_pair_area":1.0013726918136484e-06,"baseline_exact_vs_official_pair_decision_disagreements":6,"baseline_own_radius":2.9485269509127,"interpretation":"Analytic circular area and the official inscribed 4096-point polygons are different models. Random/tight test decisions agreed; six near-threshold baseline pair decisions did not. Official validate_and_score is always the retention gate.","geometry":"Exact support separation: maximize separating gap over flat normals and smooth endpoint/arc support stationary directions. Intersection area: clipped circular-arc and diameter Green integrals. MEC: convex SLSQP over center/radius using exact farthest-boundary distances. Numerical optimization tolerances apply."},"runs":[{"id":"pilot","seed":1336728322,"start_kind":"baseline","minutes":1.0604586361994734,"attempts":17,"valid_count":17,"best_radius":2.948558302121868,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.0001,"contact_graphs":1},{"id":"baseline-1e-3","seed":950278438,"start_kind":"baseline","minutes":5.870761032882728,"attempts":70,"valid_count":70,"best_radius":2.9485299020757965,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.001,"contact_graphs":2},{"id":"baseline-1e-2","seed":1184289033,"start_kind":"baseline","minutes":5.92036099244918,"attempts":73,"valid_count":73,"best_radius":2.9485298229650656,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.01,"contact_graphs":1},{"id":"baseline-3e-2","seed":1141635015,"start_kind":"baseline","minutes":5.849849504116961,"attempts":71,"valid_count":71,"best_radius":2.948529836351812,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.03,"contact_graphs":1},{"id":"fresh-a","seed":907673142,"start_kind":"fresh","minutes":5.853929018532896,"attempts":57,"valid_count":56,"best_radius":3.0192761772071766,"score_kind":"official rounded 6 decimals","errors":{"rounded_invalid":1},"amplitude":0.01,"contact_graphs":1},{"id":"fresh-b","seed":1793093813,"start_kind":"fresh","minutes":5.887158201699882,"attempts":85,"valid_count":85,"best_radius":3.0635597290739227,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.03,"contact_graphs":1},{"id":"baseline-1e-4","seed":726428989,"start_kind":"baseline","minutes":5.846233211716753,"attempts":76,"valid_count":76,"best_radius":2.9485298554388786,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.0001,"contact_graphs":1},{"id":"calibrated-1e-4","seed":680520054,"start_kind":"baseline_polygon_calibrated","minutes":5.887162395000147,"attempts":58,"valid_count":0,"best_radius":null,"score_kind":"official rounded 6 decimals","errors":{"rounding_failed":57,"repair_infeasible":1},"amplitude":0.0001,"contact_graphs":0},{"id":"calibrated-seams-1e-3","seed":321499256,"start_kind":"baseline_polygon_calibrated","minutes":5.866991275899151,"attempts":27,"valid_count":0,"best_radius":null,"score_kind":"official rounded 6 decimals","errors":{"rounding_failed":27},"amplitude":0.001,"contact_graphs":0},{"id":"prior-five-pairs-hop","seed":940708590,"start_kind":"file:prior-five-pairs.json","minutes":5.863847933382688,"attempts":63,"valid_count":63,"best_radius":2.954758818767021,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.03,"contact_graphs":1},{"id":"prior-relaxed-rings-hop","seed":1817230273,"start_kind":"file:prior-relaxed-rings.json","minutes":5.85603310156633,"attempts":86,"valid_count":86,"best_radius":2.9535303517070464,"score_kind":"official rounded 6 decimals","errors":{},"amplitude":0.03,"contact_graphs":2},{"id":"calibrated-seams-3e-2","seed":735308165,"start_kind":"baseline_polygon_calibrated","minutes":5.888843205999971,"attempts":31,"valid_count":0,"best_radius":null,"score_kind":"official rounded 6 decimals","errors":{"rounding_failed":31},"amplitude":0.03,"contact_graphs":0},{"id":"grid-1e-4","seed":1699501430,"start_kind":"baseline_polygon_calibrated","minutes":6.135646058617082,"attempts":12,"valid_count":1,"best_radius":2.9485304839462083,"score_kind":"official rounded 6 decimals","errors":{"rounding_failed":11},"amplitude":0.0001,"contact_graphs":1},{"id":"grid-1e-2","seed":396429709,"start_kind":"baseline_polygon_calibrated","minutes":6.01560272265051,"attempts":12,"valid_count":3,"best_radius":2.948529906031886,"score_kind":"official rounded 6 decimals","errors":{"rounding_failed":9},"amplitude":0.01,"contact_graphs":1},{"id":"fresh-c","seed":1188623303,"start_kind":"fresh","minutes":4.050600229317206,"attempts":66,"valid_count":64,"best_radius":3.0544291451991636,"score_kind":"official rounded 6 decimals","errors":{"rounded_invalid":2},"amplitude":0.0001,"contact_graphs":1},{"id":"fresh-d","seed":703923979,"start_kind":"fresh","minutes":2.055606299950159,"attempts":27,"valid_count":27,"best_radius":3.081038503868836,"score_kind":"official rounded 6 decimals","errors":{"process_exit":143,"last_checkpoint_only":true},"amplitude":0.001,"contact_graphs":1}],"contact_graph_archive":{"c57e7b6db076efbd":{"edges":[[0,1],[0,2],[0,3],[0,7],[0,8],[0,9],[1,2],[1,3],[1,12],[1,13],[1,14],[2,7],[2,10],[2,11],[2,13],[3,9],[4,5],[4,8],[4,9],[5,6],[5,7],[5,8],[6,7],[6,10],[7,8],[8,9],[10,11],[11,13],[12,13],[12,14]],"rim":[3,4,5,6,9,10,11,12,13,14],"radius":2.9485298229650656,"best_run":"baseline-1e-2","solution_ref":"best_new.solution"},"b18c05680a4b07ce":{"edges":[[0,1],[0,2],[0,3],[0,7],[0,8],[0,9],[1,2],[1,12],[1,13],[1,14],[2,6],[2,7],[2,10],[2,11],[3,9],[3,14],[4,5],[4,8],[4,9],[5,6],[5,7],[5,8],[6,7],[6,10],[7,8],[8,9],[10,11],[11,13],[12,13]],"rim":[3,4,5,6,9,10,11,12,13,14],"radius":2.9975613575391433,"q":[[0.387671,0.556415,-0.391708],[0.873707,-1.383545,1.257161],[-0.76794,-0.241323,-1.759077],[1.689632,1.065548,-0.401008],[-0.025068,1.997404,2.512294],[-0.989982,1.734989,3.400111],[-1.759791,0.945191,-2.778917],[-0.615274,0.747514,-1.535932],[-0.195955,1.762683,-0.629299],[0.906469,1.780046,0.450627],[-1.962799,-0.371038,-2.44532],[-1.494017,-1.325957,-1.462659],[1.222287,-2.54782,2.018104],[-0.664214,-1.883898,-0.591945],[1.766337,-0.9329,-5.815664]],"best_run":"baseline-1e-3"},"9bdace13a6b4f1ed":{"edges":[[0,3],[0,5],[0,9],[0,13],[1,9],[1,10],[2,3],[2,5],[2,11],[3,4],[3,6],[3,11],[3,13],[4,7],[4,10],[4,12],[4,13],[4,14],[5,9],[6,8],[6,12],[7,12],[7,14],[8,11],[9,13],[10,13],[10,14]],"rim":[1,2,5,6,7,8,9,10,11,12,14],"radius":3.0192761772071766,"best_run":"fresh-a","solution_ref":"best_fresh.solution"},"d49bf72f86c11153":{"edges":[[0,1],[0,10],[0,12],[1,5],[2,3],[2,4],[2,6],[2,7],[2,11],[2,14],[3,6],[3,14],[4,7],[4,8],[4,11],[4,12],[4,13],[5,6],[5,7],[6,7],[7,12],[8,9],[8,11],[9,10],[9,13],[10,13],[11,14],[12,13]],"rim":[0,1,3,5,6,8,9,10,11,14],"radius":3.0635597290739227,"q":[[-2.148192,-0.943297,-0.24729],[-2.018419,-0.42926,-3.388883],[0.600974,1.865013,4.109935],[0.357703,2.032321,0.968343],[1.331659,0.113307,-2.427263],[-1.436619,1.481352,3.104456],[-0.415935,2.021207,3.226765],[-0.453309,1.015285,-1.723202],[1.949491,-0.676581,-0.98282],[0.728495,-1.930692,-1.275941],[-1.13153,-2.665527,1.169345],[2.170357,0.672407,-2.052786],[-0.313242,-0.147912,-1.999129],[0.087735,-1.080261,-1.336672],[2.332464,1.716102,-2.507276]],"best_run":"fresh-b"},"fecb8d38d5ed1477":{"edges":[[0,1],[0,3],[0,6],[0,7],[0,12],[1,2],[2,3],[2,13],[3,6],[3,13],[4,5],[4,6],[4,13],[5,8],[5,9],[6,7],[6,9],[7,9],[7,10],[7,12],[7,14],[8,9],[8,11],[9,11],[9,14],[10,12],[10,14],[11,14]],"rim":[1,2,4,5,8,10,11,12,13,14],"radius":2.954758818767021,"q":[[-1.489612,0.059759,-1.109026],[-1.947516,-0.16812,2.032567],[-1.620564,1.093094,2.01306],[-0.794243,1.484398,-1.128533],[1.287555,1.808467,3.41066],[1.414087,1.349607,0.269067],[0.50814,-0.033323,2.047822],[-0.423632,-0.514896,-1.09377],[1.948103,0.16117,-0.452573],[1.574119,-0.607977,2.689019],[-0.893577,-1.738563,-1.234373],[2.090002,-1.833709,2.421421],[-1.701731,-0.961869,4.217963],[-0.483172,2.738091,4.887054],[0.093615,-1.952516,-0.355483]],"best_run":"prior-five-pairs-hop"},"a849502c1f44fdc5":{"edges":[[0,1],[0,2],[0,3],[0,6],[0,7],[0,8],[0,9],[1,2],[1,9],[1,10],[1,11],[1,12],[2,3],[2,12],[2,13],[2,14],[3,5],[3,6],[3,14],[4,5],[4,6],[4,7],[5,6],[5,14],[6,7],[7,8],[8,9],[9,10],[10,11],[12,13],[13,14]],"rim":[4,5,7,8,9,10,11,12,13,14],"radius":2.9535303517070464,"q":[[-0.599802,-0.109361,-1.845646],[0.912854,-1.417623,2.058629],[0.676758,0.568311,-0.437214],[-0.297942,0.844449,-0.681775],[-1.602586,1.117139,1.65351],[-0.839492,1.763954,0.731572],[-1.347269,1.138306,-1.488082],[-1.944342,0.189244,-2.601841],[-1.744368,-0.879466,-1.789337],[-1.075682,-1.630702,-0.950879],[0.606678,-2.712062,1.79087],[1.667954,-1.016961,-1.082964],[1.929648,0.304528,-0.88207],[1.502721,1.248242,0.32527],[0.216411,1.941506,0.532261]],"best_run":"prior-relaxed-rings-hop"},"ccf149de2ff1e8ab":{"edges":[[0,2],[0,3],[0,6],[0,7],[0,8],[0,9],[1,2],[1,9],[1,10],[1,11],[1,12],[2,3],[2,12],[2,13],[2,14],[3,5],[3,6],[3,14],[4,5],[4,6],[4,7],[5,6],[5,14],[6,7],[7,8],[8,9],[9,10],[10,11],[12,13],[13,14]],"rim":[4,5,7,8,9,10,11,12,13,14],"radius":2.955322469940626,"q":[[-0.641074,-0.062334,-1.763252],[0.888055,-1.435593,2.040914],[0.703822,0.555823,-0.402789],[-0.245277,0.879282,-0.560198],[-1.62996,1.080053,1.583381],[-0.882834,1.744674,0.73392],[-1.297074,1.084243,-1.558212],[-1.94478,0.202771,-2.621912],[-1.758206,-0.855568,-1.771409],[-1.103899,-1.613906,-0.916479],[0.559563,-2.724118,1.773389],[1.6507,-1.048082,-1.100679],[1.936982,0.267178,-0.890679],[1.526824,1.221512,0.345848],[0.212511,1.94374,0.634952]],"best_run":"prior-relaxed-rings-hop"},"3c3093bcb29c6460":{"edges":[[0,4],[0,9],[0,14],[1,3],[1,6],[1,12],[2,4],[2,7],[3,6],[3,11],[3,13],[4,14],[5,7],[5,11],[5,13],[6,10],[6,11],[6,14],[7,11],[8,9],[8,10],[8,12],[10,12],[10,14],[11,13],[11,14]],"rim":[0,1,2,3,4,5,7,8,9,12],"radius":3.0544291451991636,"q":[[-2.000028,0.469645,-2.087273],[2.469331,-1.493968,2.597498],[-1.511277,1.391661,1.411981],[2.019036,-0.379699,1.36679],[-1.633042,1.411163,-1.729611],[1.358455,1.541194,1.586431],[0.975835,-0.163876,-1.774803],[0.388225,2.017414,-3.987168],[-0.593539,-1.966822,-2.613565],[-1.45175,-1.453651,2.602681],[-0.019115,-0.966989,-1.789606],[0.660419,0.92249,-2.67883],[0.905348,-2.740416,1.889876],[1.468362,1.542913,-1.555162],[-0.137259,0.083643,3.424165]],"best_run":"fresh-c"},"afba3100d15ebeb9":{"edges":[[0,2],[0,13],[1,8],[1,12],[1,14],[2,4],[2,9],[2,13],[3,4],[3,11],[5,7],[5,8],[5,9],[5,10],[5,12],[5,13],[6,8],[6,10],[7,10],[7,11],[8,12],[9,11],[9,13],[12,13],[12,14],[13,14]],"rim":[0,1,3,4,6,7,8,10,11,14],"radius":3.081038503868836,"q":[[0.951485,1.850782,1.095934],[-1.671199,1.240085,-3.33692],[0.954607,0.724839,0.26271],[1.639137,-1.282166,0.664373],[2.901823,0.268738,3.233939],[-0.226162,-0.657237,2.628604],[-2.267635,-1.830472,0.679126],[-0.068751,-2.288954,0.752208],[-2.225935,-0.681358,1.018134],[0.12376,-0.036025,-0.512989],[-0.281158,-2.061957,-2.389385],[0.851881,-1.898688,0.400947],[-1.246938,1.062557,-0.663811],[-0.24698,1.342574,-7.9e-05],[-0.49744,2.020711,-3.805404]],"best_run":"fresh-d"}},"contact_graph_definition":"Zero-based labelled edges whose exact separating gap is <0.0003; rim indices within 0.0003 of the largest analytic boundary distance from the search origin. Hash: first 16 hex SHA-256 characters of json.dumps([edges,rim]). Distinct labelled threshold graphs, not a proof of distinct unlabelled topologies or basins. Store the best rounded, officially valid configuration per graph; solution_ref points to the corresponding top-level solution field.","repo_commit":"78a78626f098cd236f3a09bb2cb242f72951599d","source_urls":["https://www.paradigm.xyz/puzzles/packing/about?view=rules","https://raw.githubusercontent.com/benedictbrady/shape-packing-challenge/78a78626f098cd236f3a09bb2cb242f72951599d/README.md","https://raw.githubusercontent.com/benedictbrady/shape-packing-challenge/78a78626f098cd236f3a09bb2cb242f72951599d/src/semicircle_packing/config.py","https://raw.githubusercontent.com/benedictbrady/shape-packing-challenge/78a78626f098cd236f3a09bb2cb242f72951599d/src/semicircle_packing/geometry.py","https://raw.githubusercontent.com/benedictbrady/shape-packing-challenge/78a78626f098cd236f3a09bb2cb242f72951599d/src/semicircle_packing/scoring.py"],"input_results":[{"item":"cma-es","sha256":"9b93e2ed4de5a95fd82268d4d16fbbcdd424365f3b491f82e9593ec4a630715e","reported_radius":3.02081451},{"item":"diff-evolution","sha256":"5e21fa1cc1c5d03397d3a7174fab39a9b309ff256372c9a3f7bde116491cc0e3","reported_radius":3.04084534},{"item":"flats-on-rim","sha256":"3c4e8ebc6358be8f9d5282d044a86f261a9aa266d934a45d1055244dce89d5d9","reported_radius":3.00113305},{"item":"flats-to-centre","sha256":"48136c0ce3de775847e9552c7769cd159326d5fe66bae6e220314061514f1af1","reported_radius":2.9632139},{"item":"no-pairs","sha256":"2faa94063d84c1d90ed0c9d02d971eab5bae4a5500494b4330c1a9bbae812f19","reported_radius":"3.03051443"},{"item":"pairs-1-4","sha256":"a9e45b112408be2bd2c257bf0b325caa662e5d914703ad640079ef73b446b83b","reported_radius":2.97438934},{"item":"pairs-5-5","sha256":"e5a5fe2cd0aa58f0b6d60d12a66e3a2976b628f1bdfcb42757ae89188f58ec61","reported_radius":2.95475629},{"item":"pairs-6-3","sha256":"9fab734175cef0454e15d89586a396de552e9a6ec288e71755fce4b183c7f0cb","reported_radius":2.97726863},{"item":"pairs-7-1","sha256":"d59f73e64c56ed584e964006e98ee46c03edc85995d04b5517e6af14194277e1","reported_radius":"3.06352356"},{"item":"rings-159-267","sha256":"c0fd3edd0bbe4ff31859c5ae1e8b72ac69412fa2f0d76005ff746c2991eb8876","reported_radius":"2.99381251"},{"item":"rings-312-411","sha256":"708b6b93a9c8c13123d15f70c8185ebcf6008bfc84058ad55aa4665b307df04a","reported_radius":2.98539036},{"item":"symmetric","sha256":"7201832288052d238d03202edfdf759c63d18bb9789948c682530bca71086a81","reported_radius":2.97035856}],"input_interpretation":"All 12 input hashes matched the task. Scores in input_results are inherited reports, not new measurements. Their JSONs supplied descriptions but no reusable scorer source. The rings-312-411 relaxed candidate reported 2.95352958; it and pairs-5-5 seeded extra basin runs. All are worse than the provided baseline.","verification":{"sample_cli_score":"3.500000","final_cli_score":"2.948527","final_full_precision":{"official_valid":true,"official_score":"2.94852695","official_score_full":2.948526950912552,"mec":[-0.0001819080616875258,0.00013448997007248039,2.948526950912552],"max_pair_area":9.997822348073144e-07,"max_pair_indices":[13,2],"errors":[],"solution_sha256":"cefac3368caae7f9dea0c4cdc0e87d869f3a9bd76ba75292b1cd4b7fff7c8fb9","max_containment_excess":1.98507876802978e-13},"clean_checkout":true,"official_tracked_source_diff_empty":true,"clean_sync":"uv sync --offline using the task-local dependency cache","different_agent":false,"independence_limit":"Second clean checkout and separate process, not a different agent. No delegation capability was available.","retention":"Every retained scored pose was rounded to six decimals and accepted by unmodified validate_and_score.","plot":"Embedded standalone SVG generated from final solution and official MEC; raster preview inspected.","delivery_checks":{"json_and_svg_parse":true,"source_compiles":true,"sha256_matches":true,"archived_scores_reverified":9,"strict_witness_reverified":true}},"plot_svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 680\"><style>.piece{stroke:#555;stroke-width:.012}.flat{fill:none;stroke:#174c80;stroke-width:.022}.label{text-anchor:middle;dominant-baseline:middle;font:13px sans-serif}</style><rect width=\"640\" height=\"680\" fill=\"white\"/><text x=\"320\" y=\"28\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"20\">15 unit semicircles — R = 2.94852695</text><g transform=\"translate(320 330) scale(90 -90)\"><circle cx=\"-0.000181908\" cy=\"0.000134490\" r=\"2.948526950913\" fill=\"none\" stroke=\"black\" stroke-width=\".02\"/><path d=\"M 0.00513812 -0.16933089 A 1 1 0 0 1 1.08571188 1.51363089 Z\" fill=\"#8dd3c7\" class=\"piece\"/><path d=\"M 0.00513812 -0.16933089 L 1.08571188 1.51363089\" class=\"flat\"/><path d=\"M 1.92757538 -0.62833747 A 1 1 0 0 1 0.34339262 -1.84914253 Z\" fill=\"#ffffb3\" class=\"piece\"/><path d=\"M 1.92757538 -0.62833747 L 0.34339262 -1.84914253\" class=\"flat\"/><path d=\"M -1.57902877 -0.11683391 A 1 1 0 0 1 0.41078077 -0.31847209 Z\" fill=\"#bebada\" class=\"piece\"/><path d=\"M -1.57902877 -0.11683391 L 0.41078077 -0.31847209\" class=\"flat\"/><path d=\"M 1.18165936 -0.11818064 A 1 1 0 0 1 2.50457664 1.38178264 Z\" fill=\"#fb8072\" class=\"piece\"/><path d=\"M 1.18165936 -0.11818064 L 2.50457664 1.38178264\" class=\"flat\"/><path d=\"M 1.04701933 2.56812422 A 1 1 0 0 1 -0.49064733 1.28922578 Z\" fill=\"#80b1d3\" class=\"piece\"/><path d=\"M 1.04701933 2.56812422 L -0.49064733 1.28922578\" class=\"flat\"/><path d=\"M -0.70824096 2.80922927 A 1 1 0 0 1 -0.73918904 0.80946873 Z\" fill=\"#fdb462\" class=\"piece\"/><path d=\"M -0.70824096 2.80922927 L -0.73918904 0.80946873\" class=\"flat\"/><path d=\"M -1.77335097 2.06507325 A 1 1 0 0 1 -1.47592303 0.08731275 Z\" fill=\"#b3de69\" class=\"piece\"/><path d=\"M -1.77335097 2.06507325 L -1.47592303 0.08731275\" class=\"flat\"/><path d=\"M -1.56360758 0.89715619 A 1 1 0 0 1 0.42398758 0.67474781 Z\" fill=\"#8dd3c7\" class=\"piece\"/><path d=\"M -1.56360758 0.89715619 L 0.42398758 0.67474781\" class=\"flat\"/><path d=\"M -0.73591555 1.08523404 A 1 1 0 0 1 0.80175155 2.36413196 Z\" fill=\"#ffffb3\" class=\"piece\"/><path d=\"M -0.73591555 1.08523404 L 0.80175155 2.36413196\" class=\"flat\"/><path d=\"M 1.69977729 0.58553394 A 1 1 0 0 1 0.82420471 2.38369206 Z\" fill=\"#bebada\" class=\"piece\"/><path d=\"M 1.69977729 0.58553394 L 0.82420471 2.38369206\" class=\"flat\"/><path d=\"M -2.57162246 0.65815809 A 1 1 0 0 1 -1.31824354 -0.90038009 Z\" fill=\"#fb8072\" class=\"piece\"/><path d=\"M -2.57162246 0.65815809 L -1.31824354 -0.90038009\" class=\"flat\"/><path d=\"M -2.57059891 -1.07917153 A 1 1 0 0 1 -0.57561309 -1.22070447 Z\" fill=\"#80b1d3\" class=\"piece\"/><path d=\"M -2.57059891 -1.07917153 L -0.57561309 -1.22070447\" class=\"flat\"/><path d=\"M 1.97524444 -2.18881492 A 1 1 0 0 1 0.12402556 -2.94577508 Z\" fill=\"#fdb462\" class=\"piece\"/><path d=\"M 1.97524444 -2.18881492 L 0.12402556 -2.94577508\" class=\"flat\"/><path d=\"M -1.50123499 -2.48375475 A 1 1 0 0 1 -0.07756701 -1.07905925 Z\" fill=\"#b3de69\" class=\"piece\"/><path d=\"M -1.50123499 -2.48375475 L -0.07756701 -1.07905925\" class=\"flat\"/><path d=\"M 1.01908906 -1.32846226 A 1 1 0 0 1 2.60324294 -0.10761974 Z\" fill=\"#8dd3c7\" class=\"piece\"/><path d=\"M 1.01908906 -1.32846226 L 2.60324294 -0.10761974\" class=\"flat\"/></g><text x=\"400.90\" y=\"289.93\" class=\"label\">0</text><text x=\"399.12\" y=\"411.55\" class=\"label\">1</text><text x=\"263.62\" y=\"387.20\" class=\"label\">2</text><text x=\"514.23\" y=\"298.14\" class=\"label\">3</text><text x=\"320.87\" y=\"127.36\" class=\"label\">4</text><text x=\"217.07\" y=\"166.57\" class=\"label\">5</text><text x=\"136.40\" y=\"238.76\" class=\"label\">6</text><text x=\"264.51\" y=\"296.83\" class=\"label\">7</text><text x=\"347.13\" y=\"203.84\" class=\"label\">8</text><text x=\"467.56\" y=\"179.84\" class=\"label\">9</text><text x=\"115.50\" y=\"364.59\" class=\"label\">10</text><text x=\"175.75\" y=\"471.20\" class=\"label\">11</text><text x=\"400.16\" y=\"526.07\" class=\"label\">12</text><text x=\"275.50\" y=\"517.23\" class=\"label\">13</text><text x=\"506.08\" y=\"424.56\" class=\"label\">14</text><text x=\"320\" y=\"650\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"14\">Inherited packing; blue lines are flat edges; labels are zero based.</text></svg>","search_wall_minutes":18.458762248357136,"total_attempts":831,"total_valid_candidates":692,"search_source_python":"import numpy as np, json, math, time, sys, hashlib\nfrom pathlib import Path\nfrom scipy.optimize import minimize\nfrom semicircle_packing.geometry import Semicircle,semicircle_polygon\nfrom semicircle_packing.scoring import validate_and_score,compute_mec\nI,J=np.triu_indices(15,1); K=len(I); ids=np.arange(K); root=Path(__file__).parent\ndef uv(q):\n u=np.column_stack((np.cos(q[:,2]),np.sin(q[:,2]))); return u,np.column_stack((-u[:,1],u[:,0]))\ndef gaps(q,jac=False):\n u,v=uv(q); d=q[J,:2]-q[I,:2]\n ns=[-u[I],-u[J],u[I],u[J]]\n for a in [-1,0,1]:\n  for b in [-1,0,1]:\n   w=d+b*v[J]-a*v[I]; ns.append(w/np.maximum(np.linalg.norm(w,axis=1)[:,None],1e-30))\n n=np.stack(ns,axis=1); da=np.einsum('kld,kd->kl',n,u[I]); db=-np.einsum('kld,kd->kl',n,u[J])\n va=np.einsum('kld,kd->kl',n,v[I]); vb=-np.einsum('kld,kd->kl',n,v[J])\n ha=np.where(da>=0,1,np.abs(va)); hb=np.where(db>=0,1,np.abs(vb))\n g=np.einsum('kld,kd->kl',n,d)-ha-hb; win=g.argmax(axis=1); val=g[ids,win]\n if not jac:return val\n n=n[ids,win]; t=np.column_stack((-n[:,1],n[:,0]))\n sa=np.where(da[ids,win]>=0,0,np.sign(va[ids,win])); sb=np.where(db[ids,win]>=0,0,np.sign(vb[ids,win]))\n A=np.zeros((K,46)); A[ids,3*I]=-n[:,0]; A[ids,3*I+1]=-n[:,1]; A[ids,3*J]=n[:,0]; A[ids,3*J+1]=n[:,1]\n A[ids,3*I+2]=sa*np.sum(n*u[I],axis=1); A[ids,3*J+2]=-sb*np.sum(n*u[J],axis=1)\n rot=np.sum((d-sa[:,None]*v[I]+sb[:,None]*v[J])*t,axis=1)\n for index,part in [(0,I),(1,J),(2,I),(3,J)]:\n  m=win==index; A[ids[m],3*part[m]+2]+=rot[m]\n return val,A\ndef boundary(q,jac=False):\n u,v=uv(q); c=q[:,:2]; cn=np.linalg.norm(c,axis=1); arc=np.sum(c*u,axis=1)>=0\n sign=np.where(np.sum(c*v,axis=1)>=0,1,-1); p=c+sign[:,None]*v\n dist=np.where(arc,cn+1,np.linalg.norm(p,axis=1))\n if not jac:return dist\n a=np.zeros((15,46)); nc=np.where(arc[:,None],c/np.maximum(cn[:,None],1e-30),p/np.maximum(dist[:,None],1e-30))\n z=np.arange(15); a[z,3*z]=-nc[:,0]; a[z,3*z+1]=-nc[:,1]\n a[z,3*z+2]=np.where(arc,0,sign*np.sum(nc*u,axis=1)); a[:,-1]=1\n return dist,a\ndef constraints(x,allow=0):\n q=x[:45].reshape(15,3); g,A=gaps(q,True); d,B=boundary(q,True)\n return np.r_[g+allow,x[-1]-d],np.vstack((A,B))\ndef repair(q,allow=0,limit=220,targets=None):\n x=np.r_[q.ravel(),max(boundary(q))]; cache=[None,None]\n seams=[] if targets is None else [k for k,(i,j) in enumerate(zip(I,J)) if abs(math.sin(q[i,2]-q[j,2]))<.12 and math.cos(q[i,2]-q[j,2])<0 and np.linalg.norm(q[i,:2]-q[j,:2])<1.99]\n def c(x):\n  if cache[0] is None or not np.array_equal(x,cache[0]):\n   val,A=constraints(x,allow);p=x[:45].reshape(15,3)\n   for k in seams:\n    i,j=I[k],J[k];val[k]=targets[k]-area(p[i],p[j]);A[k]=0\n    for z in [i,j]:\n     for d in range(3):\n      pp=p.copy();pm=p.copy();pp[z,d]+=1e-8;pm[z,d]-=1e-8\n      A[k,3*z+d]=-(area(pp[i],pp[j])-area(pm[i],pm[j]))/2e-8\n   cache[:]=[x.copy(),(val,A)]\n  return cache[1]\n r=minimize(lambda x:x[-1],x,jac=lambda x:np.r_[np.zeros(45),1.],constraints={'type':'ineq','fun':lambda x:c(x)[0],'jac':lambda x:c(x)[1]},method='SLSQP',options={'maxiter':limit,'ftol':2e-11})\n return r.x[:45].reshape(15,3),float(r.x[-1]),float(min(c(r.x)[0])),r.success\ndef own_mec(q):\n def f(z):\n  p=q.copy();p[:,:2]-=z[:2];d,B=boundary(p,True)\n  return z[2]-d,np.column_stack((-B[:,0:45:3].sum(axis=1),-B[:,1:45:3].sum(axis=1),np.ones(15)))\n c=q[:,:2].mean(axis=0);p=q.copy();p[:,:2]-=c\n r=minimize(lambda z:z[2],np.r_[c,max(boundary(p))],jac=lambda z:np.array([0.,0.,1.]),method='SLSQP',constraints={'type':'ineq','fun':lambda z:f(z)[0],'jac':lambda z:f(z)[1]},options={'ftol':1e-12,'maxiter':100})\n p=q.copy();p[:,:2]-=r.x[:2]; return [*r.x[:2],float(max(boundary(p)))]\ndef area(a,b):\n a=np.array(a);b=np.array(b);d=b[:2]-a[:2]\n if np.linalg.norm(d)>=2:return 0.\n b[:2]-=a[:2];a[:2]=0\n def one(a,b):\n  u=np.array([math.cos(a[2]),math.sin(a[2])]);v=np.array([-u[1],u[0]])\n  ub=np.array([math.cos(b[2]),math.sin(b[2])]);vb=np.array([-ub[1],ub[0]])\n  d=b[:2]-a[:2];ds=np.linalg.norm(d);lo=a[2]-math.pi/2;hi=lo+math.pi\n  cuts=[lo,hi]\n  def cut(t):\n   t=lo+(t-lo)%(2*math.pi)\n   if lo<t<hi:cuts.append(t)\n  if ds>1e-14 and ds<2:\n   t=math.atan2(d[1],d[0]);h=math.acos(ds/2);cut(t-h);cut(t+h)\n  h=float(d@ub)\n  if abs(h)<1:\n   t=math.atan2(ub[1],ub[0]);s=math.acos(h);cut(t-s);cut(t+s)\n  cuts=sorted(cuts);total=0.\n  for l,r in zip(cuts[:-1],cuts[1:]):\n   t=(l+r)/2;p=a[:2]+[math.cos(t),math.sin(t)]\n   if np.sum((p-b[:2])**2)<=1+1e-13 and (p-b[:2])@ub>=-1e-13:\n    total+=.5*(r-l+a[0]*(math.sin(r)-math.sin(l))-a[1]*(math.cos(r)-math.cos(l)))\n  p=a[:2]+v;w=-2*v;f=p-b[:2];cuts=[0.,1.]\n  B=2*f@w;C=f@f-1;disc=B*B-16*C\n  if disc>0:\n   for t in [(-B-math.sqrt(disc))/8,(-B+math.sqrt(disc))/8]:\n    if 0<t<1:cuts.append(t)\n  den=w@ub\n  if abs(den)>1e-14:\n   t=-(f@ub)/den\n   if 0<t<1:cuts.append(t)\n  cuts=sorted(cuts)\n  for l,r in zip(cuts[:-1],cuts[1:]):\n   pt=p+(l+r)/2*w\n   if np.sum((pt-b[:2])**2)<1+1e-13 and (pt-b[:2])@ub>1e-13:total+=.5*(p[0]*w[1]-p[1]*w[0])*(r-l)\n  return total\n if np.linalg.norm(a[:2]-b[:2])<1e-12:\n  diff=abs(math.atan2(math.sin(a[2]-b[2]),math.cos(a[2]-b[2])));return (math.pi-diff)/2\n return max(0.,one(a,b)+one(b,a))\ndef score(q):\n q=np.round(q,6);s=[Semicircle(*r) for r in q];r=validate_and_score(s)\n return r,q\ndef official_areas(q):\n p=[semicircle_polygon(Semicircle(*r)) for r in q]\n return np.array([p[i].intersection(p[j]).area for i,j in zip(I,J)])\ndef allowances(q,target=9.7e-7,maxdepth=.004):\n g,A=gaps(q,True);out=np.zeros(K)\n for k,(i,j) in enumerate(zip(I,J)):\n  if g[k]>.02:continue\n  n=A[k,3*j:3*j+2]; b=q[j].copy();b[:2]-=g[k]*n\n  lo=0.;hi=maxdepth\n  for it in range(23):\n   mid=(lo+hi)/2;bb=b.copy();bb[:2]-=mid*n\n   if area(q[i],bb)<=(target if np.ndim(target)==0 else target[k]):lo=mid\n   else:hi=mid\n  out[k]=lo\n return out\ndef graph(q):\n g=gaps(q);edges=[[int(i),int(j)] for i,j,h in zip(I,J,g) if h<.0003]\n d=boundary(q);rim=np.flatnonzero(d>d.max()-.0003).tolist()\n key=hashlib.sha256(json.dumps([edges,rim]).encode()).hexdigest()[:16]\n return key,{'edges':edges,'rim':rim}\ndef check():\n rng=np.random.default_rng(23004); stats={'pair_cases':0,'decision_disagreements':0,'max_area_difference':0.,'mec_cases':0,'max_radius_difference':0.,'max_jacobian_error':0.}\n for k in range(250):\n  a=np.r_[rng.normal(size=2),rng.uniform(-math.pi,math.pi)];b=np.r_[rng.normal(size=2),rng.uniform(-math.pi,math.pi)]\n  if k>=200:\n   a=np.array([0.,0.,0.]);typ=k%3;e=rng.uniform(-2e-4,2e-4)\n   b=np.array([2+e,0.,math.pi]) if typ==0 else np.array([1+e,0.,0.]) if typ==1 else np.array([e,rng.uniform(-1.5,1.5),math.pi])\n  a=np.round(a,6);b=np.round(b,6);exact=area(a,b);poly=semicircle_polygon(Semicircle(*a)).intersection(semicircle_polygon(Semicircle(*b))).area\n  stats['pair_cases']+=1;stats['decision_disagreements']+=int((exact>1e-6)!=(poly>1e-6));stats['max_area_difference']=max(stats['max_area_difference'],abs(exact-poly))\n for k in range(30):\n  q=np.c_[rng.normal(size=(15,2))*2,rng.uniform(-math.pi,math.pi,15)] if k<20 else np.array(json.loads((root/'baseline.json').read_text()))+rng.normal(size=(15,3))*1e-5\n  q=np.round(q,6);m=own_mec(q);o=compute_mec([Semicircle(*r) for r in q]);stats['mec_cases']+=1;stats['max_radius_difference']=max(stats['max_radius_difference'],abs(m[2]-o[2]))\n  x=np.r_[q.ravel(),4.];val,A=constraints(x)\n  for j in range(45):\n   xp=x.copy();xm=x.copy();xp[j]+=1e-7;xm[j]-=1e-7\n   num=(constraints(xp)[0]-constraints(xm)[0])/2e-7\n   stats['max_jacobian_error']=max(stats['max_jacobian_error'],float(max(abs(num-A[:,j]))))\n (root/'scorer-check.json').write_text(json.dumps(stats));print(stats,flush=True)\ndef run(seed,kind,seconds,amp,tag):\n rng=np.random.default_rng(seed);t=time.monotonic();last=t;attempts=valid=0;best=None;cur=None;curR=10.;archive={};errors={};bestq=None\n if kind=='baseline':cur=np.array(json.loads((root/'baseline.json').read_text()))\n elif kind.startswith('file:'):cur=np.array(json.loads((root/kind[5:]).read_text())['q'])\n else:cur=np.c_[rng.normal(size=(15,2))*1.3,rng.uniform(-math.pi,math.pi,15)]\n def save():\n  data=dict(seed=seed,start_kind=kind,minutes=(time.monotonic()-t)/60,attempts=attempts,valid_count=valid,best_radius=best,score_kind='official rounded 6 decimals',errors=errors,amplitude=amp,q=None if bestq is None else bestq.tolist(),archive=archive)\n  (root/(tag+'.json')).write_text(json.dumps(data));print(tag,attempts,best,len(archive),flush=True)\n while time.monotonic()-t<seconds:\n  q=cur.copy()\n  if attempts:q+=rng.normal(size=(15,3))*amp\n  q,R,g,ok=repair(q,0,180 if kind!='fresh' or attempts else 400);attempts+=1\n  if g<-2e-7:errors['strict_repair_infeasible']=errors.get('strict_repair_infeasible',0)+1\n  else:\n   aq=allowances(q,8.5e-7,.0004) if tag=='pilot' else allowances(q);p,pr,pg,pok=repair(q,aq,120)\n   candidates=[p,q]\n   rr=None\n   for cand in candidates:\n    for scale in [1.,1.0000003,1.000001,1.000003]:\n     vq=cand.copy();vq[:,:2]*=scale;r,vq=score(vq)\n     if r.valid:\n      rr=r;break\n    if rr:break\n   if rr:\n    valid+=1\n    if best is None or rr.score<best:\n     best=rr.score;bestq=vq.copy()\n    key,gg=graph(vq)\n    if key not in archive or rr.score<archive[key]['radius']:archive[key]={**gg,'radius':rr.score,'q':vq.tolist()}\n    if rr.score<=curR or rng.random()<math.exp(min(0,(curR-rr.score)/2e-5)):\n     cur=vq.copy();curR=rr.score\n   else:errors['rounded_invalid']=errors.get('rounded_invalid',0)+1\n  if time.monotonic()-last>=60:save();last=time.monotonic()\n save()\ndef gridrepair(q):\n from scipy.optimize import milp,LinearConstraint,Bounds\n q=np.round(q,6);m=own_mec(q)\n if m[2]>2.9485299489:return None\n p=q.copy();p[:,:2]-=m[:2];d,B=boundary(p,True)\n C=np.zeros((15,48));C[:,:45]=B[:,:45];C[:,45]=-B[:,0:45:3].sum(1);C[:,46]=-B[:,1:45:3].sum(1);C[:,47]=1\n vals=list((m[2]-d)*1e6);rows=list(C);delta=np.zeros(48);p=q.copy()\n for repeat in range(3):\n  pa=official_areas(p)\n  for k,(i,j) in enumerate(zip(I,J)):\n   if pa[k]<(1e-10 if repeat==0 else 9.999e-7):continue\n   row=np.zeros(48)\n   for z in [i,j]:\n    for h in range(3):\n     pp=p.copy();pm=p.copy();pp[z,h]+=1e-8;pm[z,h]-=1e-8\n     row[3*z+h]=-(area(pp[i],pp[j])-area(pm[i],pm[j]))/2e-8\n   norm=max(abs(row))\n   if norm>1e-12:rows.append(row/norm);vals.append(((9.999e-7-pa[k])*1e6-row@delta)/norm)\n  r=milp(np.r_[np.zeros(47),1.],integrality=np.r_[np.ones(45),np.zeros(3)],bounds=Bounds(np.full(48,-3.),np.r_[np.full(47,3.),min(3.,(2.9485269489-m[2])*1e6)]),constraints=LinearConstraint(np.array(rows),-np.array(vals),np.inf),options={'time_limit':10.,'mip_rel_gap':1e-6})\n  if r.x is None:return None\n  delta=r.x;p=np.round(q+delta[:45].reshape(15,3)*1e-6,6)\n  if max(official_areas(p))<=1e-6:return p\n return None\ndef polish(seed,seconds,amp,tag):\n rng=np.random.default_rng(seed);t=time.monotonic();last=t;attempts=valid=0;errors={};archive={}\n cur=np.array(json.loads((root/'baseline.json').read_text()));bestq=None;best=None;curR=score(cur)[0].score\n def save():\n  d=dict(seed=seed,start_kind='baseline_polygon_calibrated',minutes=(time.monotonic()-t)/60,attempts=attempts,valid_count=valid,best_radius=best,score_kind='official rounded 6 decimals',errors=errors,amplitude=amp,q=None if bestq is None else bestq.tolist(),archive=archive)\n  (root/(tag+'.json')).write_text(json.dumps(d));print(tag,attempts,best,len(archive),flush=True)\n while time.monotonic()-t<seconds:\n  attempts+=1;q=cur.copy();a=official_areas(q);exact=np.array([area(q[i],q[j]) for i,j in zip(I,J)])\n  target=9.99e-7+np.maximum(0,exact-a);allow=allowances(q,target)\n  q+=rng.normal(size=(15,3))*amp\n  q,R,g,ok=repair(q,allow,180,targets=target if 'seams' in tag or 'grid' in tag else None)\n  if g < -2e-7:errors['repair_infeasible']=errors.get('repair_infeasible',0)+1\n  else:\n   a=official_areas(q);exact=np.array([area(q[i],q[j]) for i,j in zip(I,J)])\n   target=9.99e-7+np.maximum(0,exact-a);allow=allowances(q,target);q,R,g,ok=repair(q,allow,120,targets=target if 'seams' in tag or 'grid' in tag else None)\n   chosen=None;cr=1e9\n   for k in range(16):\n    p=q.copy();phi=rng.uniform(-2e-5,2e-5) if k else 0.;c=math.cos(phi);s=math.sin(phi)\n    p[:,:2]=p[:,:2]@np.array([[c,s],[-s,c]]);p[:,2]+=phi\n    p[:,:2]*=1+(k//4)*1e-7;p[:,:2]+=rng.uniform(-.5e-6,.5e-6,2) if k else 0\n    p=np.round(p,6)\n    if max(official_areas(p))<=1e-6:\n     r=own_mec(p)[2]\n     if r<cr:chosen=p;cr=r\n   pg=gridrepair(q) if 'grid' in tag else None\n   if pg is not None and max(official_areas(pg))<=1e-6:\n    gr=own_mec(pg)[2]\n    if gr<cr:chosen=pg;cr=gr\n   if chosen is not None:\n    res,p=score(chosen)\n    if res.valid:\n     valid+=1;r=res.score\n     if best is None or r<best:best=r;bestq=p.copy()\n     key,gg=graph(p)\n     if key not in archive or r<archive[key]['radius']:archive[key]={**gg,'radius':r,'q':p.tolist()}\n     if r<=curR or rng.random()<math.exp(min(0,(curR-r)/2e-6)):cur=p.copy();curR=r\n    else:errors['official_invalid']=errors.get('official_invalid',0)+1\n   else:errors['rounding_failed']=errors.get('rounding_failed',0)+1\n  if time.monotonic()-last>=60:save();last=time.monotonic()\n save()\nif __name__=='__main__':\n if sys.argv[1]=='check':check()\n elif sys.argv[1]=='run':run(int(sys.argv[2]),sys.argv[3],float(sys.argv[4]),float(sys.argv[5]),sys.argv[6])\n elif sys.argv[1]=='polish':polish(int(sys.argv[2]),float(sys.argv[3]),float(sys.argv[4]),sys.argv[5])\n","commands":{"setup":["git clone https://github.com/benedictbrady/shape-packing-challenge official","git -C official checkout 78a78626f098cd236f3a09bb2cb242f72951599d","cd official && UV_CACHE_DIR=../uv-cache uv sync","cd official && UV_CACHE_DIR=../uv-cache uv run python run.py","cd official && UV_CACHE_DIR=../uv-cache uv pip install --python .venv/bin/python scipy"],"uv_bootstrap":"Use a standalone uv release placed inside the scratch directory. Invoke that executable as uv in these reproduction commands.","extract":"In a scratch directory, save search_source_python as search.py; write baseline.json as [[v[k] for k in (\"x\",\"y\",\"theta\")] for v in result[\"solution\"]]; write seed_inputs entries as {\"q\":rows} using their filenames. All commands below run from that directory.","check":"OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py check","runs":["OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 1336728322 baseline 60 0.0001 pilot","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 950278438 baseline 350 0.001 baseline-1e-3","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 1184289033 baseline 350 0.01 baseline-1e-2","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 1141635015 baseline 350 0.03 baseline-3e-2","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 907673142 fresh 350 0.01 fresh-a","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 1793093813 fresh 350 0.03 fresh-b","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 726428989 baseline 350 0.0001 baseline-1e-4","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py polish 680520054 350 0.0001 calibrated-1e-4","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py polish 321499256 350 0.001 calibrated-seams-1e-3","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 940708590 file:prior-five-pairs.json 350 0.03 prior-five-pairs-hop","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 1817230273 file:prior-relaxed-rings.json 350 0.03 prior-relaxed-rings-hop","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py polish 735308165 350 0.03 calibrated-seams-3e-2","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py polish 1699501430 350 0.0001 grid-1e-4","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py polish 396429709 350 0.01 grid-1e-2","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 1188623303 fresh 240 0.0001 fresh-c","OPENBLAS_NUM_THREADS=1 official/.venv/bin/python search.py run 703923979 fresh 240 0.001 fresh-d"],"strict":"q,R,g,ok=repair(baseline_rows,allow=-2e-6,limit=300); q=numpy.round(q,6); score(q); min(gaps(q)); max(area(q[i],q[j]) for i,j in zip(I,J))","final":["git clone https://github.com/benedictbrady/shape-packing-challenge clean","git -C clean checkout 78a78626f098cd236f3a09bb2cb242f72951599d","cd clean && UV_CACHE_DIR=../uv-cache uv sync --offline","Save solution_json verbatim as solution.json beside clean/","cd clean && UV_CACHE_DIR=../uv-cache uv run --offline python run.py ../solution.json"],"full_precision_python":"import json; from semicircle_packing.geometry import Semicircle; from semicircle_packing.scoring import validate_and_score; q=json.load(open(\"solution.json\")); r=validate_and_score([Semicircle(**{k:round(float(v[k]),6) for k in (\"x\",\"y\",\"theta\")}) for v in q]); print(r); print(format(r.score,\".8f\")); print(repr(r.score))"},"seed_inputs":{"prior-five-pairs.json":[[-1.4865,0.113483,-1.14513],[-1.952312,-0.09771,1.996464],[-1.580048,1.150878,1.976954],[-0.740182,1.512081,-1.164638],[1.351994,1.760803,3.374544],[1.46187,1.297693,0.23295],[0.506589,-0.051643,2.011721],[-0.441939,-0.499263,-1.129872],[1.952648,0.090758,-0.488671],[1.55115,-0.66439,2.652922],[-0.955737,-1.70518,-1.270461],[2.02246,-1.907941,2.385323],[-1.735332,-0.899831,4.181876],[-0.384018,2.753745,4.850948],[0.023087,-1.95462,-0.391567]],"prior-relaxed-rings.json":[[-0.601236,-0.101191,-1.859253],[0.893479,-1.429912,2.045024],[0.684425,0.559049,-0.450825],[-0.286427,0.848423,-0.695388],[-1.587232,1.138844,1.639909],[-0.815408,1.775215,0.717967],[-1.331656,1.156535,-1.501679],[-1.941586,0.215682,-2.61545],[-1.756171,-0.85565,-1.802945],[-1.09777,-1.615915,-0.964492],[0.569721,-2.720065,1.777263],[1.653958,-1.039559,-1.096565],[1.933612,0.278243,-0.895678],[1.519565,1.227677,0.311659],[0.242813,1.938376,0.518648]]},"notes":["Tie with the supplied published packing; No improvement over the inherited published packing. Return the verified fallback, not a new record. Its radius is strictly below the numerical cutoff 2.94853 by 0.000003049087448; the cutoff is a rounded presentation of the supplied record. New basin candidates also rounded to 2.94853 at five decimals but did not improve the full-precision fallback.","One search strategy only, with repair variants. Fresh starts are independent Gaussian centers (standard deviation 1.3) and uniform angles. Every run first repairs its initial pose; subsequent attempts perturb all 45 pose coordinates. Low temperatures: 2e-5 for the main runs and 2e-6 for calibrated repair runs. No rigid pairs, symmetry or ring constraints were imposed.","Main runs use conservative 9.7e-7 exact-area targets and official checks after rounding. The pilot used 8.5e-7 and a smaller depth bracket. Calibrated runs target 9.99e-7 polygon area via analytic-minus-polygon corrections. Fixed support-depth allowances were insufficient at sliding seams; direct seam-area constraints corrected the continuous repair, but rounding usually invalidated these tighter candidates.","Runs with zero valid_count are failed proposals, not missing claimed solutions. Unretained diagnostic continuous solves and eight unconstrained integer-rounding probes are not included in basin attempt counts. One later diagnostic grid repair was valid at 2.948530346116421, still worse than the retained best new result. These diagnostics informed the radius-capped grid repair in the delivered source.","fresh-d exited with status 143 before its final checkpoint; its row reports the last saved completed attempts. The cause was not determined. No score was inferred from unfinished work.","Minute-target checkpoints are written at completed local solves, and once at each run end. Commands are bounded below eight minutes. Run minutes sum across concurrent commands; search_wall_minutes is elapsed span. Timing limits make exact attempt counts and MILP paths timing-dependent, even with fixed geometric RNG seeds.","The supplied configuration has no full disks and is asymmetric. Its two sliding seams and inward-facing cap distinguish it from paired-disk or symmetric-ring layouts. Small moves mostly returned to the same contact pattern; this bounded search does not rule out better packings.","Only the requested two JSON files are delivered. solution_json is the exact solution file text; plot_svg is a standalone plot; search_source_python contains the reproducible search and independent scorer. Execution of that source requires the pinned official project and its Python dependencies plus SciPy. No submission or sign-in was performed."]}
