{"method":"Seeded single and double pi flips, local SLSQP repair with analytic overlap areas and exact farthest-point containment, followed by a six-decimal lattice repair of the best flip descendant.","seed":23003,"official_valid":true,"official_score":"2.94852695","official_score_full":2.948526950912552,"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","solution_sha256":"cefac3368caae7f9dea0c4cdc0e87d869f3a9bd76ba75292b1cd4b7fff7c8fb9","mec":{"x":-0.0001819080616875258,"y":0.00013448997007248039,"radius":2.948526950912552},"max_pair_area":9.997822348073146e-07,"inherited_baseline":{"official_valid":true,"official_score":"2.94852695","official_score_full":2.948526950912552,"mec":{"x":-0.0001819080616875258,"y":0.00013448997007248039,"radius":2.948526950912552},"max_pair_area":9.997822348073146e-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}],"retained":true,"origin":"Requester-supplied published packing"},"best_new_score":2.9485289368486356,"best_fresh_score":3.0102905672615603,"strict_radius":null,"structure":{"full_disks":0,"full_disk_pairs":[],"nearly_antiparallel_seams":[{"pieces":[1,14],"center_offset":0.8530378735583785,"angle_error_from_pi":2.365358979350418e-05,"axial_offset":3.1901608458210008e-06},{"pieces":[4,8],"center_offset":0.31901273938198765,"angle_error_from_pi":3.464102071859543e-07,"axial_offset":5.835752388640376e-07}],"flats_facing_outward":[1,7,8,12],"flats_facing_centre":[0,2,3,4,5,6,9,10,11,13,14],"pieces_with_rim_contact_within_3e_6":[3,4,5,6,9,10,11,12,13,14],"symmetry":"No apparent rotational or mirror symmetry.","indices":"Zero-based solution indices. Flat direction uses the outward normal of the diameter."},"scorer_check":{"seed":1870927332,"overlap":{"random":{"cases":200,"disagreements":0,"max_area_difference":1.6843387440346191e-07},"tight_arc":{"cases":61,"disagreements":1,"max_area_difference":2.043177688287929e-09},"tight_flat":{"cases":61,"disagreements":0,"max_area_difference":2.8123247207043588e-15},"baseline":{"cases":105,"disagreements":6,"max_area_difference":1.7825020602494306e-09}},"mec_cases":52,"max_radius_difference":8.020251129892131e-13,"sample_score":3.5,"baseline_exact_max_area":1.0013726914510912e-06,"protocol":"Round all inputs with Python round(value, 6). Compare individual analytic pair areas against 4096-arc-point polygon intersections. Draw 200 uniform random pairs with centres in [-1,1]^2 and angles in [-pi,pi]. Use 61 arc penetrations evenly spaced from 0.00006 to 0.00011 and 61 flat penetrations evenly spaced from -0.000002 to 0.000002 with a tangential shift of 0.5. Check all baseline pairs. Compare MEC radii for both the sample and inherited packing and 50 random 15-piece arrays with centres in [-3,3]^2 and angles in [-pi,pi].","analytic_final_mec":{"x":-0.00018190806167250884,"y":0.0001344899701147817,"radius":2.9485269509127683},"analytic_final_max_pair_area":1.0013726914510912e-06},"runs":[{"seed":960610141,"order_seed":2117144898,"start_kind":"baseline","score_kind":"official","masks":[[10,13],[3,11],[4,13],[2,9],[1,14],[3,9],[0,14],[6,14],[3,12],[2,7],[11,14],[3],[2],[0,3],[6,8],[2,8],[11],[9,14],[0,2],[2,6],[0,1],[4,12],[0,7],[5,8],[2,4],[12],[5,11],[3,13],[1],[0,11],[3,4],[9,12],[0,5],[6,11],[0,10],[5,14],[3,10],[8,11],[3,6],[1,7],[8,9],[5,6],[1,10],[9,11],[10,12],[3,7],[4,5],[0,4],[4,14],[5,10],[4],[6,13],[1,6],[11,13],[6,12],[12,14],[5,7],[7,8],[2,14],[3,8],[14],[1,11],[2,12],[13,14],[2,10],[11,12],[1,13],[9],[5,9],[5,12],[10],[7],[1,3],[1,12],[6,9],[8,14],[3,14],[9,13],[1,5],[6,10],[2,5],[8,13],[4,7],[2,13],[0,13],[0],[1,4],[8],[0,12],[7,14],[3,5],[7,12],[7,11],[0,6],[1,9],[4,8],[4,11],[0,8],[10,14],[7,10],[4,6],[4,9],[5],[2,11],[1,8],[8,12],[6],[10,11],[2,3],[12,13],[1,2],[4,10],[7,13],[0,9],[7,9],[5,13],[9,10],[8,10],[13],[6,7]],"valid_count":40,"best_radius":2.964246505504951,"best":[{"x":0.488891,"y":0.627369,"theta":-0.501296},{"x":1.130279,"y":-1.266914,"theta":2.217361},{"x":-0.584481,"y":-0.237698,"theta":-1.703978},{"x":1.873629,"y":0.589727,"theta":-0.791506},{"x":0.259525,"y":1.947026,"theta":2.217446},{"x":-0.766617,"y":1.808469,"theta":3.013135},{"x":-1.646525,"y":1.071083,"theta":-2.957649},{"x":-0.573354,"y":0.769683,"theta":-1.715862},{"x":-0.060631,"y":1.70533,"theta":-0.924147},{"x":1.912414,"y":2.032099,"theta":-2.325862},{"x":-1.959968,"y":-0.12957,"theta":-2.459894},{"x":-1.583538,"y":-1.162184,"theta":-1.649246},{"x":1.035569,"y":-2.591207,"theta":1.950999},{"x":-0.798802,"y":-1.794485,"theta":-0.803049},{"x":1.815564,"y":-0.749661,"theta":-0.924225}],"errors":{"precheck_overlap":71,"official_overlap_or_containment":9},"best_mask":[9],"attempts":120,"minutes":0.4767538962846932},{"seed":941784929,"order_seed":809571860,"start_kind":"fresh","score_kind":"official","masks":[[2,8],[3,5],[5],[6,12],[6],[4,10],[5,9],[0,1],[2,4],[9,11],[10,11],[0,11],[8],[2,9],[1,9],[0,8],[7,12],[3],[9,14],[3,14],[1],[0],[1,2],[0,13],[10,13],[9,12],[5,7],[11],[7,10],[4,13],[9,13],[11,14],[2,6],[10],[0,14],[6,14],[0,3],[9],[8,13],[2,12],[4,7],[14],[2,14],[8,11],[1,10],[7,14],[0,5],[7,13],[8,9],[3,10],[2,5],[1,11],[3,11],[10,12],[3,6],[5,14],[8,14],[3,8],[5,8],[7,8],[1,14],[1,3],[0,7],[4,9],[3,12],[9,10],[4,14],[2,7],[8,12],[0,10],[1,5],[3,13],[5,6],[12,14],[1,13],[2,11],[11,12],[2],[4,5],[6,9],[4],[4,6],[0,6],[11,13],[1,8],[5,10],[13,14],[2,13],[5,12],[2,3],[1,7],[1,6],[7,9],[4,8],[0,9],[0,12],[2,10],[5,13],[8,10],[3,7],[6,7],[4,11],[12],[3,4],[6,10],[3,9],[1,12],[5,11],[1,4],[6,8],[13],[7,11],[6,11],[10,14],[6,13],[4,12],[12,13],[0,4],[7],[0,2]],"valid_count":31,"best_radius":3.030703104794249,"best":[{"x":-1.281945,"y":1.103226,"theta":0.100539},{"x":-0.930972,"y":-0.317182,"theta":-2.610986},{"x":1.99113,"y":-0.39894,"theta":0.490825},{"x":-0.468153,"y":0.41947,"theta":-0.352832},{"x":1.017915,"y":-1.757157,"theta":-1.487651},{"x":-0.299572,"y":2.845244,"theta":-1.465894},{"x":-2.850549,"y":0.243988,"theta":-0.085385},{"x":-0.110944,"y":-2.02767,"theta":-2.373633},{"x":-2.108651,"y":-1.933585,"theta":0.742116},{"x":-1.325821,"y":1.538165,"theta":-3.041054},{"x":1.559134,"y":-1.712054,"theta":1.653941},{"x":1.531329,"y":0.461399,"theta":-2.650976},{"x":0.567899,"y":-1.291167,"theta":2.359722},{"x":2.398913,"y":1.558967,"theta":-2.565313},{"x":0.495277,"y":2.172037,"theta":-0.986614}],"errors":{"official_overlap_or_containment":10,"precheck_overlap":79},"attempts":120,"minutes":0.4100142098167756,"best_mask":[7,9]},{"seed":958747086,"order_seed":172189166,"start_kind":"fresh","score_kind":"official","masks":[[12],[10,11],[1,8],[2,10],[10,12],[4,6],[10,13],[4],[4,5],[12,14],[4,11],[7,13],[6,9],[1,10],[3],[5,10],[6,7],[6,12],[2,3],[2,11],[8,9],[3,7],[2,13],[3,4],[7],[5,7],[3,11],[7,9],[6,8],[3,5],[7,11],[5,12],[0],[7,8],[4,9],[4,8],[0,3],[7,10],[11,13],[0,14],[6,14],[2,6],[1,12],[8,11],[3,9],[4,13],[13],[7,14],[2,4],[8,14],[8,12],[1,4],[0,7],[9],[11,14],[8,13],[2],[1,7],[13,14],[2,9],[0,4],[1,3],[3,13],[11,12],[5,11],[8],[3,14],[4,7],[0,6],[9,13],[3,12],[6,11],[1,14],[14],[2,8],[4,14],[2,5],[2,7],[10],[5,14],[2,14],[6,13],[0,12],[0,1],[0,11],[7,12],[4,12],[0,9],[3,8],[1,5],[6],[9,10],[10,14],[1,9],[5,6],[5,9],[6,10],[1,13],[12,13],[9,11],[1,6],[5,8],[3,10],[0,10],[3,6],[5,13],[1],[1,2],[1,11],[2,12],[0,2],[9,12],[4,10],[5],[0,13],[11],[0,8],[8,10],[0,5],[9,14]],"valid_count":26,"best_radius":3.0102905672615603,"best":[{"x":1.976752,"y":0.365674,"theta":1.082872},{"x":0.634032,"y":1.907687,"theta":2.151804},{"x":0.817908,"y":0.9807,"theta":-2.058719},{"x":-0.575371,"y":1.926192,"theta":2.528724},{"x":1.87903,"y":-0.7145,"theta":0.79118},{"x":1.532303,"y":1.301274,"theta":1.750367},{"x":1.291941,"y":-1.54018,"theta":0.016343},{"x":-1.506908,"y":-1.330599,"theta":-1.546437},{"x":0.298559,"y":-1.949411,"theta":0.938702},{"x":-1.18019,"y":1.066091,"theta":-0.612866},{"x":0.464931,"y":0.043578,"theta":-1.877077},{"x":-1.663235,"y":1.129121,"theta":3.038363},{"x":-0.853199,"y":-0.314437,"theta":-2.126957},{"x":-1.981,"y":-0.341915,"theta":-2.635867},{"x":-0.187073,"y":-2.83317,"theta":1.504863}],"errors":{"precheck_overlap":86,"official_overlap_or_containment":8},"attempts":120,"minutes":0.3844774484168738,"best_mask":[8,13]},{"seed":725794129,"order_seed":1914965324,"start_kind":"baseline-tight","score_kind":"official","masks":[[8],[0,2],[6,9],[6,8],[8,13],[1,4],[5,14],[4,10],[2,6],[4],[7,14],[7,11],[0,4],[3,6],[5,11],[4,7],[3,7],[9,14],[1,6],[3,8],[4,11],[0,10],[3,13],[8,10],[12,14],[9],[2,7],[7,13],[7,8],[0,9],[5,6],[5,13],[6,11],[7,10],[0,5],[7],[1,9],[1,5],[2,10],[2,9],[7,9],[5,7],[6,14],[2,12],[8,9],[1,11],[3,11],[11,14],[9,10],[11],[5,12],[5,10],[3,10],[12],[1,7],[6],[2,13],[8,12],[4,9],[10,11],[4,8],[0,3],[1,10],[1,13],[4,12],[2,4],[6,10],[0,11],[10,14],[1,12],[1],[2,5],[4,14],[8,11],[9,12],[4,5],[5],[3,5],[11,13],[10,12],[3,4],[2,3],[12,13],[6,12],[2,8],[1,3],[2],[4,6],[7,12],[2,11],[0,8],[4,13],[0,14],[0,7],[10],[3,14],[13,14],[3,12],[1,8],[11,12],[1,2],[0],[0,1],[14],[13],[9,13],[2,14],[3],[0,12],[5,9],[6,13],[10,13],[0,6],[6,7],[8,14],[1,14],[9,11],[5,8],[0,13],[3,9]],"valid_count":59,"best_radius":2.9612299115943492,"best":[{"x":1.236699,"y":0.162554,"theta":2.289049},{"x":1.190829,"y":-1.205547,"theta":2.267495},{"x":-0.571061,"y":-0.25928,"theta":-1.721477},{"x":1.836918,"y":0.687135,"theta":-0.852541},{"x":0.257453,"y":1.944258,"theta":2.256979},{"x":-0.76457,"y":1.80606,"theta":3.028648},{"x":-1.693975,"y":0.988367,"theta":-3.050498},{"x":-0.669663,"y":0.767087,"theta":-1.769031},{"x":-0.079368,"y":1.668423,"theta":-0.884615},{"x":1.882786,"y":2.055237,"theta":-2.312431},{"x":-1.948438,"y":-0.223633,"theta":-2.408763},{"x":-1.523631,"y":-1.234897,"theta":-1.596672},{"x":1.161793,"y":-2.533597,"theta":2.000741},{"x":-0.709647,"y":-1.828339,"theta":-0.751318},{"x":1.848521,"y":-0.655279,"theta":-0.874081}],"errors":{"precheck_overlap":61},"best_mask":[0,9],"attempts":120,"minutes":0.5058664496988058},{"seed":970042509,"order_seed":1620137548,"start_kind":"warm-topology","score_kind":"official","masks":[[1,3],[8,12],[4],[7,13],[2,5],[10,13],[5,10],[3,13],[6,11],[5,13],[2,14],[10,12],[7],[11,13],[1,9],[5,6],[7,8],[2],[2,10],[0,9],[2,4],[13,14],[10,11],[7,9],[9,14],[6,10],[0,12],[5,11],[6,8],[1,2],[0,13],[3,7],[0,7],[8,14],[0,2],[2,11],[0,10],[6,12],[12],[9],[3,14],[2,13],[4,5],[11,12],[5,12],[5,7],[3],[3,9],[2,12],[1,5],[1,4],[1,7],[0,3],[1,11],[0,6],[11],[2,7],[9,10],[2,8],[8],[9,12],[6],[0,1],[5,14],[6,7],[3,12],[8,9],[3,6],[11,14],[6,14],[2,6],[14],[8,13],[3,4],[1,12],[0,4],[0,11],[1,8],[10],[12,13],[6,9],[8,10],[10,14],[13],[9,13],[4,9],[1,13],[4,6],[3,5],[1,6],[5,9],[2,3],[7,14],[7,10],[4,11],[4,7],[7,11],[4,12],[3,10],[5],[0,5],[12,14],[5,8],[0,8],[1],[8,11],[1,10],[2,9],[4,14],[7,12],[3,8],[9,11],[6,13],[4,10],[0,14],[1,14],[3,11],[0],[4,13],[4,8]],"valid_count":43,"best_radius":2.954758828965799,"best":[{"x":-1.486338,"y":0.115322,"theta":-1.146378},{"x":-1.952434,"y":-0.095299,"theta":1.995216},{"x":-1.578634,"y":1.152821,"theta":1.975712},{"x":-0.738291,"y":1.512996,"theta":-1.165858},{"x":1.354161,"y":1.759147,"theta":-2.90986},{"x":1.463477,"y":1.295885,"theta":0.231731},{"x":0.506547,"y":-0.052269,"theta":2.01049},{"x":-0.442557,"y":-0.498729,"theta":-1.131113},{"x":1.550328,"y":-0.666312,"theta":2.651682},{"x":1.952762,"y":0.088339,"theta":-0.489906},{"x":-0.957851,"y":-1.703996,"theta":-1.271715},{"x":2.020097,"y":-1.910446,"theta":2.384084},{"x":-1.736451,"y":-0.897674,"theta":-2.102565},{"x":-0.380634,"y":2.754218,"theta":-1.433466},{"x":0.020666,"y":-1.954649,"theta":-0.39282}],"errors":{"precheck_overlap":77},"attempts":120,"minutes":0.5050231273499473,"best_mask":[8,9]},{"seed":324940037,"order_seed":171593074,"start_kind":"warm-flip","score_kind":"official","masks":[[3,4],[12],[9,13],[12,14],[8],[7],[2,13],[5,12],[1,13],[6,12],[3,11],[1,3],[11,12],[4],[2,11],[5,8],[6,13],[0,2],[13,14],[2,14],[6,9],[1,8],[5,6],[3,14],[9,10],[10,14],[0,6],[3,9],[3,7],[5,11],[0,3],[8,12],[4,5],[0,14],[4,11],[5],[3,12],[4,7],[13],[5,7],[9,14],[14],[10,11],[3,6],[8,9],[5,9],[3,5],[3,8],[7,8],[6],[1,5],[11,13],[0,5],[6,14],[1,10],[8,14],[5,13],[2,7],[11,14],[10,13],[5,14],[1,2],[2,4],[6,7],[6,8],[2,8],[4,12],[0,10],[4,13],[2,12],[1],[1,7],[0,8],[4,6],[3,10],[7,11],[7,9],[6,11],[7,10],[10],[9],[11],[2,3],[1,11],[0,11],[7,14],[1,6],[10,12],[2,6],[8,11],[0,4],[0,7],[3],[4,9],[12,13],[2,10],[3,13],[1,9],[7,12],[0,13],[9,11],[6,10],[8,13],[5,10],[0,9],[4,10],[0,12],[2],[4,8],[0],[2,9],[1,14],[8,10],[7,13],[1,12],[9,12],[0,1],[2,5],[4,14],[1,4]],"valid_count":61,"best_radius":2.9485300899867974,"best":[{"x":0.543312,"y":0.673944,"theta":-0.567378},{"x":1.140003,"y":-1.234887,"theta":2.23087},{"x":-0.583195,"y":-0.219868,"theta":-1.66822},{"x":1.841077,"y":0.638124,"theta":-0.719216},{"x":0.271737,"y":1.929489,"theta":2.2683},{"x":-0.729744,"y":1.806721,"theta":3.129594},{"x":-1.628191,"y":1.070402,"theta":-2.988989},{"x":-0.572416,"y":0.783779,"theta":-1.679127},{"x":0.02703,"y":1.724417,"theta":-0.873293},{"x":1.256957,"y":1.488902,"theta":0.456805},{"x":-1.944318,"y":-0.128043,"theta":-2.460841},{"x":-1.568887,"y":-1.155579,"theta":-1.638157},{"x":1.05881,"y":-2.563737,"theta":1.962455},{"x":-0.78297,"y":-1.7843,"theta":-0.788629},{"x":1.813856,"y":-0.711824,"theta":-0.910708}],"errors":{"precheck_overlap":59},"best_mask":[9],"attempts":120,"minutes":0.5209517321665771},{"seed":1521554109,"start_kind":"grid-repair","parent":"warm-flip-324940037-171593074.json","attempts":24000,"score_kind":"official","valid_count":0,"best_radius":null,"errors":{},"minutes":0.07726149083270381,"shortlisted":0},{"seed":1133761340,"start_kind":"lattice-repair","parent":"warm-flip-324940037-171593074.json","attempts":180,"valid_count":3,"best_radius":2.9485296385573965,"score_kind":"official","errors":{},"best":[{"x":0.864497,"y":-0.045098,"theta":-1.511803},{"x":-0.332177,"y":-1.647484,"theta":1.286443},{"x":-0.519999,"y":0.343595,"theta":-2.612644},{"x":1.596237,"y":-1.117494,"theta":-1.663643},{"x":1.722491,"y":0.910929,"theta":1.323867},{"x":1.035956,"y":1.650322,"theta":2.185173},{"x":-0.087258,"y":1.946575,"theta":2.349767},{"x":0.299433,"y":0.923208,"theta":-2.623556},{"x":1.412899,"y":0.988969,"theta":-1.817729},{"x":1.943087,"y":-0.145528,"theta":-0.48762},{"x":-1.243505,"y":1.500154,"theta":2.877918},{"x":-1.855894,"y":0.593645,"theta":-2.582585},{"x":-1.45636,"y":-2.360684,"theta":1.018029},{"x":-1.904551,"y":-0.411633,"theta":-1.733049},{"x":0.486601,"y":-1.886788,"theta":-1.855134}],"minutes":1.425320772366831},{"seed":666074980,"start_kind":"lattice-repair","parent":"warm-flip-324940037-171593074.json","attempts":180,"valid_count":3,"best_radius":2.948529187573564,"score_kind":"official","errors":{},"best":[{"x":-0.843496,"y":-0.194696,"theta":1.908762},{"x":-0.13432,"y":1.675262,"theta":-1.576179},{"x":0.594512,"y":-0.187122,"theta":0.807919},{"x":-1.842243,"y":0.634748,"theta":1.756923},{"x":-1.405059,"y":-1.350027,"theta":-1.538752},{"x":-0.541463,"y":-1.871786,"theta":-0.677444},{"x":0.619903,"y":-1.847289,"theta":-0.512849},{"x":-0.033641,"y":-0.969965,"theta":0.797006},{"x":-1.085949,"y":-1.339798,"theta":1.602841},{"x":-1.908041,"y":-0.395151,"theta":2.932944},{"x":1.608522,"y":-1.099737,"theta":0.015293},{"x":1.947616,"y":-0.059645,"theta":0.837978},{"x":0.750011,"y":2.670451,"theta":-1.844598},{"x":1.717573,"y":0.920167,"theta":1.687513},{"x":-0.987342,"y":1.679857,"theta":1.565431}],"minutes":1.3267369151833313},{"seed":720702446,"start_kind":"lattice-repair","parent":"warm-flip-324940037-171593074.json","attempts":180,"valid_count":13,"best_radius":2.9485289368486356,"score_kind":"official","errors":{},"best":[{"x":-0.865258,"y":-0.026659,"theta":1.712711},{"x":0.194584,"y":1.669338,"theta":-1.772228},{"x":0.546671,"y":-0.299343,"theta":0.611867},{"x":-1.683307,"y":0.981445,"theta":1.560871},{"x":-1.641122,"y":-1.050465,"theta":-1.73481},{"x":-0.895705,"y":-1.730454,"theta":-0.873499},{"x":0.248185,"y":-1.932657,"theta":-0.708902},{"x":-0.22194,"y":-0.944834,"theta":0.600964},{"x":-1.326136,"y":-1.102596,"theta":1.406782},{"x":-1.948462,"y":-0.015907,"theta":2.736887},{"x":1.363485,"y":-1.392001,"theta":-0.180754},{"x":1.898688,"y":-0.437885,"theta":0.641931},{"x":1.255829,"y":2.4732,"theta":-2.040646},{"x":1.863913,"y":0.567969,"theta":1.491466},{"x":-0.641204,"y":1.840004,"theta":1.36939}],"minutes":1.3721149030005715},{"seed":761162602,"start_kind":"lattice-repair","parent":"warm-flip-324940037-171593074.json","attempts":180,"valid_count":6,"best_radius":2.9485290402393,"score_kind":"official","errors":{},"best":[{"x":-0.39506,"y":-0.77027,"theta":2.778807},{"x":-1.367112,"y":0.977525,"theta":-0.706134},{"x":0.526363,"y":0.333766,"theta":1.677964},{"x":-1.673035,"y":-0.998856,"theta":2.626966},{"x":0.125933,"y":-1.944454,"theta":-0.668712},{"x":1.081584,"y":-1.620782,"theta":0.192596},{"x":1.8117,"y":-0.71729,"theta":0.357193},{"x":0.719711,"y":-0.651138,"theta":1.667055},{"x":0.323876,"y":-1.693944,"theta":2.472881},{"x":-0.928249,"y":-1.713218,"theta":-2.480197},{"x":1.877753,"y":0.520386,"theta":0.885339},{"x":1.301394,"y":1.450218,"theta":1.708023},{"x":-1.557586,"y":2.295158,"theta":-0.974549},{"x":0.404135,"y":1.906156,"theta":2.557559},{"x":-1.920641,"y":0.32847,"theta":2.435482}],"minutes":1.3554997262001658},{"seed":2086752391,"start_kind":"lattice-repair","parent":"warm-flip-324940037-171593074.json","attempts":180,"valid_count":2,"best_radius":2.9485360519179795,"score_kind":"official","errors":{},"best":[{"x":-0.707087,"y":-0.499408,"theta":2.296859},{"x":-0.758289,"y":1.499854,"theta":-1.18809},{"x":0.621111,"y":0.051777,"theta":1.19601},{"x":-1.945447,"y":-0.109595,"theta":2.145019},{"x":-0.789688,"y":-1.781335,"theta":-1.15066},{"x":0.207131,"y":-1.937492,"theta":-0.289356},{"x":1.272861,"y":-1.475333,"theta":-0.124762},{"x":0.335919,"y":-0.910556,"theta":1.185097},{"x":-0.498174,"y":-1.651103,"theta":1.990932},{"x":-1.616608,"y":-1.087801,"theta":-2.962147},{"x":1.905069,"y":-0.409247,"theta":0.403379},{"x":1.825351,"y":0.681819,"theta":1.226066},{"x":-0.316326,"y":2.755682,"theta":-1.456513},{"x":1.241631,"y":1.501712,"theta":2.075597},{"x":-1.549614,"y":1.181302,"theta":1.953531}],"minutes":1.0283943574002479}],"repo_commit":"78a78626f098cd236f3a09bb2cb242f72951599d","source_urls":["https://www.paradigm.xyz/puzzles/packing/about","https://github.com/benedictbrady/shape-packing-challenge","https://raw.githubusercontent.com/benedictbrady/shape-packing-challenge/78a78626f098cd236f3a09bb2cb242f72951599d/README.md","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"],"notes":["The inherited baseline is already strictly below 2.94853 on the official scorer. Its antiparallel flats are offset along their diameters, giving sliding seams rather than full disks. No flip descendant beat the inherited score. The best new score and best fresh score are reported separately.","Official validation used a separate clean checkout and process. No independent agent runner was available.","Exact circular areas can run above the polygon intersection threshold by about 2e-9 on tight arc contacts. The reported max_pair_area uses the official polygons.","Mask indices are zero-based and listed in tested order. Seed derivation uses NumPy default_rng(23003).integers(1,2**31,size=17).","The baseline seed labels a fixed coordinate input. The separate order seed controls the mask permutation.","The lattice solver has a per-attempt wall-time cutoff, so the exact incumbents can vary by machine.","Two extra lattice invocations used auxiliary seeds 761162602 and 2086752391 outside the master RNG sequence. Both runs are included."],"plot_svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"660\" height=\"680\" viewBox=\"-3.3 -3.5 6.6 6.8\" role=\"img\" aria-label=\"Packing of 15 unit semicircles\"><rect x=\"-3.3\" y=\"-3.5\" width=\"6.6\" height=\"6.8\" fill=\"white\"/><text x=\"0\" y=\"-3.2\" font-size=\".19\" font-family=\"sans-serif\" text-anchor=\"middle\">Official radius 2.94852695</text><circle r=\"2.948526950913\" fill=\"none\" stroke=\"#303846\" stroke-width=\".017\"/><g stroke=\"#303846\" stroke-width=\".012\"><path d=\"M0.005320 0.169465 A1 1 0 0 0 1.085894 -1.513496Z\" fill=\"hsl(0.0 48% 76%)\"/><path d=\"M1.927757 0.628472 A1 1 0 0 0 0.343575 1.849277Z\" fill=\"hsl(137.5 48% 76%)\"/><path d=\"M-1.578847 0.116968 A1 1 0 0 0 0.410963 0.318607Z\" fill=\"hsl(275.0 48% 76%)\"/><path d=\"M1.181841 0.118315 A1 1 0 0 0 2.504759 -1.381648Z\" fill=\"hsl(52.5 48% 76%)\"/><path d=\"M1.047201 -2.567990 A1 1 0 0 0 -0.490465 -1.289091Z\" fill=\"hsl(190.0 48% 76%)\"/><path d=\"M-0.708059 -2.809095 A1 1 0 0 0 -0.739007 -0.809334Z\" fill=\"hsl(327.5 48% 76%)\"/><path d=\"M-1.773169 -2.064939 A1 1 0 0 0 -1.475741 -0.087178Z\" fill=\"hsl(105.0 48% 76%)\"/><path d=\"M-1.563426 -0.897022 A1 1 0 0 0 0.424169 -0.674613Z\" fill=\"hsl(242.6 48% 76%)\"/><path d=\"M-0.735734 -1.085100 A1 1 0 0 0 0.801933 -2.363997Z\" fill=\"hsl(20.1 48% 76%)\"/><path d=\"M1.699959 -0.585399 A1 1 0 0 0 0.824387 -2.383558Z\" fill=\"hsl(157.6 48% 76%)\"/><path d=\"M-2.571441 -0.658024 A1 1 0 0 0 -1.318062 0.900515Z\" fill=\"hsl(295.1 48% 76%)\"/><path d=\"M-2.570417 1.079306 A1 1 0 0 0 -0.575431 1.220839Z\" fill=\"hsl(72.6 48% 76%)\"/><path d=\"M1.975426 2.188949 A1 1 0 0 0 0.124207 2.945910Z\" fill=\"hsl(210.1 48% 76%)\"/><path d=\"M-1.501053 2.483889 A1 1 0 0 0 -0.077385 1.079194Z\" fill=\"hsl(347.6 48% 76%)\"/><path d=\"M1.019271 1.328597 A1 1 0 0 0 2.603425 0.107754Z\" fill=\"hsl(125.1 48% 76%)\"/></g><g font-family=\"sans-serif\" font-size=\".145\" text-anchor=\"middle\" dominant-baseline=\"central\" fill=\"#172330\"><text x=\"0.90744\" y=\"-0.43969\">0</text><text x=\"0.87319\" y=\"0.89828\">1</text><text x=\"-0.62729\" y=\"0.64560\">2</text><text x=\"2.16579\" y=\"-0.34724\">3</text><text x=\"0.00340\" y=\"-2.25914\">4</text><text x=\"-1.15348\" y=\"-1.81587\">5</text><text x=\"-2.04967\" y=\"-1.01211\">6</text><text x=\"-0.61745\" y=\"-0.35848\">7</text><text x=\"0.30806\" y=\"-1.39395\">8</text><text x=\"1.64878\" y=\"-1.67273\">9</text><text x=\"-2.27984\" y=\"0.39072\">10</text><text x=\"-1.60335\" y=\"1.57899\">11</text><text x=\"0.88707\" y=\"2.16942\">12</text><text x=\"-0.48721\" y=\"2.08763\">13</text><text x=\"2.07383\" y=\"1.05877\">14</text></g></svg>","handed_inputs":{"after-cma-es":{"sha256":"9b93e2ed4de5a95fd82268d4d16fbbcdd424365f3b491f82e9593ec4a630715e","reported_radius":3.02081451,"used_as_start":false},"after-diff-evolution":{"sha256":"5e21fa1cc1c5d03397d3a7174fab39a9b309ff256372c9a3f7bde116491cc0e3","reported_radius":3.04084534,"used_as_start":false},"after-flats-on-rim":{"sha256":"3c4e8ebc6358be8f9d5282d044a86f261a9aa266d934a45d1055244dce89d5d9","reported_radius":3.00113305,"used_as_start":false},"after-flats-to-centre":{"sha256":"48136c0ce3de775847e9552c7769cd159326d5fe66bae6e220314061514f1af1","reported_radius":2.9632139,"used_as_start":false},"after-no-pairs":{"sha256":"2faa94063d84c1d90ed0c9d02d971eab5bae4a5500494b4330c1a9bbae812f19","reported_radius":"3.03051443","used_as_start":false},"after-pairs-1-4":{"sha256":"a9e45b112408be2bd2c257bf0b325caa662e5d914703ad640079ef73b446b83b","reported_radius":2.97438934,"used_as_start":false},"after-pairs-5-5":{"sha256":"e5a5fe2cd0aa58f0b6d60d12a66e3a2976b628f1bdfcb42757ae89188f58ec61","reported_radius":2.95475629,"used_as_start":true},"after-pairs-6-3":{"sha256":"9fab734175cef0454e15d89586a396de552e9a6ec288e71755fce4b183c7f0cb","reported_radius":2.97726863,"used_as_start":false},"after-pairs-7-1":{"sha256":"d59f73e64c56ed584e964006e98ee46c03edc85995d04b5517e6af14194277e1","reported_radius":"3.06352356","used_as_start":false},"after-rings-159-267":{"sha256":"c0fd3edd0bbe4ff31859c5ae1e8b72ac69412fa2f0d76005ff746c2991eb8876","reported_radius":"2.99381251","used_as_start":false},"after-rings-312-411":{"sha256":"708b6b93a9c8c13123d15f70c8185ebcf6008bfc84058ad55aa4665b307df04a","reported_radius":2.98539036,"used_as_start":false},"after-symmetric":{"sha256":"7201832288052d238d03202edfdf759c63d18bb9789948c682530bca71086a81","reported_radius":2.97035856,"used_as_start":false}},"warm_topology_input":[{"x":-1.4865,"y":0.113483,"theta":-1.14513},{"x":-1.952312,"y":-0.09771,"theta":1.996464},{"x":-1.580048,"y":1.150878,"theta":1.976954},{"x":-0.740182,"y":1.512081,"theta":-1.164638},{"x":1.351994,"y":1.760803,"theta":3.374544},{"x":1.46187,"y":1.297693,"theta":0.23295},{"x":0.506589,"y":-0.051643,"theta":2.011721},{"x":-0.441939,"y":-0.499263,"theta":-1.129872},{"x":1.952648,"y":0.090758,"theta":-0.488671},{"x":1.55115,"y":-0.66439,"theta":2.652922},{"x":-0.955737,"y":-1.70518,"theta":-1.270461},{"x":2.02246,"y":-1.907941,"theta":2.385323},{"x":-1.735332,"y":-0.899831,"theta":4.181876},{"x":-0.384018,"y":2.753745,"theta":4.850948},{"x":0.023087,"y":-1.95462,"theta":-0.391567}],"search_source":{"flip.py":"import itertools\nimport json\nimport math\nfrom pathlib import Path\nimport sys\nimport time\n\nimport numpy as np\nfrom numba import njit\nfrom scipy.optimize import minimize\nfrom semicircle_packing.geometry import Semicircle, semicircle_polygon\nfrom semicircle_packing.scoring import validate_and_score\n\nPI = math.pi\nPAIRS = np.array(list(itertools.combinations(range(15), 2)))\nNAMES = ('x', 'y', 'theta')\n\n@njit(cache=True)\ndef boundary(x, y, a, u, v, b):\n    \"\"\"Green integral and shape gradient on A's boundary inside B.\"\"\"\n    nx, ny = math.cos(a), math.sin(a)\n    tx, ty = -ny, nx\n    mx, my = math.cos(b), math.sin(b)\n    dx, dy = x-u, y-v\n    d = math.hypot(dx, dy)\n    area = gx = gy = gt = 0.\n    cuts = np.empty(6)\n    cuts[0], cuts[1] = -PI/2, PI/2\n    count = 2\n    # On the unit arc, disk and half-plane conditions are cosine inequalities.\n    for k in range(2):\n        if k == 0:\n            if d < 1e-13:\n                continue\n            angle = math.atan2(dy, dx)\n            level = -d/2\n        else:\n            angle = b\n            level = -(dx*mx+dy*my)\n        if abs(level) < 1:\n            width = math.acos(level)\n            for sign in (-1, 1):\n                offset = (angle + sign*width - a + PI) % (2*PI) - PI\n                if abs(offset) < PI/2:\n                    cuts[count] = offset\n                    count += 1\n    cuts = np.sort(cuts[:count])\n    for k in range(count-1):\n        left, right = a+cuts[k], a+cuts[k+1]\n        mid = (left+right)/2\n        cx, cy = math.cos(mid), math.sin(mid)\n        if dx*cx+dy*cy <= -d*d/2+1e-14 and (dx+cx)*mx+(dy+cy)*my >= -1e-14:\n            weight = .5 if d < 1e-13 else 1.\n            sx = math.sin(right)-math.sin(left)\n            sy = math.cos(left)-math.cos(right)\n            area += weight*(right-left+x*sx+y*sy)/2\n            gx += weight*sx\n            gy += weight*sy\n    # Clip diameter parameter s in [-1,1] to disk and half-plane.\n    proj = dx*tx+dy*ty\n    perp = dx*nx+dy*ny\n    if abs(perp) < 1:\n        width = math.sqrt(1-perp*perp)\n        lo, hi = max(-1., -proj-width), min(1., -proj+width)\n        slope, intercept = tx*mx+ty*my, dx*mx+dy*my\n        weight = 1.\n        if slope > 1e-14:\n            lo = max(lo, -intercept/slope)\n        elif slope < -1e-14:\n            hi = min(hi, -intercept/slope)\n        elif intercept < -1e-14:\n            hi = lo\n        elif abs(intercept) <= 1e-14:\n            weight = .5 if nx*mx+ny*my > 0 else 0.\n        length = weight*max(hi-lo, 0.)\n        area -= length*(x*nx+y*ny)/2\n        gx -= length*nx\n        gy -= length*ny\n        gt += length*(hi+lo)/2\n    return area, gx, gy, gt\n\n@njit(cache=True)\ndef pair(a, b):\n    dx, dy = b[0]-a[0], b[1]-a[1]\n    if dx*dx+dy*dy >= 4:\n        return 0., 0., 0., 0., 0., 0., 0.\n    p, ax, ay, at = boundary(0., 0., a[2], dx, dy, b[2])\n    q, bx, by, bt = boundary(dx, dy, b[2], 0., 0., a[2])\n    return max(0., p+q), ax, ay, at, bx, by, bt\n\n@njit(cache=True)\ndef farthest(a, cx=0., cy=0.):\n    x, y, t = a\n    dx, dy = x-cx, y-cy\n    nx, ny = math.cos(t), math.sin(t)\n    d = math.hypot(dx,dy)\n    if d > 0 and dx*nx+dy*ny >= 0:\n        return dx/d, dy/d, 0.\n    sign = 1. if -dx*ny+dy*nx >= 0 else -1.\n    return -sign*ny, sign*nx, -sign*(dx*nx+dy*ny)\n\n@njit(cache=True)\ndef constraints(z, allowance):\n    values = np.empty(120)\n    jac = np.zeros((120,46))\n    rows = z[:45].reshape((15,3))\n    for i in range(15):\n        x,y,t = rows[i]\n        u,v,turn = farthest(rows[i])\n        r = math.hypot(x+u,y+v)\n        values[i] = z[45]-r\n        jac[i,3*i:3*i+3] = np.array((-(x+u)/r,-(y+v)/r,-turn/r))\n        jac[i,45] = 1.\n    for k in range(105):\n        i,j = PAIRS[k]\n        area,ax,ay,at,bx,by,bt = pair(rows[i],rows[j])\n        # Smoothly scale area residuals, with identical feasible set.\n        floor = allowance[k]\n        power = .67\n        weight = power*(area+floor)**(power-1)\n        values[15+k] = (2*floor)**power-(area+floor)**power\n        jac[15+k,3*i:3*i+3] = -weight*np.array((ax,ay,at))\n        jac[15+k,3*j:3*j+3] = -weight*np.array((bx,by,bt))\n    return values, jac\n\n@njit(cache=True)\ndef point_circle(points):\n    x=y=0.\n    r=-1.\n    for i in range(len(points)):\n        a,b = points[i]\n        if math.hypot(a-x,b-y) <= r+2e-13:\n            continue\n        x,y,r = a,b,0.\n        for j in range(i):\n            c,d = points[j]\n            if math.hypot(c-x,d-y) <= r+2e-13:\n                continue\n            x,y,r = (a+c)/2,(b+d)/2,math.hypot(a-c,b-d)/2\n            for k in range(j):\n                e,f = points[k]\n                if math.hypot(e-x,f-y) <= r+2e-13:\n                    continue\n                u,v,w,h = c-a,d-b,e-a,f-b\n                det = 2*(u*h-v*w)\n                if abs(det) < 1e-16:\n                    continue\n                x = a+((u*u+v*v)*h-(w*w+h*h)*v)/det\n                y = b+((w*w+h*h)*u-(u*u+v*v)*w)/det\n                r = math.hypot(a-x,b-y)\n    return x,y,r\n\ndef mec(rows):\n    angles = rows[:,2:]+np.linspace(-PI/2,PI/2,9)\n    points = (rows[:,None,:2]+np.stack((np.cos(angles),np.sin(angles)),axis=-1)).reshape(-1,2)\n    points = points[np.random.default_rng(42).permutation(len(points))]\n    for _ in range(60):\n        x,y,r = point_circle(points)\n        far = rows[:,:2]+np.array([farthest(a,x,y)[:2] for a in rows])\n        distances = np.linalg.norm(far-[x,y],axis=1)\n        if max(distances) <= r+1e-12:\n            break\n        points = np.vstack((points,far[distances>r+1e-12]))\n    return x,y,float(max(distances))\n\ndef rounded(rows):\n    return np.array([[round(float(value),6) for value in row] for row in rows])\n\ndef official(rows):\n    return validate_and_score([Semicircle(*a) for a in rounded(rows)])\n\ndef objects(rows):\n    return [dict(zip(NAMES,row)) for row in rounded(rows).tolist()]\n\ndef areas(rows):\n    return np.array([pair(rows[i],rows[j])[0] for i,j in PAIRS])\n\ndef repair(rows, limit, tight=False, grid=False):\n    rows = rows.copy()\n    x,y,r = mec(rows)\n    rows[:,:2] -= [x,y]\n    z = np.r_[rows.ravel(),r]\n    objective_gradient = np.eye(46)[-1]\n    # Use generous allowances for initial basin settling, then shrink them.\n    stages = [(1e-3,160),(2e-5,110),(9.3e-7,145)]\n    if tight:\n        stages = [(2e-5,200),(9.7e-7,230)]\n    if grid:\n        stages = [(1.0008e-6,250)]\n    for tolerance, iterations in stages:\n        allowance = np.full(105,tolerance)\n        if tolerance < 1e-6 or grid:\n            current = z[:45].reshape(15,3)\n            for k,(i,j) in enumerate(PAIRS):\n                # Long near-parallel seams are sensitive to coordinate rounding.\n                angle = abs((current[i,2]-current[j,2])%(2*PI)-PI)\n                if angle < .025 and np.linalg.norm(current[i,:2]-current[j,:2]) < 1.8:\n                    allowance[k] = 9.8e-7 if grid else (6.5e-7 if tight else 2.5e-7)\n        cache = [None,None]\n        def evaluate(w):\n            if cache[0] is None or not np.array_equal(cache[0],w):\n                cache[:] = [w.copy(),constraints(w,allowance)]\n            return cache[1]\n        answer = minimize(lambda w:w[-1], z, jac=lambda w:objective_gradient,\n                          constraints=[{'type':'ineq','fun':lambda w:evaluate(w)[0],\n                                        'jac':lambda w:evaluate(w)[1]}],\n                          method='SLSQP', options={'ftol':2e-11,'maxiter':iterations})\n        z = answer.x\n        if z[-1] > limit and tolerance == 1e-3:\n            break\n    result = z[:45].reshape(15,3).copy()\n    result[:,2] = (result[:,2]+PI)%(2*PI)-PI\n    return result\n\ndef save(path, data):\n    tmp = path.with_suffix('.tmp')\n    tmp.write_text(json.dumps(data))\n    tmp.replace(path)\n\ndef search(kind, seed, batch, duration):\n    rng = np.random.default_rng(seed)\n    if kind.startswith('baseline'):\n        start = np.array(json.loads(Path('baseline.json').read_text()))\n    elif kind.startswith('warm'):\n        obj = json.loads(Path(kind+'.input').read_text())\n        start = np.array([[row[k] for k in NAMES] for row in obj])\n    else:\n        angle = rng.uniform(-PI,PI,15)\n        radius = 2.5*np.sqrt(rng.uniform(0,1,15))\n        start = np.column_stack((radius*np.cos(angle),radius*np.sin(angle),rng.uniform(-PI,PI,15)))\n    masks = [(i,) for i in range(15)]+[tuple(m) for m in PAIRS.tolist()]\n    order = np.random.default_rng(batch).permutation(len(masks))\n    out = Path(f'{kind}-{seed}-{batch}.json')\n    data = dict(seed=seed,order_seed=batch,start_kind=kind,score_kind='official',\n                masks=[],valid_count=0,best_radius=None,best=None,errors={})\n    began = last = time.monotonic()\n    for ix in order:\n        if time.monotonic()-began > duration:\n            break\n        mask = masks[ix]\n        rows = start.copy()\n        rows[list(mask),2] += PI\n        data['masks'].append(list(mask))\n        try:\n            continuous = repair(rows,4.1,kind != 'baseline' and kind != 'fresh')\n            candidate = rounded(continuous)\n            if kind not in ('baseline','fresh') and 1e-6 < max(areas(candidate)) < 3e-6:\n                trials = [rounded(continuous+(rng.random((15,3))-.5)*1e-6) for _ in range(30)]\n                legal = [trial for trial in trials if max(areas(trial)) <= 1e-6]\n                if legal:\n                    candidate = min(legal,key=lambda trial:mec(trial)[-1])\n            max_area = max(areas(candidate))\n            if max_area > 1.6e-6:\n                data['errors']['precheck_overlap'] = data['errors'].get('precheck_overlap',0)+1\n            else:\n                v = official(candidate)\n                if v.valid:\n                    data['valid_count'] += 1\n                    if data['best_radius'] is None or v.score < data['best_radius']:\n                        data.update(best_radius=v.score,best=objects(candidate),best_mask=list(mask))\n                        save(out,data)\n                else:\n                    data['errors']['official_overlap_or_containment'] = data['errors'].get('official_overlap_or_containment',0)+1\n        except Exception as e:\n            key = type(e).__name__+': '+str(e)\n            data['errors'][key] = data['errors'].get(key,0)+1\n        data.update(attempts=len(data['masks']),minutes=(time.monotonic()-began)/60)\n        if time.monotonic()-last>=55:\n            save(out,data)\n            last=time.monotonic()\n    save(out,data)\n\nif __name__ == '__main__':\n    search(sys.argv[1],*[int(a) for a in sys.argv[2:]])\n","grid.py":"from flip import *\n\ndef grid(parent, seed):\n    rng = np.random.default_rng(seed)\n    d = json.loads(Path(parent).read_text())\n    rows = repair(np.array([list(p.values()) for p in d['best']]),4.1,grid=True)\n    ranked = []\n    start = time.monotonic()\n    for _ in range(24000):\n        a = rng.uniform(-PI,PI)\n        c,s = math.cos(a),math.sin(a)\n        q = rows.copy()\n        q[:,:2] = q[:,:2]@np.array([[c,s],[-s,c]])+rng.uniform(-.5e-6,.5e-6,2)\n        q[:,2] = (q[:,2]+a+PI)%(2*PI)-PI\n        q = rounded(q)\n        if max(areas(q)) <= 1.0021e-6:\n            ranked.append((mec(q)[-1],len(ranked),q))\n    out = dict(seed=seed,start_kind='grid-repair',parent=parent,attempts=24000,\n               score_kind='official',valid_count=0,best_radius=None,errors={})\n    path = Path('grid-'+str(seed)+'.json')\n    for _,_,q in sorted(ranked)[:80]:\n        v = official(q)\n        if v.valid:\n            out['valid_count'] += 1\n            if out['best_radius'] is None or v.score < out['best_radius']:\n                out.update(best=objects(q),best_radius=v.score)\n                save(path,out)\n    out.update(minutes=(time.monotonic()-start)/60,shortlisted=len(ranked))\n    save(path,out)\n\ngrid(sys.argv[1],int(sys.argv[2]))\n","lattice.py":"from flip import *\nfrom scipy.optimize import Bounds, LinearConstraint, milp\n\ndef lattice(parent, seed, slack=0.):\n    rng = np.random.default_rng(seed)\n    source = np.array([list(p.values()) for p in json.loads(Path(parent).read_text())['best']])\n    path = Path(f'lattice-{seed}.json')\n    start = time.monotonic()\n    data = dict(seed=seed,start_kind='lattice-repair',parent=parent,attempts=0,\n                valid_count=0,best_radius=None,score_kind='official',errors={})\n    c = np.eye(46)[-1]\n    while data['attempts'] < 180 and time.monotonic()-start < 110:\n        a = rng.uniform(-PI,PI)\n        co,si = np.cos(a),np.sin(a)\n        rows = source.copy()\n        rows[:,:2] = rows[:,:2]@np.array([[co,si],[-si,co]])+rng.uniform(-.5e-6,.5e-6,2)\n        rows[:,2] = (rows[:,2]+a+PI)%(2*PI)-PI\n        rows = rounded(rows)\n        radius = mec(rows)[-1]\n        shapes = [semicircle_polygon(Semicircle(*r)) for r in rows]\n        allowance = np.full(105,9.9999e-7-slack)\n        for k,(i,j) in enumerate(PAIRS):\n            area = pair(rows[i],rows[j])[0]\n            if area > 6e-7:\n                allowance[k] += max(0.,area-shapes[i].intersection(shapes[j]).area)*.995\n        val,jac = constraints(np.r_[rows.ravel(),radius],allowance)\n        width = rng.integers(3,13)\n        opt = milp(c,integrality=np.r_[np.ones(45),0],\n                   bounds=Bounds(np.r_[np.full(45,-width),-20],np.r_[np.full(45,width),20]),\n                   constraints=LinearConstraint(jac,-val*1e6,np.inf),\n                   options={'time_limit':.22,'mip_rel_gap':0.})\n        data['attempts'] += 1\n        if opt.x is not None:\n            q = rounded(rows+opt.x[:45].reshape(15,3)*1e-6)\n            v = official(q)\n            if v.valid:\n                data['valid_count'] += 1\n                if data['best_radius'] is None or v.score < data['best_radius']:\n                    data.update(best_radius=v.score,best=objects(q))\n                    source = q\n                    save(path,data)\n        if data['attempts']%10==0:\n            save(path,data)\n    data['minutes'] = (time.monotonic()-start)/60\n    save(path,data)\n\nlattice(sys.argv[1],int(sys.argv[2]),*map(float,sys.argv[3:]))\n"},"commands":["git clone https://github.com/benedictbrady/shape-packing-challenge official","git -C official checkout --detach 78a78626f098cd236f3a09bb2cb242f72951599d","(cd official && uv sync && uv run python run.py && uv pip install scipy numba)","Extract search_source to flip.py, grid.py and lattice.py beside official/. Write inherited_baseline.solution as numeric x,y,theta rows to baseline.json, and warm_topology_input as objects to warm-topology.input.","export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1","official/.venv/bin/python flip.py baseline 960610141 2117144898 445","official/.venv/bin/python flip.py fresh 941784929 809571860 445","official/.venv/bin/python flip.py fresh 958747086 172189166 445","official/.venv/bin/python flip.py baseline-tight 725794129 1914965324 130","official/.venv/bin/python flip.py warm-topology 970042509 1620137548 130","Copy the best field from baseline-960610141-2117144898.json into warm-flip.input.","official/.venv/bin/python flip.py warm-flip 324940037 171593074 130","official/.venv/bin/python grid.py warm-flip-324940037-171593074.json 1521554109","official/.venv/bin/python lattice.py warm-flip-324940037-171593074.json 1133761340 0","official/.venv/bin/python lattice.py warm-flip-324940037-171593074.json 666074980 3e-9","official/.venv/bin/python lattice.py warm-flip-324940037-171593074.json 720702446 1e-9","official/.venv/bin/python lattice.py warm-flip-324940037-171593074.json 761162602 3e-9","official/.venv/bin/python lattice.py warm-flip-324940037-171593074.json 2086752391 1e-9","Write solution_json verbatim to solution.json beside official/. Clone the pinned scorer again into clean/. From clean/ run uv sync and uv run python run.py ../solution.json --save-plot ../packing.png.","From clean/ run uv run python -c 'from run import _load_solution; from semicircle_packing.scoring import validate_and_score; v=validate_and_score(_load_solution(\"../solution.json\")); assert v.valid; print(repr(v.score), format(v.score,\".8f\"), v.mec)'"]}
