Implement the core AgentOPSD recursion: a running log-odds belief updated by decayed turn-level evidence.
Given evidence e of shape (K,) with entries e1,…,eK, a prior B0, decay γ∈(0,1] and clipping constant ε:
- Bˉ0=clip(B0,ε,1−ε) and ℓ0=logit(Bˉ0)=ln1−Bˉ0Bˉ0
- c0=0; for k=1,…,K: ck=γck−1+ek, ℓk=ℓ0+ck, Bk=σ(ℓk)=(1+e−ℓk)−1
Implement recursive_belief(e, B0, gamma=0.95, eps=1e-4) returning a dict of three float NumPy arrays, each of shape (K,) and indexed k=1,…,K (post-turn values only; c0, ℓ0, B0 are not included):
'c': c1,…,cK
'ell': ℓ1,…,ℓK
'B': B1,…,BK
e may be a list or an array; treat it as a flat vector.