oracular / evidenceToReveal
Function: evidenceToReveal()
function evidenceToReveal(intent, opts?): number;Defined in: evidence.ts:29
How much positive evidence an intent needs before shouldReveal first becomes true: the smallest pseudo-count w such that Beta(α₀ + w, β₀) clears both p ≥ threshold and lower ≥ threshold, with lower as bound defines it (p − z·sd, or the exact Beta quantile). Divide by a signal's weight and round up for the number of full-weight occurrences that open the gate: distinct signals, or one occurrence per episode. Repeats within one episode add less (n of them add w × log2(1 + n), see IntentConfig.saturate). Solved numerically to 1e-9.
Cooldowns and decay are not part of the answer: this is the evidence needed at one instant.
Parameters
| Parameter | Type | Description |
|---|---|---|
intent | IntentConfig | One intent's config, validated as createState would. |
opts? | RevealOptions | threshold, z and bound overrides, resolved as call → intent → defaults (there is no engine config here). cooldown is accepted and ignored. |
Returns
number
The pseudo-count sum; 0 when the prior alone already clears the gate; Infinity when no finite amount of evidence can (threshold 1).
Throws
TypeError or RangeError when intent or opts is invalid.
Example
const needed = evidenceToReveal(config.intents.upgrade); // ≈ 15.1 for the quickstart config
Math.ceil(needed / 3); // 6 full-weight signals of weight 3