cmaes
Lightweight Covariance Matrix Adaptation Evolution Strategy (CMA-ES) implementation for Python 3.
Decision gist · record as of 2026-08-14
Yes. Low install friction (numpy only), active maintenance, MIT license, no known vulnerabilities, and a focused implementation of a well-established algorithm make it a solid choice for derivative-free optimization. Install if you need CMA-ES specifically; if you're unsure whether CMA-ES is the right algorithm for your problem, verify that first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with only numpy as a runtime dependency.
- Active maintenance with recent releases; last commit 2026-08-07 and 515 repository stars indicate ongoing development.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without legal friction.
last release 2026-03-28 (139 days) · last repo commit 2026-08-07 · 515 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,335,688 downloads/mo, #4,034 on PyPI
Alternatives
Verify before relying
pip install cmaes
import numpy as np
from cmaes import CMA
optimizer = CMA(mean=np.zeros(2), sigma=1.3)
for generation in range(50):
solutions = []
for _ in range(optimizer.population_size):
x = optimizer.ask()
value = objective(x) # your function
solutions.append((x, value))
optimizer.tell(solutions)- Performance characteristics and convergence speed compared to other CMA-ES implementations or optimization libraries.
- Whether the library is suitable for high-dimensional problems (scalability limits not documented in excerpt).
- Integration requirements and compatibility with Optuna beyond the basic sampler example shown.
What it is and what it does
cmaes is a Python implementation of the Covariance Matrix Adaptation Evolution Strategy, a derivative-free optimization algorithm designed to minimize or maximize black-box objective functions. It uses an ask-and-tell interface where you request candidate solutions from the optimizer, evaluate them with your objective function, and report results back—making it suitable for expensive or noisy function evaluations where gradients are unavailable or unreliable.
The library supports multiple problem types: standard continuous optimization via the CMA class, mixed continuous-integer-categorical optimization via CatCMAwM, and multi-objective mixed-variable problems via COMOCatCMAwM. It depends only on numpy and integrates with Optuna for hyperparameter tuning workflows. The implementation is actively maintained and supports Python 3.9 through 3.14.
Use it for
- Hyperparameter tuning for machine learning models when gradient-based methods are impractical or unavailable.
- Optimizing expensive simulations or physical experiments where function evaluations are costly and noisy.
- Mixed-variable optimization combining continuous parameters, discrete choices, and categorical selections in a single problem.
- Multi-objective optimization balancing competing objectives in mixed-variable spaces.
- Black-box function optimization where the objective function is a complex pipeline or external tool.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction (numpy only), active maintenance, MIT license, no known vulnerabilities, and a focused implementation of a well-established algorithm make it a solid choice for derivative-free optimization. Install if you need CMA-ES specifically; if you're unsure whether CMA-ES is the right algorithm for your problem, verify that first.
Install
cmaes on PyPI
Before you install
Low friction: pure Python wheel with only numpy as a runtime dependency. Active maintenance with recent releases; last commit 2026-08-07 and 515 repository stars indicate ongoing development.
Requires Python 3.9 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without legal friction.
Quickstart
pip install cmaes
import numpy as np
from cmaes import CMA
optimizer = CMA(mean=np.zeros(2), sigma=1.3)
for generation in range(50):
solutions = []
for _ in range(optimizer.population_size):
x = optimizer.ask()
value = objective(x) # your function
solutions.append((x, value))
optimizer.tell(solutions)
Verify before relying
- Performance characteristics and convergence speed compared to other CMA-ES implementations or optimization libraries.
- Whether the library is suitable for high-dimensional problems (scalability limits not documented in excerpt).
- Integration requirements and compatibility with Optuna beyond the basic sampler example shown.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 139 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,335,688 / month, #4,034 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9 |
Evidence: cmaes-0.13.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “evolutionary strategy optimizer”
- cmaesProvides CMA-ES (Covariance Matrix Adaptation Evolution Strategy)…
- cmaCMA-ES is a derivative-free numerical optimization algorithm for…
- backtestingBacktesting.py lets you define and test trading strategies against…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also cma · pyswarms · deap · optuna · nevergrad · formulaic-contrasts · directsearch · paretoset · SALib · gekko