Source profileQuality 88/100Review permissions

K-Dense-AI/scientific-agent-skills/skills/pymoo/SKILL.md

pymoo

Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.

Source repository stars
31,966
Declared platforms
0
Static risk flags
1
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.

Best for

  • Solving optimization problems with one or multiple objectives
  • Finding Pareto-optimal solutions and analyzing trade-offs
  • Implementing evolutionary algorithms (GA, DE, PSO, NSGA-II/III)

Not for

  • Common issues and solutions:
  • Best practices:

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill "skills/pymoo"
Safe inspection promptEditorial

Inspect the Agent Skill "pymoo" from https://github.com/K-Dense-AI/scientific-agent-skills/blob/e7ac42510774624f327003c95b6650e2883bc01d/skills/pymoo/SKILL.md at commit e7ac42510774624f327003c95b6650e2883bc01d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Quick Start Workflows

    Nine runnable workflows are in references/quickstartworkflows.md:

    Nine runnable workflows are in references/quickstartworkflows.md:
  2. 02

    Installation

    For reproducible environments, pin a version: uv pip install "pymoo==0.6.1.6".

    For reproducible environments, pin a version: uv pip install "pymoo==0.6.1.6".Dependencies: NumPy (2.x compatible since 0.6.1.3), SciPy, matplotlib (visualization). Autograd is optional for gradient-based features (since 0.6.1.3).Documentation: https://pymoo.org/ — LLM-friendly index: https://pymoo.org/llms.txt
  3. 03

    When to Use This Skill

    This skill should be used when: - Solving optimization problems with one or multiple objectives - Finding Pareto-optimal solutions and analyzing trade-offs - Implementing evolutionary algorithms (GA, DE, PSO, NSGA-II/III) - Working with constrained optimization problems - Benchm…

    Solving optimization problems with one or multiple objectivesFinding Pareto-optimal solutions and analyzing trade-offsImplementing evolutionary algorithms (GA, DE, PSO, NSGA-II/III)
  4. 04

    Core Concepts

    Pymoo uses a consistent minimize() function for all optimization tasks:

    result.X: Decision variables of optimal solution(s)result.F: Objective values of optimal solution(s)result.G: Constraint violations (if constrained)
  5. 05

    The Unified Interface

    Pymoo uses a consistent minimize() function for all optimization tasks:

    result.X: Decision variables of optimal solution(s)result.F: Objective values of optimal solution(s)result.G: Constraint violations (if constrained)

Permission review

Static risk signals and limitations

Runs scripts

medium · line 250

The documentation asks the agent to run terminal commands or scripts.

python3 scripts/single_objective_example.py

Runs scripts

medium · line 251

The documentation asks the agent to run terminal commands or scripts.

python3 scripts/multi_objective_example.py

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score88/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars31,966SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
K-Dense-AI/scientific-agent-skills
Skill path
skills/pymoo/SKILL.md
Commit
e7ac42510774624f327003c95b6650e2883bc01d
License
MIT
Collected
2026-07-28
Default branch
main
View the original SKILL.md

Pymoo - Multi-Objective Optimization in Python

Overview

Pymoo is a comprehensive Python framework for optimization with emphasis on multi-objective problems. Solve single and multi-objective optimization using state-of-the-art algorithms (NSGA-II/III, MOEA/D, SPEA2), benchmark problems (ZDT, DTLZ), customizable genetic operators, and multi-criteria decision making methods. Excels at finding trade-off solutions (Pareto fronts) for problems with conflicting objectives. Current stable release: pymoo 0.6.1.6 (November 2025).

Installation

uv pip install pymoo

For reproducible environments, pin a version: uv pip install "pymoo==0.6.1.6".

Dependencies: NumPy (2.x compatible since 0.6.1.3), SciPy, matplotlib (visualization). Autograd is optional for gradient-based features (since 0.6.1.3).

Documentation: https://pymoo.org/ — LLM-friendly index: https://pymoo.org/llms.txt

When to Use This Skill

This skill should be used when:

  • Solving optimization problems with one or multiple objectives
  • Finding Pareto-optimal solutions and analyzing trade-offs
  • Implementing evolutionary algorithms (GA, DE, PSO, NSGA-II/III)
  • Working with constrained optimization problems
  • Benchmarking algorithms on standard test problems (ZDT, DTLZ, WFG)
  • Customizing genetic operators (crossover, mutation, selection)
  • Visualizing high-dimensional optimization results
  • Making decisions from multiple competing solutions
  • Handling binary, discrete, continuous, or mixed-variable problems

