Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jaechang-hits/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).
Passed 23 of 23 test cases with the skill, and 16 of 23 without it.
and 7 more in the full report
7 fixed16 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
I want to track how fast my optimization run converges to the Pareto front across iterations. Please provide a Python script using pymoo that implements a custom callback to record the hypervolume indicator at each generation against a given reference point, and then generates a line plot demonstrating the hypervolume progress over generations.
| Checked | Without skill | With skill |
|---|---|---|
| Imports the hypervolume indicator class as HV from pymoo.indicators.hv | Missed | Passed |
| Evaluates hypervolume by calling the hypervolume indicator instance directly with objective values rather than invoking a .do() method | Missed | Passed |
| Imports NSGA-II from the module path pymoo.algorithms.moo.nsga2 rather than pymoo.algorithms.moo.nsgaii | Passed | Passed |
The instructions your model reads when the skill loads.
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.
scipy.optimize instead for single-objective, gradient-available, smooth optimizationpymoo, numpy, matplotlibpip install pymoo numpy matplotlib
import numpy as np
from pymoo.core.problem import Problem
from pymoo.algorithms.moo.nsga2 import NSGA2
from pymoo.optimize import minimize
class SimpleBiObjective(Problem):
def __init__(self):
super().__init__(n_var=2, n_obj=2, xl=np.array([-2, -2]), xu=np.array([2, 2]))
def _evaluate(self, X, out, *args, **kwargs):
f1 = X[:, 0] ** 2 + X[:, 1] ** 2
test cases passed, vs 16 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.