cmaes-optimizer

Runs CMA-ES black-box optimization with recorded parameters, stop rules, and convergence traces.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/JYeswak/grok_bot_playground --skill cmaes-optimizer-jyeswak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cmaes-optimizer
Source: https://github.com/JYeswak/grok_bot_playground/tree/main/plugin/skills/cmaes-optimizer
Command: npx skills add https://github.com/JYeswak/grok_bot_playground --skill cmaes-optimizer-jyeswak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Tuning hyperparameters or calibrating simulators often means optimizing a function you can only evaluate, with no usable gradients, and ad-hoc runs produce results nobody can reproduce or compare. This Skill runs covariance matrix adaptation evolution strategy (CMA-ES) optimization with explicit parameters, declared stop rules, and a full convergence trace so every result is evidence rather than anecdote. ## Core Features & Use Cases - Reproducible run records: Every run logs the objective characterization, initial mean and sigma, population size, seed, stop-rule set, and noise handling before evaluating. - Disciplined stop rules and restarts: Runs terminate only on declared conditions (evaluation budget, target fitness, stall limit, sigma floor, wall clock), and restarts with doubled population happen only when declared up front. - Fair benchmark comparisons: Compare optimizers on sphere, Rosenbrock, Rastrigin, or Ackley functions only under equal evaluation budgets and identical starting regions. - Use Case: A researcher tuning six hyperparameters of an expensive simulation declares a 2,000-evaluation budget and seed, runs CMA-ES, and receives the best point, the stop rule that fired, and a monotone-checked convergence trace a colleague can re-run to verify. ## Quick Start Ask the assistant to minimize your objective function with CMA-ES using a declared evaluation budget, seed, and bounds, and to return the convergence trace and stop rule that fired.

Frequently Asked Questions about cmaes-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize a function that has no gradients?

Use a derivative-free method like CMA-ES, which samples a population of candidates around a mean, ranks them by objective value, and adapts the mean, step size, and covariance each generation. You only need to evaluate the function, never differentiate it.

When should I use CMA-ES for hyperparameter tuning?

Use CMA-ES when the objective is expensive, noisy, or non-differentiable and the dimension is moderate. Avoid it for gradient-friendly problems where first-order methods are cheaper, or for multi-objective problems unless you scalarize first and state the scalarization.

How do I handle a noisy objective function in CMA-ES?

Declare the noise handling before the run, either fixed-seed averaging or an explicit re-evaluation count per candidate. Unseeded runs are treated as exploratory only and labeled as such in the output.

What stop rules should a CMA-ES run declare?

Declare at least a maximum evaluation count, plus any of target fitness, function-tolerance stall limit, step-size floor, or wall-clock limit. A run that ends for any other reason is labeled interrupted, never converged.

Why is my CMA-ES benchmark comparison invalid?

Comparisons are invalid when contenders use different evaluation budgets or different starting regions. Equal budgets and identical starting regions are required; unequal budgets must be reported as separate runs, never head-to-head.