47namespace neograph::graph {
109 int expected_super_steps = 0;
121 bool correct =
false;
123 bool compiled =
false;
124 bool validated =
false;
125 bool executed =
false;
140 int offspring_per_gen = 20;
142 int survivors_per_gen = 5;
144 int max_generations = 10;
150 bool run_evaluation =
false;
160 int parent_index = -1;
174 int total_offspring = 0;
175 int compile_passed = 0;
179 int execute_passed = 0;
184 const json& seed_core,
NEOGRAPH_API export/import macro for shared-library builds.
MutationKind
Catalog of built-in mutation operators, returned by all_operators().
@ TOGGLE_BARRIER
Toggle a barrier on/off for a fan-in node (add or remove the barrier spec).
@ TOGGLE_CONDITIONAL_EDGE
Add or remove a conditional_edges entry on a node.
@ ADD_EDGE
Add a new edge from a node to another reachable node.
@ REMOVE_EDGE
Remove an existing plain edge.
NEOGRAPH_API Score evaluate(const json &core, const Task &task, const NodeContext &ctx)
Scorer function: compile-gate + run + compare against task.
std::function< MutationResult(const json &core, std::mt19937 &rng)> MutationOp
Mutation operator: deterministic function (input core + rng) → result.
NEOGRAPH_API std::vector< MutationOp > all_operators()
Return a vector of one operator per MutationKind.
NEOGRAPH_API EvolutionResult evolve(const json &seed_core, const Task &task, const EvolutionConfig &config=EvolutionConfig{})
Run the evolution loop.
JSON → declarative topology parsing and runtime node linking.
Graph engine type definitions: channels, edges, nodes, events, and control flow.
Parameters for one evolution generation.
Result of one evolution run.
Individual best
Best individual (lowest cost).
std::vector< Individual > population
All individuals across all generations (in birth order).
One individual in the population.
std::string mutation_description
Mutation that produced this individual.
Score score
Score from the most recent evaluation. Negative = not evaluated.
json core
Strict Core topology JSON (the canonical interchange lockfile).
Result of applying a single mutation.
std::string description
Human-readable description of what this mutation did (for logging and genealogy).
std::optional< json > core
The mutated core topology JSON.
Dependency injection context passed to nodes during construction.
Score of a single graph run against a task.
std::string summary
Human-readable summary.
A task is a fixed-input → expected-output contract that a compiled graph should satisfy.
json reference_core
The graph definition (core topology JSON) that solves this task.
json expected_output
Expected channel values after execution.
std::string name
Name of the task (for logging/reporting).
json input
Input state to feed into the graph.
Static semantic analysis over declarative or compiled topology.