Methods

A method is an LLM-driven algorithm design strategy: it asks an LLM for algorithms, evaluates them on a problem and uses the results to ask for better ones. BLADE has nine built-in methods. All of them get the same LLM, the same problems and the same evaluation budget, so they can be compared fairly.

Method

YAML type

Idea

Reference

LLaMEA

llamea

Evolutionary algorithm over code: parents are refined or combined by the LLM with configurable mutation and crossover prompts.

code, paper

EoH

eoh

Evolution of Heuristics: evolves a “thought” and its code together, with exploration and modification prompts.

code, paper

ReEvo

reevo

Reflective evolution: short- and long-term reflections on pairs of solutions guide crossover and mutation.

code, paper

FunSearch

funsearch

Islands of programs clustered by score; best-shot prompts show earlier versions and ask for the next one. Reimplemented in BLADE.

code, paper

ShinkaEvolve

shinka_evolve

Sample-efficient program evolution: islands, weighted parent selection, diff, full and crossover patches, novelty rejection and an LLM bandit. Reimplemented in BLADE.

code, paper

LHNS

lhns

LLM-driven heuristic neighbourhood search: destroy and repair parts of the best code, accepted by simulated annealing.

code, paper

MCTS-AHD

mcts_ahd

Monte Carlo tree search over algorithms, so that weaker branches can still be explored.

code, paper

MoEH

moeh

Multi-objective evolution of heuristics: a Pareto front of algorithms over several objectives.

paper

Random search

random_search

Asks the LLM for independent algorithms, without feedback. The baseline every method should beat.

EoH, ReEvo and MoEH need the optional methods dependency group (uv sync --group methods); uv run iohblade list methods shows this too. LLaMEA’s feature_guided_mutation needs xgboost, from the feature-guidance group (uv sync --group feature-guidance).

Using a method

In an experiment file, a method names its type, the LLM(s) it uses and optionally its own params and budget:

methods:
  - type: llamea
    name: "LLaMEA-{llm}"          # {llm} is replaced by the LLM name
    llm: [qwen, gemini]           # one method per LLM
    params: {n_parents: 4, n_offspring: 12, elitism: true}
  - type: funsearch
    llm: qwen
    params: {num_islands: 10}
  - type: random_search
    llm: qwen

params are checked against the method’s constructor, so a misspelled parameter is reported by iohblade validate. The parameters of each method are listed in the API reference; LLaMEA’s operators are described in Experiments from YAML.

Comparing fairly

  • Budget. budget is the number of generated algorithms a run may evaluate. Every method uses experiment.budget unless it sets its own; keep it the same for a comparison. Evaluations beyond the budget return a failure score.

  • Seeds. Use several runs (runs or seeds): LLM-driven search is noisy, and one run says little.

  • Same LLM. Compare methods with the same LLM, or compare LLMs with the same method, not both at once.

  • Baseline. Include random_search. A method that does not beat it with the same budget is not using the feedback.

Your own method

Any subclass of iohblade.method.Method can be used with type: custom; see Tutorial: your own search method.