Skip to content

Run your first simulation

This tutorial runs one diagnostic simulation. It does not create a research record or an uncertainty estimate.

Install the repository

BrainlessLab requires Julia 1.11 or later.

Terminal window
git clone https://github.com/btgaskin/brainless-lab.git
cd brainless-lab
julia --project=. -e 'using Pkg; Pkg.instantiate()'

Run Tracking

Terminal window
julia --project=. -e '
using BrainlessLab
sim = simulate(:tracking; node=:falandays, ticks=2_000, seed=26)
println(task_outcome(sim))
'

simulate creates a Falandays reservoir, couples it to the Tracking task, and runs one closed loop. It returns a SimResult in memory.

Check the result

task_outcome(sim) identifies the task’s declared outcome. A scored result contains:

  • key, the task outcome name;
  • raw, the task-native value;
  • normalized, the value relative to that task’s declared anchors;
  • normalized_bound, whether anchor normalisation was clipped at :floor or :ceiling, or remained within bounds as :none;
  • window, the number of ticks actually scored.

Tracking declares minimum_scored_ticks = 2000, so a shorter run is rejected rather than scored over an interval too small to mean anything. Pass an explicit window to acknowledge a deliberately short diagnostic run.

The command succeeds when Julia prints an outcome without an exception. One run can reveal a setup problem or an interesting trajectory. It cannot establish typical performance.

Next, create a reproducible profile when you need repeated trials and a portable record.

Source: src/api/Highlevel.jl, src/tasks/Tasks.jl.