pymoo
Python framework for single- and multi-objective optimization with evolutionary algorithms. Define vectorized objectives and constraints; solve with NSGA-II, NSGA-III, MOEA/D, GAs, or differential evolution. Analyze Pareto fronts, visualize trade-offs, customize operators and callbacks. For engineering design, hyperparameter search, and conflicting objectives. Alternatives: scipy.optimize (single-objective, gradient), platypus, jMetalPy (Java).
npx skills add BioTender-max/awesome-bio-agent-skills --skill pymoo --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
The skill provides a unified API for defining optimization problems (vectorized or elementwise), selecting algorithms (NSGA-II, NSGA-III, MOEA/D, GA, DE, and more), configuring crossover and mutation operators, setting termination criteria, and performing result analysis and Pareto-front visualization. It includes modules for problem definition, algorithm selection, operators, termination, result handling, and visualization, along with common workflows and practical examples.
How it works
- Problem Definition: Subclass Problem or ElementwiseProblem to specify n_var, n_obj, and optional n_ieq_constr; implement _evaluate to compute F (objectives) and optionally G (constraints).
- Algorithm Selection: Instantiate algorithms such as NSGA2, NSGA3, MOEAD, GA, or DE, with pop_size and other configuration (e.g., ref_dirs for NSGA-III).
- Operators: Choose and configure crossover and mutation operators (e.g., SBX, PM, TwoPointCrossover, BitflipMutation) and sampling methods (FloatRandomSampling, BinaryRandomSampling) to suit variable types.
- Termination: Use get_termination to set fixed generation/evaluation limits or DefaultMultiObjectiveTermination for convergence-based stopping.
- Result Handling: Use minimize(problem, algorithm, ("n_gen", value), ...) to obtain res with F (objective values), X (decision variables), and potentially G (constraints); supports feasibility checks and indicators like HV or IGD.
- Visualization: Provide plots (Scatter, PCP) and matplotlib-based plots to visualize Pareto fronts and design spaces.
When to use it
- Optimizing designs with two or more conflicting objectives.
- Running evolutionary algorithms as black-box optimizers when gradients are unavailable.
- Performing multi-objective hyperparameter search for ML models with trade-offs.
- Computing Pareto fronts for portfolio optimization or multi-criteria decision analysis.
- Customizing crossover/mutation operators for domain-specific encodings.
- Benchmarking optimization algorithms on standard test problems (ZDT, DTLZ, CTP).
- Use scipy.optimize for single-objective, gradient-based optimization when applicable.
What it can touch
- Prerequisites: Python packages pymoo, numpy, matplotlib.
- Uses modules and classes such as Problem, ElementwiseProblem, NSGA2, NSGA3, MOEAD, GA, DE, SBX, PM, TwoPointCrossover, BitflipMutation, FloatRandomSampling, BinaryRandomSampling, and sampling/termination utilities.
- Requires problem definitions and objective/constraint functions provided by the user; results accessed via res.F, res.X, and res.G.
Caveats
- License stated as Apache-2.0 in the skill description.
- Environment notes indicate CPU suffices for most problems; GPU not used by core.
- Constraint handling prefers feasibility first, then objective optimization; infeasible solutions are penalized but retained.
- Hypervolume and IGD indicators require proper normalization of objectives for meaningful comparisons.
# pymoo ## Overview pymoo provides a unified API for multi-objective optimization via population-based evolutionary algorithms. Users define a problem by subclassing `Problem` or `ElementwiseProblem`, specifying objectives (`n_obj`), decision variables (`n_var`), and optional constraints (`n_ieq_constr`). Algorithms like NSGA-II and NSGA-III return a `Result` object containing the Pareto-optimal population, objective values, and decision variable values. pymoo separates problem definition, algorithm configuration, operator selection, and analysis — each component is independently replaceable. ## When to Use - Optimizing a design with two or more conflicting objectives (e.g., minimizing cost while maximizing performance) - Running evolutionary algorithms (GA, DE, PSO) as black-box optimizers when gradients are unavailable - Performing multi-objective hyperparameter search for ML models where accuracy and inference time trade off - Computing Pareto fronts for portfolio optimization or multi-criteria decision analysis - Customizing crossover/mutation operators for domain-specific solution encodings (binary, permutation, real-valued) - Benchmarking optimization algorithms on standard t
- Overview
- When to Use
- Prerequisites
- Quick Start
- Core API
- Module 1: Problem Definition
- Module 2: Algorithm Selection
- Module 3: Operators (Crossover & Mutation)
- Module 4: Termination Criteria
- Module 5: Result Analysis and Pareto Front
- Module 6: Visualization
- Key Concepts
- Pareto Dominance
- Constraint Handling
pip install pymoo numpy matplotlib
What does the pymoo skill do?
Python framework for single- and multi-objective optimization with evolutionary algorithms. Define vectorized objectives and constraints; solve with NSGA-II, NSGA-III, MOEA/D, GAs, or differential evolution. Analyze Pareto fronts, visualize trade-offs, customize operators and callbacks. For engineering design, hyperparameter search, and conflicting objectives. Alternatives: scipy.optimize (single-objective, gradient), platypus, jMetalPy (Java).
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill pymoo --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