Core Concepts

The Unified Interface

Pymoo uses a consistent minimize() function for all optimization tasks:

from pymoo.optimize import minimize

result = minimize(
    problem,        # What to optimize
    algorithm,      # How to optimize
    termination,    # When to stop
    seed=1,
    verbose=True
)

Result object contains:

  • result.X: Decision variables of optimal solution(s)
  • result.F: Objective values of optimal solution(s)
  • result.G: Constraint violations (if constrained)
  • result.algorithm: Algorithm object with history

Problem Definition Styles

Pymoo supports three problem definition styles:

  • Problem: Vectorized — _evaluate receives a batch of solutions (matrix)
  • ElementwiseProblem: One solution per call — recommended for custom problems and parallel evaluation
  • FunctionalProblem: Define objectives and constraints as separate functions without subclassing

Problem Types

Single-objective: One objective to minimize/maximize Multi-objective: 2-3 conflicting objectives → Pareto front Many-objective: 4+ objectives → High-dimensional Pareto front Constrained: Objectives + inequality/equality constraints Mixed-variable: Continuous, integer, binary, and categorical variables in one problem Dynamic: Time-varying objectives or constraints

Quick Start Workflows

Nine runnable workflows are in references/quick_start_workflows.md:

#WorkflowUse when
1Single-objective optimizationone objective, GA or DE
2Multi-objective (2-3 objectives)NSGA-II and a Pareto front
3Many-objective (4+ objectives)NSGA-III or reference-direction methods
4Custom problem definitionsubclassing Problem / ElementwiseProblem
5Constraint handlinginequality and equality constraints
6Decision making from a Pareto frontscalarization and MCDM selection
7Visualizationscatter, PCP, radviz, and heatmap views
8Parallel evaluationthreads, processes, or Dask for expensive objectives
9Mixed-variable optimizationinteger, binary, and categorical variables

Algorithm Selection Guide

Single-Objective Problems

AlgorithmBest ForKey Features
GAGeneral-purposeFlexible, customizable operators
DEContinuous optimizationGood global search
PSOSmooth landscapesFast convergence
CMA-ESDifficult/noisy problemsSelf-adapting

Multi-Objective Problems (2-3 objectives)

AlgorithmBest ForKey Features
NSGA-IIStandard benchmarkFast, reliable, well-tested
SPEA2Archive-based MOOStrength-based fitness, external archive
R-NSGA-IIPreference regionsReference point guidance
MOEA/DDecomposable problemsScalarization approach

Many-Objective Problems (4+ objectives)

AlgorithmBest ForKey Features
NSGA-III4-15 objectivesReference direction-based
RVEAAdaptive searchReference vector evolution
AGE-MOEAComplex landscapesAdaptive geometry

Constrained Problems

ApproachAlgorithmWhen to Use
Feasibility-firstAny algorithmLarge feasible region
SpecializedSRES, ISRESHeavy constraints
PenaltyGA + penaltyAlgorithm compatibility

See: references/algorithms.md for comprehensive algorithm reference

Benchmark Problems

Quick problem access:

from pymoo.problems import get_problem

# Single-objective
problem = get_problem("rastrigin", n_var=10)
problem = get_problem("rosenbrock", n_var=10)

# Multi-objective
problem = get_problem("zdt1")        # Convex front
problem = get_problem("zdt2")        # Non-convex front
problem = get_problem("zdt3")        # Disconnected front

# Many-objective
problem = get_problem("dtlz2", n_obj=5, n_var=12)
problem = get_problem("dtlz7", n_obj=4)

See: references/problems.md for complete test problem reference

Genetic Operator Customization

Standard operator configuration:

from pymoo.algorithms.soo.nonconvex.ga import GA
from pymoo.operators.crossover.sbx import SBX
from pymoo.operators.mutation.pm import PM

algorithm = GA(
    pop_size=100,
    crossover=SBX(prob=0.9, eta=15),
    mutation=PM(eta=20),
    eliminate_duplicates=True
)

Operator selection by variable type:

Continuous variables:

  • Crossover: SBX (Simulated Binary Crossover)
  • Mutation: PM (Polynomial Mutation)

Binary variables:

  • Crossover: TwoPointCrossover, UniformCrossover
  • Mutation: BitflipMutation

Permutations (TSP, scheduling):

  • Crossover: OrderCrossover (OX)
  • Mutation: InversionMutation

See: references/operators.md for comprehensive operator reference

