ISAC-Sim

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.space

Action and observation space definitions (Gymnasium-compatible)

Functions (6)

box

v1.0.0
(low: number[] | number, high: number[] | number, shape?: number[], dtype?: string) => BoxSpace

Create a continuous multi-dimensional box space.

core.space

discrete

v1.0.0
(n: number, labels?: string[]) => DiscreteSpace

Create a discrete space of size n with optional labels.

core.space

multiDiscrete

v1.0.0
(nvec: number[], labels?: string[][]) => MultiDiscreteSpace

Create a multi-discrete space.

core.space

dict

v1.0.0
(spaces: Record<string, Space>) => DictSpace

Create a dictionary of spaces.

core.space

tuple

v1.0.0
(spaces: Space[]) => TupleSpace

Create a tuple of spaces.

core.space

computeSchemaHash

v1.0.0
(space: Space) => string

Compute a unique hash for the space definition to ensure configuration consistency.

core.space

Types (1)

Space

type

Union type of all supported space definitions (Box | Discrete | MultiDiscrete | Dict | Tuple).

core.space

Objective

core.objective

Metric system for defining optimization goals and scalarization

Functions (4)

simpleMetric

v1.0.0
(id: string, fn: (state: S) => number, direction: OptimizationDirection) => MetricSpec

Create a simple metric from a state evaluation function.

core.objective

normalizeMetric

v1.0.0
(metric: MetricSpec, min: number, max: number) => MetricSpec

Wrap a metric to normalize its output to [0, 1].

core.objective

clampMetric

v1.0.0
(metric: MetricSpec, min: number, max: number) => MetricSpec

Wrap a metric to clamp its output within [min, max].

core.objective

combineMetricsWithTracking

v1.0.0
(metrics: MetricSpec[], method: CompositionMethod) => CompositeMetric

Combine multiple metrics into a single scalar objective while tracking individual components.

core.objective

Classes (1)

MetricRegistry

classv1.0.0

Registry for managing and listing standard metrics.

core.objective

Types (1)

MetricSpec

interface

Specification for a metric including its evaluation function and metadata.

core.objective

Constraint

core.constraint

Hard and soft constraint definitions for safe optimization

Functions (5)

leConstraint

v1.0.0
(id: string, fn: (s: S) => number, limit: number, severity: Severity) => ConstraintSpec

Create a "Less than or Equal" constraint (value <= limit).

core.constraint

geConstraint

v1.0.0
(id: string, fn: (s: S) => number, limit: number, severity: Severity) => ConstraintSpec

Create a "Greater than or Equal" constraint (value >= limit).

core.constraint

eqConstraint

v1.0.0
(id: string, fn: (s: S) => number, target: number, tol: number, severity: Severity) => ConstraintSpec

Create an equality constraint with tolerance (target - tol <= value <= target + tol).

core.constraint

evaluateConstraints

v1.0.0
(constraints: ConstraintSpec[], state: S) => ConstraintReport

Evaluate a list of constraints against a state and return a detailed report.

core.constraint

constraintsToPenalty

v1.0.0
(constraints: ConstraintSpec[], state: S) => number

Convert constraint violations into a scalar penalty value for optimization.

core.constraint

Types (1)

ConstraintSpec

interface

Specification for a constraint including evaluation logic and severity.

core.constraint

Runner

core.runner

Experiment execution engine

Functions (1)

createTaskConfig

v1.0.0
(config: Partial<TaskConfig>) => TaskConfig

Create a standardized, reproducible task configuration.

core.runner

Classes (1)

Runner

classv1.0.0

Main 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.runner

Types (2)

Environment<Obs, Act>

interface

Standard Gymnasium-style environment interface.

core.runner

Policy<Obs, Act>

interface

Interface for decision-making agents.

core.runner

Logging

core.logging

Structured logging and metric tracking

Classes (2)

ConsoleLogger

classv1.0.0

Logger that outputs structured JSON or human-readable text to the console.

core.logging

MemoryLogger

classv1.0.0

Logger that stores experiment history in memory for analysis or visualization.

core.logging

Types (1)

LogEntry

type

Union of StepLogEntry, EpisodeLogEntry, and ReportLogEntry.

core.logging

Reproducibility

core.repro

Tools for deterministic execution

Classes (1)

SeededRandom

classv1.0.0

Wrapper around seedrandom to provide reproducible RNG for experiments.

core.repro