OverviewFilesCommitsIssuesDocsReleasesPeers

basal-agent commits / 90e5965

basal-agent: signal.c — costly signalling: first crossing without a container
Hypothesis #4. Containers, wiring, persistence and topology are all SPATIAL boundaries — walls or edges. That exhausts chemistry but not a digital substrate, where individuality comes from a writer set / keypair / signature: membership by UNFORGEABILITY, not containment or connectivity. So: a boundary made of verification. Razor: "only catalysts may display" would encode the answer, so the display IS the catalytic structure — exhibit one of your own complementary pairs. phi=12 passes first try, phi=2 needs ~6 attempts, so expected honest cost is 12/phi. That is Zahavi's handicap, but it is nowhere written as a formula — it emerges from searching your own material. Faking stays possible: spend more attempts. Junction opens only if BOTH ends displayed. No container, space, persistence or group selection; graph rebuilt at random each generation. 10 seeds, attempt cost swept (start and neutral expectation both ~5.99/6.0): cost 0.00 honest 5.52 RANDOM ctrl 5.45 gain +0.06 cost 0.20 honest 6.08 RANDOM ctrl 5.46 gain +0.62 cost 0.50 honest 6.45 RANDOM ctrl 5.46 gain +0.99 <- peak cost 0.70 honest 6.41 RANDOM ctrl 5.49 gain +0.91 cost 1.00 honest 6.01 RANDOM ctrl 6.01 gain +0.00 <- ARTIFACT, see below S5 passes decisively: at the peak, phi among displayers 6.47 vs 2.98 among non-displayers. The signal genuinely filters quality; the test really ran. POSITIVE: 6.45 +- 0.03 is ~15 sd above the neutral expectation of 6.0, with the control below neutral at 5.46. FIRST mechanism in the arc to lift phi above its random start with NO container. THREE REASONS IT IS NOT A SOLUTION: 1. Small — supplied compartments reached 11.64 (max 12); this reaches 6.45. 2. DOES NOT SELF-INSTALL — sigma free to evolve collapses to 0.019-0.475 and the evolvable arm plateaus at ~5.78 at EVERY cost, never approaching 6.45. Signalling is a second-order public good: we removed the first-order public-goods problem by reproducing it one level up. 3. cost=1.00 is an ARTIFACT, not a result — nearly every unit hits the MINW weight floor, selection is destroyed, and phi drifts back to its neutral mean. Both arms landing on 6.01 ~ 6.0 is the signature of no selection. Amended arc conclusion: no longer "only a container works" but "every boundary that privatizes a public good must itself be paid for, and nothing has made that payment self-sustaining". Compartments work because the boundary is supplied free; verification works while imposed and decays once its cost meets selection. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
90e59655d638c6389261d1bdf3c9ca8660284bd4
by plankatron <fleeky@gmail.com> · 2026-07-31T21:53:06.000Z

Changed files (3) +330 -0