Performance and Troubleshooting

Common issues and solutions:

Problem: Algorithm not converging

  • Increase population size
  • Increase number of generations
  • Check if problem is multimodal (try different algorithms)
  • Verify constraints are correctly formulated

Problem: Poor Pareto front distribution

  • For NSGA-III: Adjust reference directions
  • Increase population size
  • Check for duplicate elimination
  • Verify problem scaling

Problem: Few feasible solutions

  • Use constraint-as-objective approach
  • Apply repair operators
  • Try SRES/ISRES for constrained problems
  • Check constraint formulation (should be g <= 0)

Problem: High computational cost

  • Reduce population size
  • Decrease number of generations
  • Use simpler operators
  • Enable parallel evaluation via elementwise_runner (see Workflow 8)

Best practices:

  1. Normalize objectives when scales differ significantly
  2. Set random seed for reproducibility
  3. Save history to analyze convergence: save_history=True
  4. Visualize results to understand solution quality
  5. Compare with true Pareto front when available
  6. Use appropriate termination criteria (generations, evaluations, tolerance)
  7. Tune operator parameters for problem characteristics

Resources

This skill includes comprehensive reference documentation and executable examples:

references/

Detailed documentation for in-depth understanding:

  • algorithms.md: Complete algorithm reference with parameters, usage, and selection guidelines
  • problems.md: Benchmark test problems (ZDT, DTLZ, WFG) with characteristics
  • operators.md: Genetic operators (sampling, selection, crossover, mutation) with configuration
  • visualization.md: All visualization types with examples and selection guide
  • constraints_mcdm.md: Constraint handling techniques and multi-criteria decision making methods
  • parallelization.md: Parallel evaluation with StarmapParallelization and JoblibParallelization

Search patterns for references:

  • Algorithm details: grep -r "NSGA-II\|NSGA-III\|MOEA/D" references/
  • Constraint methods: grep -r "Feasibility First\|Penalty\|Repair" references/
  • Visualization types: grep -r "Scatter\|PCP\|Petal" references/

scripts/

Executable examples demonstrating common workflows:

  • single_objective_example.py: Basic single-objective optimization with GA
  • multi_objective_example.py: Multi-objective optimization with NSGA-II, visualization
  • many_objective_example.py: Many-objective optimization with NSGA-III, reference directions
  • custom_problem_example.py: Defining custom problems (constrained and unconstrained)
  • decision_making_example.py: Multi-criteria decision making with different preferences

Run examples:

python3 scripts/single_objective_example.py
python3 scripts/multi_objective_example.py
python3 scripts/many_objective_example.py
python3 scripts/custom_problem_example.py
python3 scripts/decision_making_example.py

Additional Notes

Common patterns:

  • Use ElementwiseProblem for custom problems (or FunctionalProblem for function-based definitions)
  • Use vars dict with typed variables for mixed-variable problems
  • Constraints formulated as g(x) <= 0 and h(x) = 0
  • Reference directions required for NSGA-III
  • Normalize objectives before MCDM
  • Use appropriate termination: ('n_gen', N) or get_termination("f_tol", tol=0.001)

Alternatives

Compare before choosing

Computed 9731,966

K-Dense-AI/scientific-agent-skills

esm

Use when working directly with the `esm` Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.

Computed 9531,966

K-Dense-AI/scientific-agent-skills

tamarind

Access a collection of open-source molecular design and structural biology tools on the Tamarind Bio platform, via its REST API or MCP server — no local GPUs required. Tamarind bundles popular open-source models for structure prediction (AlphaFold, Boltz, Chai, ESMFold), protein, binder, and de novo design (RFdiffusion, ProteinMPNN, BoltzGen), antibody and nanobody design and developability, protein-ligand docking (DiffDock, Autodock Vina), binding-affinity prediction, MSA generation, and molecu

Computed 9337,126

github/awesome-copilot

rhino3d-scripts

Authoring and debugging scripts for Rhinoceros 3D (Rhino 8 and later). Use when asked to write RhinoScript (VBScript / .rvb / .vbs), RhinoPython, or RhinoCommon-based scripts; automate Rhino modeling tasks; build command macros; manipulate Rhino geometry, layers, blocks, or document objects; pick objects from the viewport; control redraw and undo; or load and run scripts from the Rhino Script Editor. Covers `rhinoscriptsyntax`, `scriptcontext`, the `Rhino.*` RhinoCommon namespaces (`Rhino.Geomet

Computed 91234,327

affaan-m/ECC

videodb

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, v