CMA-ES/pycma
Python implementation of CMA-ES
pycma
What it is: A Python package that implements the CMA-ES optimization algorithm and related numerical optimization tools.
What CMA-ES does: CMA-ES (Covariance Matrix Adaptation Evolution Strategy) is a randomized, derivative‑free method for solving difficult optimization problems—those that are non‑convex, ill‑conditioned, multi‑modal, rugged, or noisy. It works in continuous and mixed‑integer search spaces, meaning it can handle problems where some variables must be integers.
Key capabilities (from the README):
- Handles bound constraints (limits on variable values) via options or a wrapper.
- Handles linear and nonlinear constraints through dedicated functions.
- Handles noise in function evaluations.
- Supports integer variables for mixed‑integer problems.
Installation:
- Latest release from PyPI:
python -m pip install cma - From GitHub (e.g., development branch):
pip install git+https://github.com/CMA-ES/pycma.git@development
Documentation and resources:
- Quick start guide and usage examples on PyPI.
- Jupyter notebooks covering basic use, constraints, the ask‑and‑tell interface, and noise handling.
- API documentation at cma-es.github.io/apidocs-pycma.
- Practical hints and FAQs are also linked.
Development status: The project is actively maintained, with a long version history (e.g., releases 4.6.0, 4.5.0, 4.4.x) that add features like dynamic learning rates, improved constraints handling, and better plotting. It is open‑source and citable via a DOI (10.5281/zenodo.2559634).
Related
- Project
- Project
- Project
- Project
- Project