CMA-ES/pycma

Python implementation of CMA-ES

What it solves

pycma is a Python implementation of the Covariance Matrix Adaptation Evolution Strategy (CMA-ES), a randomized, derivative-free numerical optimization algorithm. It is designed to solve difficult optimization problems that are non-convex, ill-conditioned, multi-modal, rugged, or noisy, across both continuous and mixed-integer search spaces.

How it works

The library provides tools to find the optimal solution for a given objective function without requiring gradient information. It handles several complex real-world constraints:

  • Bound Constraints: Managed via the bounds option or a dedicated BoundDomainTransform wrapper.
  • Linear and Nonlinear Constraints: Handled through specific arguments in the fmin2 or fmin_con2 functions.
  • Noise: Managed via a noise_handler to maintain stability in noisy environments.
  • Mixed-Integer Problems: Supports integer variables through an integer_variables index list.

Who it’s for

It is intended for researchers and engineers who need to optimize complex mathematical functions where traditional gradient-based methods fail or where the objective function is a "black box."

Highlights

  • Derivative-Free: Does not require gradients, making it suitable for rugged or noisy landscapes.
  • Mixed-Integer Support: Can optimize across both continuous and integer variables simultaneously.
  • Constraint Handling: Built-in support for bound, linear, and nonlinear constraints.
  • Flexible Interface: Offers both a high-level fmin interface and a lower-level ask-and-tell interface for custom control.
  • Parallelization: Supports parallel execution via the n_jobs parameter in the OOOptimizer.

Related

  • Project
  • Project
  • Project
  • Project
  • Project