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), 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.
Confirm successful installation by checking the skill directory location:
.cursor/skills/pymoo
Restart Cursor to activate pymoo. Access via /pymoo in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
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), 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.
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)
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 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
Dynamic: Time-varying objectives or constraints
Quick Start Workflows
Workflow 1: Single-Objective Optimization
When: Optimizing one objective function
Steps:
Define or select problem
Choose single-objective algorithm (GA, DE, PSO, CMA-ES)
Configure termination criteria
Run optimization
Extract best solution
Example:
from pymoo.algorithms.soo.nonconvex.ga import GA
from pymoo.problems import get_problem
from pymoo.optimize import minimize
# Built-in problemproblem = get_problem("rastrigin", n_var=10)# Configure Genetic Algorithmalgorithm = GA( pop_size=100, eliminate_duplicates=True)# Optimizeresult = minimize( problem, algorithm,('n_gen',200), seed=1, verbose=True)print(f"Best solution: {result.X}")print(f"Best objective: {result.F[0]}")
See:scripts/single_objective_example.py for complete example
Algorithm choice: NSGA-III (designed for many objectives)
Key difference: Must provide reference directions for population guidance
Steps:
Define many-objective problem
Generate reference directions
Configure NSGA-III with reference directions
Run optimization
Visualize using Parallel Coordinate Plot
Example:
from pymoo.algorithms.moo.nsga3 import NSGA3
from pymoo.problems import get_problem
from pymoo.optimize import minimize
from pymoo.util.ref_dirs import get_reference_directions
from pymoo.visualization.pcp import PCP
# Many-objective problem (5 objectives)problem = get_problem("dtlz2", n_obj=5)# Generate reference directions (required for NSGA-III)ref_dirs = get_reference_directions("das-dennis", n_dim=5, n_partitions=12)# Configure NSGA-IIIalgorithm = NSGA3(ref_dirs=ref_dirs)# Optimizeresult = minimize(problem, algorithm,('n_gen',300), seed=1)# Visualize with Parallel Coordinatesplot = PCP(labels=[f"f{i+1}"for i inrange(5)])plot.add(result.F, alpha=0.3)plot.show()
See:scripts/many_objective_example.py for complete example
Workflow 4: Custom Problem Definition
When: Solving domain-specific optimization problem
Steps:
Extend ElementwiseProblem class
Define __init__ with problem dimensions and bounds
Implement _evaluate method for objectives (and constraints)
Use with any algorithm
Unconstrained example:
from pymoo.core.problem import ElementwiseProblem
import numpy as np
classMyProblem(ElementwiseProblem):def__init__(self):super().__init__( n_var=2,# Number of variables n_obj=2,# Number of objectives xl=np.array([0,0]),# Lower bounds xu=np.array([5,5])# Upper bounds)def_evaluate(self, x, out,*args,**kwargs):# Define objectives f1 = x[0]**2+ x[1]**2 f2 =(x[0]-1)**2+(x[1]-1)**2 out["F"]=[f1, f2]
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates