Repository navigation
causal-edge: exact truth codes for deduction, induction, abduction (D-NALP-4 harvest) - #1548
Conversation
A register holds f and c as u8 codes. execute (forward and the named register methods) and syllogize decoded them to f32, applied the law with rounding at every step, and packed with (v * 255).round(). That is off by one code on 2,413 of 2^32 inputs for deduction and 4,352 each for induction and abduction. isa::truth::code computes each law in integers and rounds once, half up; Opcode::truth_code routes the three rules there (revision and synthesis keep the f32 path, unchanged). The f32 functions stay for real-valued callers. The oracle and the probe are harvested from #1544 (D-NALP-4): an independent integer oracle in tests/common/truth_law.rs, hand-computed codes, two half-up ties, the OpenNARS nal1.1 outputs, and register tests on exactly the inputs where the f32 path was off. The exhaustive probe (examples/truth_exact_probe.rs) finds 0 differences from the oracle over 2^32 inputs per law. The legacy golden capture is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Entry 2026-10-14-isa-truth-exact-codes.md with the exhaustive measurement and the open items (revision/synthesis not exact; whether a lane terminal is still needed). STATUS_BOARD D-NALP-4 -> partial, in PR. Plan 4 C gets a MEASURED note; the rescope of 4 B/C stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
DECISION (approved, points 1-4): the Gadamer gate's invariants are frozen, each cited to the test that pins it; the revision layers (gate, CE64 register, folded evidence, Rubikon phases) are kept apart; goal revision runs only in Planning and Evaluation, agreement on a goal is a HorizonFusion with the other party's statement as the new root, and a goal is never revised by counting. Tests for R1-R4 are open. Also records the differential against main for the exact truth codes: 5 of 16,000,000 register results differ, only in the confidence field, by one code; bits 50..52 and 59..63 never change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
|
Add Carrot credits or activate Agent usage billing to use Autofix |
This makes deduction, induction and abduction exact in
causal_edge::isa::truth, the one place NARS truth already lives. It is the harvest of draft #1544: its oracle and probe move intocausal-edge, and the lane terminal it planned is not built.Problem
A CE64 register holds
fandcasu8codes (x / 255).execute(and soforwardand the named register methods) andsyllogizedecoded them tof32, applied the law with rounding at every step, and packed with(v · 255).round(). That is one confidence code off on 2,413 of 2³² inputs for deduction and 4,352 each for induction and abduction.Change
isa::truth::code::{deduction, induction, abduction}:u8codes in and out, computed in integers and rounded once, half up.Opcode::truth_code: routes those three rules there. Revision and synthesis keep thef32path, unchanged.executeandsyllogize: packtruth_code's result.truth::pack: the one place(v.clamp(0, 1) · 255).round()is spelled.f32functions stay for real-valued callers.Evidence
Exhaustive probe (
cargo run --release -p causal-edge --example truth_exact_probe), all 2³² inputs per rule:truth::code≠ oraclef32path ≠ oracleThe oracle (
tests/common/truth_law.rs) is written independently of the crate.tests/ce64_truth_exact.rs, 8 tests:4d1bdb0;executeandsyllogizepacking the oracle's codes on exactly the inputs where thef32path was off: 12 deduction rows of the grid, and 17 induction and 17 abduction rows from an exhaustive scan of the three codes their confidence depends on. The grid holds none for those two.Disable runs, each red:
truth_codeback tof32;syllogizededuction back tof32; round down; ties-to-even.Unchanged: the legacy golden capture (126 words) and all other
causal-edgetests, in both layouts.Dependents green:
chain_confidence,d_rpf_table_1,moore_tenant_isa_equivalenceandmoore_nars16_probe;cognitive-shader-driverlib (131 passed);lance-graph-osintp5_syllogize(4 passed).Board
2026-10-14-isa-truth-exact-codes.md.nal-polyfill-v1.md§4 C.Not in this PR
(0, 0)and are pinned as a known defect.cargo clippy -D warningsoncausal-edgealready fails on six lints in code this PR does not touch; CI runs onlycargo testfor this crate. The additions here are clippy-clean.🤖 Generated with Claude Code
https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Generated by Claude Code