pub struct ProbabilityStore { /* private fields */ }Expand description
Append-only probability evidence store.
Implementations§
Source§impl ProbabilityStore
impl ProbabilityStore
pub const fn new() -> Self
pub const fn from_records(records: Vec<ProbabilityEvidence>) -> Self
pub fn record(&mut self, evidence: ProbabilityEvidence) -> String
pub fn update( &mut self, target: impl Into<String>, observation: impl Into<String>, weight: f32, provenance: impl Into<String>, recorded_at: impl Into<String>, ) -> String
Sourcepub fn reinforce_transition_path<S: AsRef<str>>(
&mut self,
path: &[S],
reward: f32,
provenance: impl Into<String>,
recorded_at: impl Into<String>,
) -> Vec<String>
pub fn reinforce_transition_path<S: AsRef<str>>( &mut self, path: &[S], reward: f32, provenance: impl Into<String>, recorded_at: impl Into<String>, ) -> Vec<String>
Reinforce a whole episode’s trajectory in one shot — the deterministic, append-only counterpart of the paper’s global feedback (episode-wide one-shot update) from arXiv:2605.00940.
Given an ordered path of visited states [s0, s1, ..., sn], this
appends one ProbabilityModel::MarkovTransition record per adjacent
pair (s_i -> s_{i+1}), each carrying the shared episode reward as its
utility U and the same provenance/recorded_at stamp, so the entire
episode is reinforced together rather than transition by transition. The
recorded evidence is then visible to Self::target_weight /
Self::target_evidence_count under the matching markov_from state,
exactly like any other transition observation.
Returns the ids of the appended records in path order. A path with
fewer than two states has no transitions, so it records nothing and
returns an empty vector.
pub fn records(&self) -> &[ProbabilityEvidence]
pub fn target_weight( &self, target: &str, offline: bool, markov_from: Option<&str>, ) -> f32
Sourcepub fn target_evidence_count(
&self,
target: &str,
offline: bool,
markov_from: Option<&str>,
) -> usize
pub fn target_evidence_count( &self, target: &str, offline: bool, markov_from: Option<&str>, ) -> usize
Count the number of append-only observations that support target.
This is the symbolic analogue of the evidence count C from Kolonin’s
“Interpretable Experiential Learning” (arXiv:2605.00940): every recorded
observation is one unit of evidence for a transition/answer, kept
separate from the accumulated utility (target_weight) so that a rarely
seen high-weight transition can be told apart from a frequently confirmed
one. The same offline and Markov-state filters as Self::target_weight
apply, so utility and count always describe the same evidence subset.
Sourcepub fn nearest_similar_evidence(
&self,
target: &str,
offline: bool,
markov_from: Option<&str>,
threshold: f32,
) -> Option<SimilarEvidence>
pub fn nearest_similar_evidence( &self, target: &str, offline: bool, markov_from: Option<&str>, threshold: f32, ) -> Option<SimilarEvidence>
Reuse the nearest stored target’s evidence when target has none of its
own — the symbolic counterpart of the paper’s cosine-similarity SS
fallback over stored situations.
Among the distinct targets that carry usable evidence under the same
offline/Markov filters (excluding target itself), this returns the one
whose symbolic_cosine_similarity to target is highest and at least
threshold. Ties are broken by target name so the choice is
deterministic. Returns None when nothing clears the threshold.
pub fn to_links_notation(&self) -> String
pub fn replay_into_event_log(&self, log: &mut EventLog, offline: bool) -> usize
pub fn append_to_link_store<S: LinkStore>( &self, store: &mut S, offline: bool, ) -> Result<usize, LinkStoreError>
Trait Implementations§
Source§impl Clone for ProbabilityStore
impl Clone for ProbabilityStore
Source§fn clone(&self) -> ProbabilityStore
fn clone(&self) -> ProbabilityStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more