Core
Core framework providing experiment infrastructure including space definition, objective/constraint systems, experiment runner, logging, reproducibility, and error handling.
import { core } from 'symbion'Sub-modules
Space
core.spaceAction and observation space definitions (Gymnasium-compatible)
Functions (6)
box
v1.0.0(low: number[] | number, high: number[] | number, shape?: number[], dtype?: string) => BoxSpaceCreate a continuous multi-dimensional box space.
core.spacediscrete
v1.0.0(n: number, labels?: string[]) => DiscreteSpaceCreate a discrete space of size n with optional labels.
core.spacemultiDiscrete
v1.0.0(nvec: number[], labels?: string[][]) => MultiDiscreteSpaceCreate a multi-discrete space.
core.spacedict
v1.0.0(spaces: Record<string, Space>) => DictSpaceCreate a dictionary of spaces.
core.spacetuple
v1.0.0(spaces: Space[]) => TupleSpaceCreate a tuple of spaces.
core.spacecomputeSchemaHash
v1.0.0(space: Space) => stringCompute a unique hash for the space definition to ensure configuration consistency.
core.spaceTypes (1)
Space
typeUnion type of all supported space definitions (Box | Discrete | MultiDiscrete | Dict | Tuple).
core.spaceObjective
core.objectiveMetric system for defining optimization goals and scalarization
Functions (4)
simpleMetric
v1.0.0(id: string, fn: (state: S) => number, direction: OptimizationDirection) => MetricSpecCreate a simple metric from a state evaluation function.
core.objectivenormalizeMetric
v1.0.0(metric: MetricSpec, min: number, max: number) => MetricSpecWrap a metric to normalize its output to [0, 1].
core.objectiveclampMetric
v1.0.0(metric: MetricSpec, min: number, max: number) => MetricSpecWrap a metric to clamp its output within [min, max].
core.objectivecombineMetricsWithTracking
v1.0.0(metrics: MetricSpec[], method: CompositionMethod) => CompositeMetricCombine multiple metrics into a single scalar objective while tracking individual components.
core.objectiveClasses (1)
MetricRegistry
classv1.0.0Registry for managing and listing standard metrics.
core.objectiveTypes (1)
MetricSpec
interfaceSpecification for a metric including its evaluation function and metadata.
core.objectiveConstraint
core.constraintHard and soft constraint definitions for safe optimization
Functions (5)
leConstraint
v1.0.0(id: string, fn: (s: S) => number, limit: number, severity: Severity) => ConstraintSpecCreate a "Less than or Equal" constraint (value <= limit).
core.constraintgeConstraint
v1.0.0(id: string, fn: (s: S) => number, limit: number, severity: Severity) => ConstraintSpecCreate a "Greater than or Equal" constraint (value >= limit).
core.constrainteqConstraint
v1.0.0(id: string, fn: (s: S) => number, target: number, tol: number, severity: Severity) => ConstraintSpecCreate an equality constraint with tolerance (target - tol <= value <= target + tol).
core.constraintevaluateConstraints
v1.0.0(constraints: ConstraintSpec[], state: S) => ConstraintReportEvaluate a list of constraints against a state and return a detailed report.
core.constraintconstraintsToPenalty
v1.0.0(constraints: ConstraintSpec[], state: S) => numberConvert constraint violations into a scalar penalty value for optimization.
core.constraintTypes (1)
ConstraintSpec
interfaceSpecification for a constraint including evaluation logic and severity.
core.constraintRunner
core.runnerExperiment execution engine
Functions (1)
createTaskConfig
v1.0.0(config: Partial<TaskConfig>) => TaskConfigCreate a standardized, reproducible task configuration.
core.runnerClasses (1)
Runner
classv1.0.0Main experiment runner class that manages the interaction between Environment, Policy, and Loggers.
Constructor
new Runner(config: RunnerConfig)Methods
run(): Promise<ExperimentResult>▶runEpisode(episodeIdx: number): Promise<EpisodeResult>▶step(): Promise<StepResult>▶core.runnerTypes (2)
Environment<Obs, Act>
interfaceStandard Gymnasium-style environment interface.
core.runnerPolicy<Obs, Act>
interfaceInterface for decision-making agents.
core.runnerLogging
core.loggingStructured logging and metric tracking
Classes (2)
ConsoleLogger
classv1.0.0Logger that outputs structured JSON or human-readable text to the console.
core.loggingMemoryLogger
classv1.0.0Logger that stores experiment history in memory for analysis or visualization.
core.loggingTypes (1)
LogEntry
typeUnion of StepLogEntry, EpisodeLogEntry, and ReportLogEntry.
core.loggingReproducibility
core.reproTools for deterministic execution
Classes (1)
SeededRandom
classv1.0.0Wrapper around seedrandom to provide reproducible RNG for experiments.
core.repro