.gitignore +1 -0
……@@ -40,3 +40,4 @@ rung34phi
4040coupling
4141partition
4242gardphi
43signal
signal.c +236 -0
……@@ -0,0 +1,236 @@
1/* signal.c — can an UNFORGEABLE-BUT-FAKEABLE display privatize catalysis, with no container
2 * and no topology?
3 *
4 * WHERE THIS COMES FROM. Three failures in the coupling thread (coupling.md, partition.md):
5 * reciprocity is real and selected-for but insufficient; persistence was falsified by its own
6 * lineage control; and a partitionable bilateral network fails because partitioning and gating turn
7 * out to be ANTI-correlated -- breaking the graph to exclude parasites also cuts catalysts off from
8 * each other.
9 *
10 * All of those tested SPATIAL boundaries: walls (containers) and edges (topology). That exhausts
11 * the options in chemistry. It does not exhaust them in a digital substrate, where individuality is
12 * routinely established by neither -- a writer set, a keypair, a signature. Membership there is not
13 * containment or connectivity but UNFORGEABILITY: a parasite cannot join because it cannot produce
14 * the credential. So the untested third kind of boundary is a VERIFICATION rule.
15 *
16 * THE RAZOR (issue #6). A rule saying "only catalysts may display" would encode the answer outright.
17 * So the display must be CAUSALLY THE SAME STRUCTURE that makes a unit catalytic, and faking must
18 * remain possible but expensive:
19 * catalysis phi(s) = number of complementary hairpin pairs (i, L-1-i) in the sequence
20 * display exhibit ONE such pair: pick a random index i, succeed iff bit_i != bit_{L-1-i}
21 * A unit with phi=12 succeeds on its first attempt; a unit with phi=2 needs ~6; phi=1 needs ~12.
22 * The expected cost of an honest display is exactly 12/phi. That IS Zahavi's handicap condition --
23 * signalling is cheaper for higher quality -- but it is not written down as a cost formula anywhere.
24 * It EMERGES from searching your own material. Crucially a parasite CAN still display; it just pays
25 * more attempts. Whether honest signalling is stable is left open, which is the point.
26 *
27 * WHAT IS SUPPLIED vs WHAT MUST EMERGE:
28 * SUPPLIED: the display primitive (show one good pair), bilateral gating (a junction opens only if
29 * BOTH ends displayed), and a heritable OPTION sigma = how many attempts a unit is willing to
30 * spend. The per-attempt cost is SWEPT, not picked.
31 * MUST EMERGE: honesty. Nothing prevents a low-phi unit from spending attempts until it passes.
32 * ABSENT: containers, space, assortment, group selection, persistent structure. The junction graph
33 * is rebuilt at random every generation and replication is global Wright-Fisher.
34 *
35 * Chemistry identical to ribozyme.c / coupling.c / partition.c (phi = hairpin fold, parasites 3x
36 * faster, F0=0.85, F1=0.999, 4800 units, 200 gens). Reference points: ribozyme well-mixed
37 * 5.99->5.50; coupling FRESH k=0 4.69 / k=1 5.36; partition best 5.82. Start is always ~5.99.
38 *
39 * PRE-REGISTERED (written before the first run):
40 * S1 no gating (all junctions open) -> phi FALLS. The public-goods baseline.
41 * S2 gating on honest display -> phi RISES above its random start. The crossing.
42 * S3 sigma free to evolve -> sigma settles somewhere non-trivial AND phi rises.
43 * S4 CONTROL, RANDOM display: success probability is the POPULATION MEAN rate rather than the
44 * unit's own phi -- same costs, same pass rate, but the display carries NO information about
45 * quality. If phi rises here too, the effect is the cost burden, not the signal, and S2/S3
46 * mean nothing.
47 * S5 TEST OF THE TEST: does the display actually separate quality? Report mean phi among units
48 * that displayed vs those that did not. If those are equal, the signal is uninformative and a
49 * null says nothing -- the mistake ribophi.c made with its not-actually-early window and
50 * partition.c made on its first run.
51 *
52 * This is hypothesis #4. If it fails too, the convergence across containers, topology and
53 * verification is itself the result. Do not tune to force a positive.
54 *
55 * build: cc -O2 -Wall -std=c11 -o signal signal.c -lm
56 */
57#include <math.h>
58#include <stdio.h>
59#include <stdint.h>
60
61/* ---------- identical to ribozyme.c / coupling.c / partition.c ---------- */
62#define L 24
63#define PHIMAX (L/2)
64#define TOTAL 4800
65#define GEN 200
66#define F0 0.85
67#define F1 0.999
68#define BETA 2.0
69
70/* ---------- signalling ---------- */
71#define LINKS 4
72#define AMAX 12 /* maximum display attempts a unit may spend */
73#define MUTS 0.03
74#define MINW 0.05 /* replication weight floor, so cost cannot make weight negative */
75
76static unsigned long long RNG;
77static unsigned long long xs(void){ RNG^=RNG<<13; RNG^=RNG>>7; RNG^=RNG<<17; return RNG; }
78static double urand(void){ return (double)(xs()>>11)*(1.0/9007199254740992.0); }
79static double randn(void){ double u=urand(),v=urand(); if(u<1e-300)u=1e-300; return sqrt(-2*log(u))*cos(6.283185307*v); }
80
81static int phi(uint32_t s){ int c=0; for(int i=0;i<PHIMAX;i++){ int a=(s>>i)&1, b=(s>>(L-1-i))&1; if(a!=b) c++; } return c; }
82static uint32_t replicate(uint32_t t,double f){ uint32_t c=0; for(int i=0;i<L;i++){ int b=(t>>i)&1; int nb=(urand()<f)?(1-b):b; if(nb) c|=(1u<<i);} return c; }
83
84static uint32_t seq[TOTAL], nseq[TOTAL];
85static double sg[TOTAL], nsg[TOTAL];
86static int phic[TOTAL], disp[TOTAL], att[TOTAL];
87static int lnk[TOTAL][LINKS];
88static double recv[TOTAL], fid[TOTAL], cumw[TOTAL];
89
90/* gating: 0 = none (all junctions open), 1 = honest display, 2 = RANDOM display (control) */
91static double run(int gating,int evolve_s,double sfix,double catt,
92 double *s_end,double *phi_start,double *disp_frac,
93 double *phi_disp,double *phi_nodisp,double *mean_att)
94{
95 for(int i=0;i<TOTAL;i++){
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;
98 }
99 { double sp=0; for(int i=0;i<TOTAL;i++) sp+=phi(seq[i]); *phi_start=sp/TOTAL; }
100
101 double lastD=0,lastPD=0,lastPN=0,lastA=0;
102
103 for(int g=0;g<GEN;g++){
104 for(int i=0;i<TOTAL;i++) phic[i]=phi(seq[i]);
105
106 /* population mean pass rate, for the RANDOM-display control */
107 double meanp=0; for(int i=0;i<TOTAL;i++) meanp+=(double)phic[i]/PHIMAX; meanp/=TOTAL;
108
109 /* --- display phase --- */
110 for(int i=0;i<TOTAL;i++){
111 int A=(int)(sg[i]*AMAX+0.5); if(A<0)A=0; if(A>AMAX)A=AMAX;
112 int used=0, ok=0;
113 double p = (gating==2)? meanp : (double)phic[i]/PHIMAX; /* control: quality-blind */
114 for(int a=0;a<A;a++){
115 used++;
116 if(urand()<p){ ok=1; break; } /* "show one of your own good pairs" */
117 }
118 disp[i]= gating? ok : 1; /* no gating -> everyone participates */
119 att[i]= gating? used : 0;
120 }
121
122 /* --- fresh random wiring, bilateral gating --- */
123 for(int i=0;i<TOTAL;i++) for(int l=0;l<LINKS;l++){ int j; do{ j=(int)(xs()%TOTAL); }while(j==i); lnk[i][l]=j; }
124 for(int i=0;i<TOTAL;i++) recv[i]=0.0;
125 for(int i=0;i<TOTAL;i++){
126 for(int l=0;l<LINKS;l++){
127 int j=lnk[i][l];
128 if(!(disp[i]&&disp[j])) continue; /* junction opens only if BOTH displayed */
129 recv[j]+=(double)phic[i]/PHIMAX;
130 recv[i]+=(double)phic[j]/PHIMAX;
131 }
132 }
133 for(int i=0;i<TOTAL;i++){
134 double R=recv[i]/(2.0*LINKS); if(R<0)R=0; if(R>1)R=1;
135 fid[i]=F0+(F1-F0)*R;
136 }
137
138 /* --- replication: parasites still 3x faster; display attempts cost --- */
139 double tot=0;
140 for(int i=0;i<TOTAL;i++){
141 double w=(1.0+BETA*(1.0-(double)phic[i]/PHIMAX))*(1.0-catt*att[i]);
142 if(w<MINW) w=MINW;
143 tot+=w; cumw[i]=tot;
144 }
145 for(int i=0;i<TOTAL;i++){
146 double r=urand()*tot; int lo=0,hi=TOTAL-1;
147 while(lo<hi){ int mid=(lo+hi)/2; if(cumw[mid]<r) lo=mid+1; else hi=mid; }
148 nseq[i]=replicate(seq[lo],fid[lo]);
149 double s2 = evolve_s ? sg[lo]+MUTS*randn() : sg[lo];
150 if(s2<0)s2=0;
151 if(s2>1)s2=1;
152 nsg[i]=s2;
153 }
154
155 /* S5 diagnostics, measured on the generation just scored */
156 {
157 double sd=0,sn=0,sa=0; int nd=0,nn=0;
158 for(int i=0;i<TOTAL;i++){ sa+=att[i]; if(disp[i]){ sd+=phic[i]; nd++; } else { sn+=phic[i]; nn++; } }
159 lastD=(double)nd/TOTAL; lastPD= nd? sd/nd : NAN; lastPN= nn? sn/nn : NAN; lastA=sa/TOTAL;
160 }
161 for(int i=0;i<TOTAL;i++){ seq[i]=nseq[i]; sg[i]=nsg[i]; }
162 }
163
164 double sp=0,ss=0;
165 for(int i=0;i<TOTAL;i++){ sp+=phi(seq[i]); ss+=sg[i]; }
166 *s_end=ss/TOTAL; *disp_frac=lastD; *phi_disp=lastPD; *phi_nodisp=lastPN; *mean_att=lastA;
167 return sp/TOTAL;
168}
169
170int main(void)
171{
172 unsigned long long seeds[10];
173 seeds[0]=0x9e3779b97f4a7c15ULL; seeds[1]=0xd1b54a32d192ed03ULL; seeds[2]=0x2545f4914f6cdd1dULL;
174 for(int i=3;i<10;i++) seeds[i]=0x9e3779b97f4a7c15ULL ^ (0x100000001b3ULL*(unsigned long long)(i+1));
175 int NS=10;
176
177 printf("=== COSTLY SIGNAL: can an unforgeable-but-fakeable display privatize catalysis? ===\n");
178 printf(" Display = exhibit ONE of your own complementary pairs. phi=12 passes first try;\n");
179 printf(" phi=2 needs ~6 attempts. Handicap condition EMERGES from search, is not written down.\n");
180 printf(" Faking stays possible: a parasite may spend attempts until it passes.\n");
181 printf(" Junction opens only if BOTH ends displayed. No container, no space, no group selection.\n");
182 printf(" REFERENCE: start ~5.99. ribozyme well-mixed 5.50; coupling k=1 5.36; partition best 5.82.\n\n");
183
184 double costs[]={0.00,0.05,0.10,0.20,0.30,0.50,0.70,1.00};
185 int NC=(int)(sizeof(costs)/sizeof(costs[0]));
186 struct { const char*name; int gate; int ev; double sf; } arms[]={
187 {"no gating (public good)", 0, 0, 0.0},
188 {"HONEST display sigma=1 ", 1, 0, 1.0},
189 {"honest, sigma evolvable", 1, 1, 0.0},
190 {"RANDOM display (ctrl) ", 2, 0, 1.0},
191 };
192 int NA=4;
193 double best=-1e9, bestc=-1; int informative=0;
194
195 for(int c=0;c<NC;c++){
196 printf(" --- attempt cost = %.2f ---\n",costs[c]);
197 double e_ng=0,e_h=0,e_r=0;
198 for(int a=0;a<NA;a++){
199 double S=0,E=0,SS=0,DF=0,PD=0,PN=0,MA=0; double ev[16];
200 for(int s=0;s<NS;s++){
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);
203 ev[s]=e; E+=e; S+=ps; SS+=se; DF+=df; PD+=pd; PN+= isnan(pn)?pd:pn; MA+=ma;
204 }
205 S/=NS;E/=NS;SS/=NS;DF/=NS;PD/=NS;PN/=NS;MA/=NS;
206 double sd=0; for(int s=0;s<NS;s++) sd+=(ev[s]-E)*(ev[s]-E); sd=sqrt(sd/(NS-1));
207 printf(" %s | %.2f -> %5.2f +- %.2f | sigma %.3f | displayed %5.1f%% | phi disp/no %.2f/%.2f | att %.2f\n",
208 arms[a].name,S,E,sd,SS,100.0*DF,PD,PN,MA);
209 if(a==0) e_ng=E;
210 if(a==1){ e_h=E; if(PD-PN>0.3) informative=1; if(E-S>best){ best=E-S; bestc=costs[c]; } }
211 if(a==3) e_r=E;
212 }
213 printf(" honest gain over public good %+.2f | over RANDOM display %+.2f\n\n", e_h-e_ng, e_h-e_r);
214 }
215
216 printf(" S5 TEST OF THE TEST — did the display ever separate quality? %s\n",
217 informative?"YES (phi of displayers exceeds non-displayers)":"NO — signal uninformative");
218 printf(" best phi change from START, honest arm: %+.2f at cost %.2f (start ~5.99)\n\n",best,bestc);
219
220 if(!informative)
221 printf(" => THE TEST DID NOT RUN. The display never distinguished high-phi from low-phi units,\n"
222 " so nothing here speaks to whether verification can privatize catalysis. Report as an\n"
223 " invalid experiment, NOT as a null.\n");
224 else if(best>0.05)
225 printf(" => phi ROSE ABOVE ITS RANDOM START (%+.2f), the first mechanism in the arc to do so with\n"
226 " NO container. The RANDOM-display control stayed flat, so the effect is the signal and\n"
227 " not the cost burden. But read the size: compartments took phi to 11.6, this is a rise\n"
228 " off 5.99, and check whether sigma-evolvable tracks sigma=1 -- if selection drives sigma\n"
229 " DOWN, honest signalling works when imposed but does not self-install.\n",best);
230 else
231 printf(" => HONEST NULL, AND IT IS THE FOURTH. Containers were the only thing that ever worked;\n"
232 " wiring, persistence, topology and now verification all fail to privatize catalysis.\n"
233 " That convergence across three DIFFERENT KINDS of boundary -- spatial, topological and\n"
234 " credential -- is the result.\n");
235 return 0;
236}
signal.md +93 -0
……@@ -0,0 +1,93 @@
1# `signal.c` — the first crossing without a container, and why it still doesn't count as a solution
2
3**Hypothesis #4** of the coupling thread, after wiring (`coupling.md`), persistence (falsified by its
4own control), and topology (`partition.md`) all failed.
5
6## The idea
7
8Every prior attempt tested a **spatial** boundary: walls (containers) or edges (topology). That
9exhausts the options in chemistry. It does not exhaust them in a digital substrate, where
10individuality is routinely established by neither — a writer set, a keypair, a signature. Membership
11there is not containment or connectivity but **unforgeability**. So: a boundary made of
12*verification*.
13
14**The razor.** A rule saying "only catalysts may display" encodes the answer. So the display is
15*causally the same structure* that makes a unit catalytic:
16
17- catalysis: `φ(s)` = number of complementary hairpin pairs `(i, L−1−i)`
18- display: exhibit **one** such pair — pick a random index, succeed iff `bit_i ≠ bit_{L−1−i}`
19
20φ=12 passes first try; φ=2 needs ~6 attempts; φ=1 needs ~12. Expected honest cost is exactly `12/φ`
21— Zahavi's handicap condition — but nowhere is a cost formula written down. It **emerges from
22searching your own material**. And faking stays possible: a low-φ unit may spend attempts until it
23passes. Junctions open only if **both** ends displayed. No container, no space, no persistence, no
24group selection; global Wright-Fisher; the graph is rebuilt at random every generation.
25
26## Results (10 seeds, attempt cost swept)
27
28| cost | honest σ=1 | RANDOM display (control) | gain over control | σ-evolvable (σ →) |
29|---|---|---|---|---|
30| 0.00 | 5.52 | 5.45 | +0.06 | 5.63 (0.475) |
31| 0.05 | 5.64 | 5.47 | +0.17 | 5.76 (0.093) |
32| 0.10 | 5.83 | 5.45 | +0.38 | 5.78 (0.064) |
33| 0.20 | 6.08 | 5.46 | +0.62 | 5.77 (0.043) |
34| 0.30 | 6.26 | 5.45 | +0.81 | 5.78 (0.035) |
35| **0.50** | **6.45 ± 0.03** | **5.46** | **+0.99** | 5.77 (0.027) |
36| 0.70 | 6.41 | 5.49 | +0.91 | 5.78 (0.023) |
37| 1.00 | 6.01 | 6.01 | **+0.00** | 5.78 (0.019) |
38
39**S5 (test of the test) passes decisively.** At the peak, mean φ among displayers is **6.47** vs
40**2.98** among non-displayers. The signal genuinely filters quality — unlike `partition.c`'s first
41run, this test really ran.
42
43## The positive result, stated exactly
44
45φ starts at 5.99, which is also the neutral expectation (a random 24-bit sequence has
46E[φ] = Binomial(12, ½) = 6.0). At cost 0.50 the honest arm reaches **6.45 ± 0.03** — above neutral
47by ~15 sd — while the RANDOM-display control sits at **5.46**, below neutral, parasites winning.
48
49**This is the first mechanism in the whole arc to lift φ above its random start with no container.**
50Containers, wiring, persistence and topology all failed to do this. The control being flat across
51the entire useful range means the effect is the *information in the signal*, not the cost burden.
52
53## Three things that stop it being a solution
54
551. **It is small.** Supplied compartments took φ from 5.99 to **11.64**, near the maximum of 12.
56 Signalling gets 6.45. It converts a losing situation into a marginally winning one; it does not
57 ignite a bootstrap.
582. **It does not self-install.** σ free to evolve collapses to **0.019–0.475**, falling as cost
59 rises, and the σ-evolvable arm plateaus at ~5.78 at *every* cost — never approaching the 6.45
60 that σ=1 achieves. Selection drives signalling *down* even where the population would do better
61 signalling hard. Honest signalling is itself a **second-order public good**: it benefits the group
62 and costs the individual. So we removed the first-order public-goods problem by reproducing it one
63 level up.
643. **The cost=1.00 row is an artifact and must not be read as a result.** There the control also
65 reaches 6.01 and the gain collapses to +0.00. Reason: at that cost nearly every unit hits the
66 `MINW` weight floor, which destroys selection entirely, and φ simply drifts back to its neutral
67 mean of 6.0. Both arms landing on 6.01 ≈ 6.0 is the signature of no selection, not of signalling.
68 The honest peak is cost 0.50.
69
70## Where the coupling thread now stands
71
72| hypothesis | boundary made of | result |
73|---|---|---|
74| `coupling.c` | reciprocal wiring | real and selected-for (+0.67, control flat), insufficient — φ falls |
75| persistence | inherited wiring | **falsified by its own control** — random inheritance works equally well |
76| `partition.c` | topology | partitioning and gating anti-correlated; gating's edge vanishes as the graph breaks |
77| `signal.c` | **verification** | **first rise above neutral (+0.46), control flat — but does not self-install** |
78
79The arc's conclusion survives, in an amended form. It is no longer "only a container works." It is:
80**every boundary that privatizes a public good must itself be paid for, and nothing has yet made
81that payment self-sustaining.** Compartments work because the boundary is *supplied free*.
82Verification works while it is *imposed* and decays the moment its cost is left to selection.
83
84## What this hands to the Levin question
85
86The measured question is now sharper than "container or coupling". It is:
87
88> **what pays for the boundary?** In tissue, gap-junctional coupling is maintained at real metabolic
89> cost, and it does not decay to nothing. In our model the equivalent investment collapses under
90> selection within a few hundred generations. What holds it up?
91
92That is a mechanism question about his own system, and it is the exact point where four independent
93models of ours break.