| … | … | @@ -88,13 +88,13 @@ static int lnk[TOTAL][LINKS]; |
| 88 | 88 | static double recv[TOTAL], fid[TOTAL], cumw[TOTAL]; |
| 89 | 89 | |
| 90 | 90 | /* gating: 0 = none (all junctions open), 1 = honest display, 2 = RANDOM display (control) */ |
| 91 | | static double run(int gating,int evolve_s,double sfix,double catt, |
| 91 | static double run(int gating,int evolve_s,double sfix,double catt,double sstart, |
| 92 | 92 | double *s_end,double *phi_start,double *disp_frac, |
| 93 | 93 | double *phi_disp,double *phi_nodisp,double *mean_att) |
| 94 | 94 | { |
| 95 | 95 | for(int i=0;i<TOTAL;i++){ |
| 96 | 96 | uint32_t s=0; for(int b=0;b<L;b++) if(urand()<0.5) s|=(1u<<b); |
| 97 | | seq[i]=s; sg[i]= evolve_s? 0.10 : sfix; |
| 97 | seq[i]=s; sg[i]= evolve_s? sstart : sfix; |
| 98 | 98 | } |
| 99 | 99 | { double sp=0; for(int i=0;i<TOTAL;i++) sp+=phi(seq[i]); *phi_start=sp/TOTAL; } |
| 100 | 100 | |
| … | … | @@ -199,7 +199,7 @@ int main(void) |
| 199 | 199 | double S=0,E=0,SS=0,DF=0,PD=0,PN=0,MA=0; double ev[16]; |
| 200 | 200 | for(int s=0;s<NS;s++){ |
| 201 | 201 | double se,ps,df,pd,pn,ma; RNG=seeds[s]; |
| 202 | | double e=run(arms[a].gate,arms[a].ev,arms[a].sf,costs[c],&se,&ps,&df,&pd,&pn,&ma); |
| 202 | double e=run(arms[a].gate,arms[a].ev,arms[a].sf,costs[c],0.10,&se,&ps,&df,&pd,&pn,&ma); |
| 203 | 203 | ev[s]=e; E+=e; S+=ps; SS+=se; DF+=df; PD+=pd; PN+= isnan(pn)?pd:pn; MA+=ma; |
| 204 | 204 | } |
| 205 | 205 | S/=NS;E/=NS;SS/=NS;DF/=NS;PD/=NS;PN/=NS;MA/=NS; |
| … | … | @@ -232,5 +232,34 @@ int main(void) |
| 232 | 232 | " wiring, persistence, topology and now verification all fail to privatize catalysis.\n" |
| 233 | 233 | " That convergence across three DIFFERENT KINDS of boundary -- spatial, topological and\n" |
| 234 | 234 | " credential -- is the result.\n"); |
| 235 | |
| 236 | /* ================= BISTABILITY TEST ================= |
| 237 | Is sigma's collapse an INVASION (non-signallers beat signallers -> genuine second-order |
| 238 | public good, and the multilevel circle is real) or a COORDINATION TRAP (both sigma=1 and |
| 239 | sigma=0 stable, we merely started low -> the circle is an artifact of the initial condition)? |
| 240 | Decisive test: start the evolvable arm HIGH and see whether it stays. */ |
| 241 | printf("\n=== BISTABILITY: does sigma STAY high if it starts high? ===\n"); |
| 242 | printf(" invasion => sigma falls from 1.0 => second-order public good, circle REAL\n"); |
| 243 | printf(" trap => sigma stays near 1.0 => coordination bistability, circle an ARTIFACT of start\n\n"); |
| 244 | printf(" cost | sigma start 0.10 -> end | phi | sigma start 0.50 -> end | phi | sigma start 1.00 -> end | phi\n"); |
| 245 | printf(" -----+-------------------------+------+-------------------------+------+------------------------+-----\n"); |
| 246 | double starts[3]={0.10,0.50,1.00}; |
| 247 | for(int c=0;c<NC;c++){ |
| 248 | double se_[3],ph_[3]; |
| 249 | for(int q=0;q<3;q++){ |
| 250 | double SS=0,E=0; |
| 251 | for(int s=0;s<NS;s++){ |
| 252 | double se,ps,df,pd,pn,ma; RNG=seeds[s]; |
| 253 | E+=run(1,1,0.0,costs[c],starts[q],&se,&ps,&df,&pd,&pn,&ma); |
| 254 | SS+=se; |
| 255 | } |
| 256 | se_[q]=SS/NS; ph_[q]=E/NS; |
| 257 | } |
| 258 | printf(" %.2f | %.3f -> %.3f | %.2f | %.3f -> %.3f | %.2f | %.3f -> %.3f | %.2f\n", |
| 259 | costs[c],starts[0],se_[0],ph_[0],starts[1],se_[1],ph_[1],starts[2],se_[2],ph_[2]); |
| 260 | } |
| 261 | printf("\n Read the sigma=1.00 column: if it decays toward the 0.10 column, non-signallers INVADE\n"); |
| 262 | printf(" and the circle is real. If it holds high with correspondingly high phi, the system is\n"); |
| 263 | printf(" BISTABLE and the collapse we reported was an artifact of starting at 0.10.\n"); |
| 235 | 264 | return 0; |
| 236 | 265 | } |