| … | … | @@ -188,67 +188,48 @@ int main(void) |
| 188 | 188 | for(int i=3;i<6;i++) seeds[i]=0x9e3779b97f4a7c15ULL ^ (0x100000001b3ULL*(unsigned long long)(i+1)); |
| 189 | 189 | int NS=6; |
| 190 | 190 | |
| 191 | | printf("=== FIDELITY FLOOR: does emergent compartment selection lower Eigen's bootstrap wall? ===\n"); |
| 192 | | printf(" polymer.c (single level) found heritable function needs f >= 0.98, while un-catalyzed\n"); |
| 193 | | printf(" templating supplies ~0.85 — and the replicase closing that gap needs the fidelity first.\n"); |
| 194 | | printf(" Here polymer.c's dynamics run INSIDE chemoton.c's emergent compartments. L=%d, %d seeds.\n",L,NS); |
| 195 | | printf(" SELECT = uptake ~ mean functional match. BLIND = uptake ~ size (compartments, no\n"); |
| 196 | | printf(" selection) — THE CONTROL. MIXED = one big pool, the single-level baseline.\n\n"); |
| 197 | | |
| 198 | | double fs[]={0.80,0.85,0.90,0.95,0.98}; |
| 199 | | int nF=5, divsz=8; |
| 200 | | double sel[8],bli[8],mix[8], st=0; |
| 201 | | double dv=0, pS=0, pB=0, pM=0, rS=0, rB=0, rM=0; |
| 202 | | |
| 203 | | printf(" f | MIXED (1 level) | BLIND (comps, no sel) | SELECT (emergent sel)\n"); |
| 204 | | printf(" -------+-----------------+-----------------------+----------------------\n"); |
| 191 | printf("=== DIVISION-SIZE SWEEP: is there a size both small enough to CORRECT and large\n"); |
| 192 | printf(" enough to REMEMBER? ===\n"); |
| 193 | printf(" At divsz 8, compartments made things WORSE (MIXED 0.905 > SELECT 0.817 > BLIND 0.632 at\n"); |
| 194 | printf(" f=0.98): units of ~4-8 strands lose sequences to drift faster than between-compartment\n"); |
| 195 | printf(" selection spreads them. But ribozyme.c/chemoton.c need SMALL compartments for the\n"); |
| 196 | printf(" corrector. Opposite demands on one parameter. Sweeping it settles whether any size wins.\n"); |
| 197 | printf(" NOTE: as divsz -> MAXSZ=%d, SELECT converges on MIXED trivially (one big compartment IS\n",MAXSZ); |
| 198 | printf(" well-mixed). The question is whether SELECT ever EXCEEDS MIXED, not whether it approaches.\n\n"); |
| 199 | |
| 200 | double fs[]={0.90,0.95,0.98}; |
| 201 | int szs[]={4,6,8,12,16,24}; |
| 202 | int nF=3, nZ=6; |
| 203 | |
| 205 | 204 | for(int i=0;i<nF;i++){ |
| 206 | | double a=0,b=0,c=0,s0=0,d1=0,p1=0,p2=0,p3=0,r1=0,r2=0,r3=0; |
| 207 | | for(int s=0;s<NS;s++){ |
| 208 | | double s1,dd,pp,rr; |
| 209 | | RNG=seeds[s]; c+=run(2,fs[i],divsz,&s1,&dd,&pp,&rr); p3+=pp; r3+=rr; |
| 210 | | RNG=seeds[s]; b+=run(1,fs[i],divsz,&s1,&dd,&pp,&rr); p2+=pp; r2+=rr; |
| 211 | | RNG=seeds[s]; a+=run(0,fs[i],divsz,&s1,&dd,&pp,&rr); s0+=s1; d1+=dd; p1+=pp; r1+=rr; |
| 205 | /* MIXED does not divide, so it is one constant reference per fidelity */ |
| 206 | double mx=0,mp=0,mr=0; |
| 207 | for(int s=0;s<NS;s++){ double s1,dd,pp,rr; RNG=seeds[s]; mx+=run(2,fs[i],8,&s1,&dd,&pp,&rr); mp+=pp; mr+=rr; } |
| 208 | mx/=NS; mp/=NS; mr/=NS; |
| 209 | printf(" --- f = %.2f (MIXED reference %.3f, pop %.0f, reps %.0f) ---\n",fs[i],mx,mp,mr); |
| 210 | printf(" divsz | BLIND | SELECT | SELECT-MIXED | mean sz | reps(SEL)\n"); |
| 211 | printf(" ------+-------+--------+--------------+---------+----------\n"); |
| 212 | double best=-9; int bestz=-1; |
| 213 | for(int z=0;z<nZ;z++){ |
| 214 | double b=0,a=0,ms=0,rr2=0; |
| 215 | for(int s=0;s<NS;s++){ |
| 216 | double s1,dd,pp,rr; |
| 217 | RNG=seeds[s]; b+=run(1,fs[i],szs[z],&s1,&dd,&pp,&rr); |
| 218 | RNG=seeds[s]; a+=run(0,fs[i],szs[z],&s1,&dd,&pp,&rr); ms+=pp; rr2+=rr; |
| 219 | } |
| 220 | b/=NS;a/=NS;ms/=NS;rr2/=NS; |
| 221 | double d=a-mx; |
| 222 | printf(" %2d | %.3f | %.3f | %+.3f | %5.0f | %6.0f\n",szs[z],b,a,d,ms,rr2); |
| 223 | if(d>best){ best=d; bestz=szs[z]; } |
| 212 | 224 | } |
| 213 | | sel[i]=a/NS; bli[i]=b/NS; mix[i]=c/NS; st=s0/NS; |
| 214 | | dv=d1/NS; pS=p1/NS; pB=p2/NS; pM=p3/NS; rS=r1/NS; rB=r2/NS; rM=r3/NS; |
| 215 | | printf(" %.2f | %.3f | %.3f | %.3f\n", |
| 216 | | fs[i],mix[i],bli[i],sel[i]); |
| 225 | printf(" best SELECT-MIXED %+.3f at divsz %d %s\n\n", best, bestz, |
| 226 | best>0.02?"<-- SELECT WINS somewhere":"(compartments never beat well-mixed)"); |
| 217 | 227 | } |
| 218 | | printf("\n start (random soup) %.3f\n",st); |
| 219 | | printf(" diagnostics at f=0.98: divisions/step %.1f | mean pop MIXED %.0f BLIND %.0f SELECT %.0f\n",dv,pM,pB,pS); |
| 220 | | printf(" total replications MIXED %.0f BLIND %.0f SELECT %.0f\n",rM,rB,rS); |
| 221 | 228 | |
| 222 | | /* emergence criterion, verbatim from polymer.c: end > 0.85 AND end > start + 0.2 */ |
| 223 | | int fM=-1,fB=-1,fS=-1; |
| 224 | | for(int i=0;i<nF;i++){ |
| 225 | | if(fM<0 && mix[i]>0.85 && mix[i]>st+0.2) fM=i; |
| 226 | | if(fB<0 && bli[i]>0.85 && bli[i]>st+0.2) fB=i; |
| 227 | | if(fS<0 && sel[i]>0.85 && sel[i]>st+0.2) fS=i; |
| 228 | | } |
| 229 | | printf("\n floor (first f where function emerges, polymer.c's criterion):\n"); |
| 230 | | printf(" MIXED %s%.2f\n", fM<0?">":"", fM<0?fs[nF-1]:fs[fM]); |
| 231 | | printf(" BLIND %s%.2f\n", fB<0?">":"", fB<0?fs[nF-1]:fs[fB]); |
| 232 | | printf(" SELECT %s%.2f\n\n", fS<0?">":"", fS<0?fs[nF-1]:fs[fS]); |
| 233 | | |
| 234 | | int turned = dv>0.5; |
| 235 | | if(!turned) |
| 236 | | printf(" => F4 FAILED, THE TEST DID NOT RUN. Compartments did not divide, so there was no\n" |
| 237 | | " compartment-level reproduction to select on. Invalid experiment, not a null.\n"); |
| 238 | | else if(fS>=0 && (fM<0 || fs[fS]<fs[fM]) && (fB<0 || fs[fS]<fs[fB])) |
| 239 | | printf(" => THE FLOOR DROPS, AND ONLY WITH SELECTION. Emergent compartment selection lets\n" |
| 240 | | " heritable function appear at a fidelity where both the single-level baseline and\n" |
| 241 | | " compartments-without-selection fail. Eigen's bootstrap paradox is not a wall in the\n" |
| 242 | | " order it is usually posed: you do not need accurate copying before compartments —\n" |
| 243 | | " compartments make accurate copying affordable. CHECK the population and replication\n" |
| 244 | | " diagnostics before claiming it: if SELECT ran far more replications, the shift may\n" |
| 245 | | " be sheer number of trials rather than multilevel selection.\n"); |
| 246 | | else if(fS>=0 && fB>=0 && fs[fS]>=fs[fB]) |
| 247 | | printf(" => COMPARTMENTS, NOT SELECTION. The floor drops (or does not) identically with and\n" |
| 248 | | " without between-compartment selection, so mere compartmentalization explains it.\n"); |
| 249 | | else |
| 250 | | printf(" => HONEST NULL. Emergent compartment selection does NOT lower the fidelity floor here;\n" |
| 251 | | " the bootstrap paradox survives multilevel selection in this model. That is a real\n" |
| 252 | | " result: it says the wall is fidelity itself, not the level selection acts on.\n"); |
| 229 | printf(" READ: a positive SELECT-MIXED at some intermediate divsz would mean an optimum exists —\n"); |
| 230 | printf(" compartments small enough to correct AND large enough to remember. If the column is\n"); |
| 231 | printf(" negative everywhere and merely rises toward 0 as divsz grows, compartmentalization is a\n"); |
| 232 | printf(" pure COST for sequence maintenance at every granularity, and multilevel selection cannot\n"); |
| 233 | printf(" lower Eigen's floor by any choice of compartment size.\n"); |
| 253 | 234 | return 0; |
| 254 | 235 | } |