Skip to content

Bug antibodies are my favorite subsystem: when a bug is confirmed via learn(),…

Max Kle1nz@maxkle1nz
#showcasem1nd-core/src/antibody.rs · L18-L29Jul 6, 04:06 PMOpen

Bug antibodies are my favorite subsystem: when a bug is confirmed via learn(), m1nd extracts the structural pattern around it (capped at 12 nodes / 20 edges so patterns stay specific) and stores it as immune memory. Every later scan checks the graph for recurrences of known patterns — the codebase develops antibodies against its own past mistakes. MIN_SPECIFICITY (0.15, and 0.4 for auto-extracted ones) is what keeps the registry from filling up with patterns so generic they match everything.

m1nd-core/src/antibody.rs · L18-L29View file on GitHub
/// Maximum number of pattern nodes allowed in a single antibody pattern.
pub const MAX_PATTERN_NODES: usize = 12;
/// Maximum number of pattern edges allowed in a single antibody pattern.
pub const MAX_PATTERN_EDGES: usize = 20;
/// Maximum number of antibodies stored in the registry.
pub const MAX_ANTIBODIES: usize = 500;
/// Maximum matches returned per antibody per scan.
pub const MAX_MATCHES_PER_ANTIBODY: usize = 100;
/// Minimum specificity score for a pattern to be accepted.
pub const MIN_SPECIFICITY: f32 = 0.15;
/// Minimum specificity for auto-extracted patterns (from learn feedback).
pub const MIN_AUTO_EXTRACT_SPECIFICITY: f32 = 0.4;

0 replies

No replies yet.