/** * Behavioral Landscape — multi-dimensional identity map. * * Instead of a flat profile that averages all behavior, the landscape * maintains per-category profiles. An agent behaves differently on * different tasks — that's not noise, the PATTERN of variation IS * the identity. * * Uses landscape when sufficient per-category data exists (>5 per category). * Falls back to flat profile for new agents. */ import { type PhenotypicSignals } from "../experiment/signals.js"; /** Running statistics for a single feature — Welford's online algorithm. */ export interface FeatureStats { count: number; mean: number; m2: number; } /** Per-category behavioral profile. */ export interface CategoryProfile { category: string; featureStats: Record; observationCount: number; } /** How behavior shifts between task types. */ export interface TransitionSignature { fromCategory: string; toCategory: string; featureDelta: Record; observationCount: number; } /** The full behavioral landscape — identity as a multi-dimensional map. */ export interface BehavioralLandscape { genomeHash: string; /** Per-category profiles — how the agent behaves on each task type. */ categories: Map; /** Cross-category stability metrics. */ crossCategoryStability: Record; /** How behavior shifts between task types. */ transitions: TransitionSignature[]; /** Flat profile across all categories (fallback for new agents). */ flatFeatures: Record; /** Total observations across all categories. */ totalObservations: number; /** Profile maturity based on observation depth. */ maturity: "embryonic" | "juvenile" | "adult" | "elder"; /** History of observation counts for drift detection. */ observationTimestamps: number[]; } /** Create an empty landscape for a genome. */ export declare function createLandscape(genomeHash: string): BehavioralLandscape; /** Update the landscape with a new observation. */ export declare function updateLandscape(landscape: BehavioralLandscape, signals: PhenotypicSignals, category: string, previousCategory?: string): void; /** * Match an observation against the landscape. * * Uses category-specific profile if available (>5 observations for that category). * Falls back to flat profile otherwise. */ export declare function matchLandscape(landscape: BehavioralLandscape, signals: PhenotypicSignals, category: string): LandscapeMatchResult; export interface LandscapeMatchResult { matchRatio: number; featureDeviations: Array<{ feature: string; zScore: number; }>; usedCategoryProfile: boolean; landscapeDepth: number; maturity: "embryonic" | "juvenile" | "adult" | "elder"; totalObservations: number; } /** * Compute drift velocity — rate of profile change over recent observations. * * Low drift = healthy. Sudden high drift = suspicious. * Measured as average absolute z-score of recent observations against the profile. */ export declare function computeDriftVelocity(landscape: BehavioralLandscape, recentResults: LandscapeMatchResult[], windowSize?: number): number; //# sourceMappingURL=landscape.d.ts.map