Repository navigation
RFC 0002 part 2: rest and load (opt-in blocks) - #46
Merged
Merged
Conversation
rest: pressure S over stamped hours; an idle gap at S >= threshold brings a rest line (its own strand line, chained before its event, never with feedback: pressure.pending) that scales learned weights by downscale, prune below prune; each learned trait's surprise gate (v, r, g, counts) is left unchanged. load: L from learning flags, declared senses and credit expiries plus a held mood; lowered as the engine-owned number input load_level (box [0, cap]), refused when sent, left out of the stance's inputs. Refusals W-R1, L-R1. live verify recomputes rest lines. The next-version test fixtures that used load and rest as unknown names now use sleep and nap.
CHANGELOG conflict resolved by keeping both: 0.10.1 lists ### Added (rest and load) then ### Changed (the two 0.10.1 fixes) and ### Other.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 0002 part 2 (docs/rfcs/0002-neuromodulators-and-body.md, "Part 2 (follow-on): rest and load"): two opt-in blocks. Mechanism (the downscale) and simulation (the pressure, the load). A persona without the blocks gives byte-identical documents.
What it does
rest: a pressure S (statepressure: {s, pending}) rises over active hours,S ← 1 − (1 − S) e^(−rise_per_hour h), and falls over idle gaps,S ← S e^(−fall_per_hour h). An idle gap (h ≥gap_hours) at S ≥thresholdbrings a rest line, its own strand line chained before its event, that sets every learned weight to round(ρΔ, 6), 0 belowprune. It never shares an event with feedback: an event with feedback setspressure.pending, and the line comes before the next event without feedback. Surprise gate: each learned trait's v, r̂, g and counts are left unchanged, and the line says so per trait. The credit and open decisions are not touched either.live verifyrecomputes rest lines and refuses one that is missing, extra, changed or trailing (exit 1). Refusal W-R1.load:L = round(clip(L × 0.5^(h/hl) + κ max(a_t − θ, 0) + κ_h h [held mood > θ_m], 0, L_cap), 6). a_t sums the weights of the learning flags that are on, the declared senses' readings (sense_<id>) and the credit expiries at this event (the credit half-life, which the patience gene scales). L is lowered as the engine-owned number inputload_level(box [0, L_cap]), the same waypace_up/pace_downare: refused when the host sends it, left out of the stance'sinputs, boxed byprove. The stance addsload: {l}and the state storesload: {l}. The load step runs right after the pace step. Refusal L-R1.## 0.10.1 - unreleasedAdded entry.next-load.strandandnext-rest.strandusedloadand a rest line as names no engine knew, but these now exist. They are renamednext-block.strand(sleepblock) andnext-line.strand(napline), with the same bytes otherwise, re-chained.Numbers (the bars pre-registered in bench/body/README.md P6/P7, measured by this engine for the first time)
PROBBIT_BIN=target/release/probbit python3 bench/body/run.py --only rest,load,replay,habits,p0: 14/14 gated bars pass, exit 0. nulls.py: 0 of 51 null rows pass a v2 bar.Also measured: replay.py's reported
r3_null_rest_line_removed_refusedreads false, because it removes lines that start with{"rest"and a chained canonical line never starts that way (prevsorts first). replay.py is MANIFEST-frozen, so it is not edited here. A hand check on reversal seed 0 (rest line at line 122) found: line removed → verify exit 1 (prev); removed and re-chained → exit 1 ("a rest line is due before this event and missing"); edited → exit 1. The unit testverify_recomputes_rest_linescovers the same cases.Gate
cargo test --locked: 418 passed, 0 failed, 1 ignored (macOS, load 16-21).bench/individuality/p0.py checkwith this build gives 653 outputs, 0 differ (629 identical, 24 stderr warnings only, 8 strands verified).live verifyoutput from the base build and from this build: 0 bytes differ for 11/11, exit 0. The 6 fixture strands written again by this build are byte-identical to the base build's.proveon a load persona boxesload_levelat 2 ± 2 = [0, L_cap 4].Draft for review. Do not merge before CI on the three operating systems is green and the numbers above have been read.