pub struct RuleEffect {
pub error_damping: f64,
pub action_preference: BTreeMap<String, f64>,
pub min_uncertainty: f64,
pub explore_bonus: f64,
pub risk_tolerance: f64,
}Expand description
Structured, safely-applied effect of a cognitive patch.
This is what actually changes L0 behavior — not the code string.
Fields§
§error_damping: f64Multiplies prediction error / uncertainty (1.0 = no change, lower = better).
action_preference: BTreeMap<String, f64>Additive preference scores for action names.
min_uncertainty: f64Floor for reported uncertainty after damping.
explore_bonus: f64Additive score bias toward “explore” (negative favors exploit/stabilize).
risk_tolerance: f64Soft threshold for treating uncertainty as “high” (higher = more tolerant).
Implementations§
Source§impl RuleEffect
impl RuleEffect
Sourcepub const ALLOWED_ACTIONS: &'static [&'static str]
pub const ALLOWED_ACTIONS: &'static [&'static str]
Constant defining allowed actions.
Sourcepub fn validate_bounds(&self) -> Option<String>
pub fn validate_bounds(&self) -> Option<String>
Validates this value and reports any violated constraints.
Trait Implementations§
Source§impl Clone for RuleEffect
impl Clone for RuleEffect
Source§impl Debug for RuleEffect
impl Debug for RuleEffect
Source§impl Default for RuleEffect
impl Default for RuleEffect
Source§impl<'de> Deserialize<'de> for RuleEffect
impl<'de> Deserialize<'de> for RuleEffect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RuleEffect
impl PartialEq for RuleEffect
Source§impl Serialize for RuleEffect
impl Serialize for RuleEffect
impl StructuralPartialEq for RuleEffect
Auto Trait Implementations§
impl Forget for RuleEffect
impl Freeze for RuleEffect
impl Move for RuleEffect
impl RefUnwindSafe for RuleEffect
impl Send for RuleEffect
impl Sync for RuleEffect
impl Unpin for RuleEffect
impl UnsafeUnpin for RuleEffectwhere
*const LeafNode<String, f64> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, f64)>>: UnsafeUnpin,
impl UnwindSafe for RuleEffect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more