API Reference

This section is the autogenerated reference for every exported symbol in Arborist. It is split into four pages by topic:

  • Genome TypesExprGenome, TreeGenome, GraphGenome, AntGenome, ADFGenome, GPProblem, migration support, and the per-genome primitives.
  • AlgorithmsGeneticProgramming, IslandModel, NSGAII, CMAES, MAPElites, speciation strategies, topologies, and the shared solve entry point.
  • Operators — mutation, crossover, and selection operators, including the LLM mutation operator and its prompt-enrichment sections.
  • Infrastructure — evaluators, novelty archive, structured run logs, checkpoint / resume, constant optimization, the AST sanitizer, and code-generation primitives.

Modules

ArboristModule
Arborist

A generic, extensible genetic programming framework for Julia, built on the Problem/Algorithm/Solve pattern. Provides first-class support for expression-tree genomes, composable genetic operators, and a clean extension interface for LLM-as-operator and alternative genome representations.

Quick start

using Arborist

problem   = GPProblem(evaluator, ExprGenome; function_set=fset, num_temps=4)
algorithm = GeneticProgramming(pop_size=100, generations=200, mutation_rate=0.3)
result    = solve(problem, algorithm; verbose=true)
source
Arborist.BenchmarksModule
Arborist.Benchmarks

Canonical genetic-programming and neuroevolution benchmark problems as reusable data generators. Every function returns a NamedTuple carrying the dataset (or environment callables), along with the fields a user needs to build an Arborist problem + evaluator: shape metadata, target-function descriptions, sensible success thresholds, and a human-readable name.

Generators are decoupled from evaluator choice. A user can feed Benchmarks.nguyen(1).X, Benchmarks.nguyen(1).y into a TreeFitnessEvaluator, an ExprGenome table evaluator, a NoveltySearchEvaluator wrapping the same target, or a custom behavior-fingerprinting evaluator. Likewise, control benchmarks return the raw (dynamics, reward, done, observe, initial_state, decode_action) tuple suitable for EpisodicEvaluator.

Coverage

  • Symbolic regression: nguyen(n) (Nguyen-1..10), keijzer(variant) (K-4, K-11), koza(name) (:quartic, :septic, :nonic), pagie() (Pagie-1).
  • Classification: iris() (Fisher's 3-class), two_spirals() (Lang–Witbrock 1989).
  • Boolean: multiplexer(address_bits), parity(n_bits).
  • Control (closed-loop): cartpole(), mountain_car(), acrobot(), double_pole(; markovian=true).
  • Sequence / memory: sequence_memory(length), sequence_recall(; delay).
  • Classic neuroevolution: xor_env() (truth table in GraphEvaluator-ready shape).

Usage sketch (symbolic regression)

using Arborist
using DynamicExpressions

prob = Arborist.Benchmarks.nguyen(1)
ops = OperatorEnum(binary_operators=[+, -, *, /],
                   unary_operators=[sin, cos, exp])
evaluator = TreeFitnessEvaluator(prob.X, prob.y, ops)
problem = GPProblem(evaluator, TreeGenome{Float32}; seed=42)
result = solve(problem, GeneticProgramming())

Usage sketch (control)

cp = Arborist.Benchmarks.cartpole()
evaluator = EpisodicEvaluator(
    cp.n_states, cp.n_actions,
    cp.initial_state, cp.dynamics,
    cp.reward, cp.done, cp.observe, cp.decode_action;
    max_steps=cp.max_steps, n_episodes=5,
)
source