Skip to content

quale inspect

Loads a checkpoint file and prints the best genome’s topology. Optionally performs pathway analysis showing which sensors influence each actuator.

quale inspect is how you look inside an evolved brain to understand what emerged. After a run completes, it tells you which neurons exist, how they are connected, and - with --pathways - which sensors actually influence each actuator. This is where you find out whether the agent evolved the behavior you intended or found some other strategy entirely.

quale inspect <checkpoint-file> [flags]
ArgumentDescription
<checkpoint-file>Path to a .quale-ckpt checkpoint file
FlagDefaultDescription
--pathwaysfalseShow sensor-to-actuator pathway analysis using reverse BFS

Without --pathways:

=== Checkpoint: Generation 500 ===
Population size: 200
=== Best Genome ===
ID: a1b2c3d4
Fitness: 42.50
Generation: 498
Nodes: 18 total (14 input, 2 hidden, 2 output)
Connections: 12 total (10 enabled, 2 disabled)
Sensors: [signal_aspect distance_to_signal current_speed ...]
Actuators: [throttle brake emergency_brake acknowledge_aws attention]

With --pathways:

--- Hidden Nodes ---
Node 16: activation=Sigmoid bias=0.3421
Node 17: activation=ReLU bias=-0.1234
--- Enabled Connections ---
IN:signal_aspect(0) -> H(16) weight=0.8234 inn=42
H(16) -> OUT:throttle(14) weight=1.2345 inn=56
--- Output Node Biases ---
throttle: bias=0.1234
brake: bias=-0.5678
--- Pathway Analysis ---
Sensors that influence each actuator (direct + indirect paths):
throttle: current_speed, signal_aspect, speed_limit
brake: braking_distance, signal_aspect
emergency_brake: no connected sensors (output driven by bias only)
Terminal window
-- Basic topology inspection
quale inspect checkpoints/signalcompliance/checkpoint_gen500.quale-ckpt
-- Full pathway analysis
quale inspect checkpoints/signalcompliance/checkpoint_gen500.quale-ckpt --pathways

Runs a single scenario with replay recording and outputs tick-by-tick brain activity as JSON to stdout. The replay captures sensor inputs, actuator outputs, and every node’s activation value at each step.

Requires a .quale project file (--quale) to configure the GenericDomain for the scenario.

quale replay <checkpoint-or-brain> --quale <file> [--seed <N>] [--ticks <N>]
ArgumentDescription
<checkpoint-or-brain>Path to a .quale-ckpt or .quale-brain file containing the genome to replay
FlagDefaultDescription
--quale <file>(required)Path to the .quale project file that defines the simulation
--seed <N>42Random seed for the scenario
--ticks <N>300Maximum simulation ticks
Terminal window
-- Replay best brain from a checkpoint
quale replay checkpoints/signalcompliance/best.quale-brain \
--quale rail-driver.quale --ticks 66000
-- Replay with a specific seed
quale replay checkpoints/signalcompliance/checkpoint_gen500.quale-ckpt \
--quale rail-driver.quale --seed 123 --ticks 1000

Extracts or converts brain data from checkpoint or brain files. Supports three output modes: saving as a .quale-brain file, printing as JSON, or displaying a human-readable summary.

quale export <file> [--brain <path>] [--json]
FlagDescription
--brain <path>Save/convert to a .quale-brain file at the given path
--jsonPrint brain topology as JSON to stdout

When no flags are given, prints a summary of the brain’s fitness, topology, and sensor/actuator names.

Terminal window
-- Print brain summary
quale export checkpoints/signalcompliance/best.quale-brain
-- Export checkpoint's best genome as a brain file
quale export checkpoints/signalcompliance/checkpoint_gen500.quale-ckpt --brain extracted.quale-brain
-- Export as JSON for external tooling
quale export checkpoints/signalcompliance/best.quale-brain --json