Skip to content

Introduction

DEAP-ER is a typed evolutionary-algorithm toolbox for Python 3.12 and newer. Register operators, run an algorithm. The published API is what this documentation describes: genetic algorithms and mixed encodings, tree and columnar GP (including memetic and semantic search helpers and a private Push policy loop), CMA (boxed, separable, restarting, and MO-CMA), multi-objective and quality-diversity search, case-structured selection, co-evolution and island stepping, parallel evaluation, records and checkpoints, and common benchmarks.

The library started as a rewrite of DEAP. The toolbox model is the same; it is not a drop-in rename. Function names, parameter order, and a few contracts changed. The differences page is the migration note and the inventory of work that accumulated on top of the original toolbox. A first complete program is on Getting started. Timed hot paths versus DEAP are on the performance page. Planned library work is on the roadmap.

Capabilities

  • Genetic algorithms on ordinary Python containers (list, array, set, dict, tree, NumPy array, and similar), including mixed encodings and differential-evolution variation
  • Genetic programming: prefix trees (loosely typed, strongly typed, ADFs), SlimGP, columnar programs over named float64 columns with vectorized, causal-window, tape / Numba backends (population tape CSE), and a private Push GP policy loop that evolves the search around those tapes
  • Program-search helpers: growing language, semantic descriptors, memetic ephemeral tuning, and Keijzer affine scaling
  • Evolution strategies: CMA, boxed CMA, separable CMA, IPOP/BIPOP restarts, and MO-CMA
  • Multi-objective search (SPEA-II, NSGA-II, NSGA-III, SMS-EMOA, MOEA/D, AGE-MOEA-II) with optional constraint-dominance on NSGA-II
  • Quality-diversity search (MAP-Elites: grid, CVT, and unstructured archives; novelty selection and iso+line variation)
  • Case-structured selection (lexicase, ε-lexicase with dynamic filter modes, batch ε-lexicase, case-subset tournament, structural meta-case regularization, informed down-sampling and generation schedules, program teams, co-evolving case exams, held-out generalization, and noisy fitness resample / F-Race stop)
  • Cooperative and competitive co-evolution, plus heterogeneous island stepping (step_islands, ring / fully connected / random migration, island_eval_keys)
  • Parallel evaluation with multiprocessing or with Ray, plus spawned RNG streams
  • Statistics, hall of fame (JSON round-trip), evaluation cache and budget, and a NetworkX-compatible genealogy
  • Checkpoints that persist a run to disk (hof as JSON when hof_ind_cls= is set)
  • Benchmarks against common test functions
  • Worked examples of symbolic regression, particle swarm, differential evolution, MAP-Elites, mixed encoding, lexicase, columnar GP, and CMA (boxed, separable, restarting)