Extend from another project
Use the project template when your node or task belongs outside the BrainlessLab package. The template demonstrates Julia dispatch, registration, one diagnostic run, and one typed profile plan.
Copy and install the template
Copy examples/templates/new_project/ to your project. From the copied directory, install
BrainlessLab from GitHub:
julia --project=. -e 'using PkgPkg.add(url="https://github.com/btgaskin/brainless-lab")Pkg.instantiate()'While the template remains inside this repository, use
Pkg.develop(path="../../..") instead.
Run the worked extension
julia --project=. run.jl --ticks 300 --seed 1 --n-nodes 80julia --project=. run_plan.jl config.toml recordsThe first command runs one composition and saves a figure. The second writes a standard profile record.
Replace the worked parts
Edit one boundary at a time:
my_node.jldefines reservoir state, methods, parameters, and aNodeSpec.my_task.jldefines observations, actions, metrics, anchors, and aTaskSpec.my_metric.jlregisters an optional reusable metric.config.tomldefines repeated evaluation without adding another runner.
Import a BrainlessLab generic before adding a Julia method to it. Keep runtime state out of the parameter genome. Match body port widths before tick zero.
The template proves that the extension loads and runs. It does not validate the scientific meaning of a new task or node.
Source: examples/templates/new_project/.