Перейти к содержанию
Skillpedia
Машинное обучение51k · #3544

pymoo

Что он делает

Это инструмент для поиска лучших решений сложных задач с несколькими, возможно противоречивыми, целями. Он помогает находить наилучшие возможные компромиссы.

Когда использовать

  • ✓Когда у вас есть задача с несколькими целями, которые нужно оптимизировать одновременно.
  • ✓Когда нужно найти наилучший баланс между конкурирующими целями.
  • ✓Когда вы анализируете разные варианты, чтобы принять обоснованное решение.

Ссылка на скилл

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pymoo/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pymoo/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Я хочу оптимизировать конструкцию автомобиля так, чтобы у него был минимальный расход топлива и минимальная стоимость производства. Какие варианты лучше всего?”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Вы описываете задачу, выбираете метод оптимизации (например, NSGA-II), и инструмент ищет лучшие решения. Он возвращает найденные решения и их результаты.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

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. Targets stable pymoo 0.6.2, reviewed 2026-10-01 against current official docs and native toy runs.

Installation

uv pip install "pymoo==0.6.2"

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

Dependencies: The released 0.6.2 wheel requires NumPy, SciPy, moocore, autograd, cma, matplotlib, alive_progress, and Deprecated. NumPy 2.x is supported. The current installation prose describes some dependencies as optional; the released package metadata governs installation. Joblib, Optuna and dill are separate dependencies for the corresponding recipes.

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: Raw inequality values (g(x) <= 0 is feasible)
  • result.H: Raw equality residuals
  • result.CV: Aggregated constraint violation under the configured tolerances
  • result.algorithm: Final algorithm state; history is retained when requested

Check feasibility before plotting or selecting: If no feasible solution was found, result.X and result.F can be None. With return_least_infeasible=True, a returned candidate can still violate constraints; report its CV and residuals instead of calling it feasible. Re-evaluate chosen candidates against the original physical constraints after any normalization or repair. See the result contract.

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; negate a maximization objective and record the conversion 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 workflows and context-dependent adaptation snippets are in references/quick_start_workflows.md:

# Workflow Use when
1 Single-objective optimization one objective, GA or DE
2 Multi-objective (2-3 objectives) NSGA-II and a Pareto front
3 Many-objective (4+ objectives) NSGA-III or reference-direction methods
4 Custom problem definition subclassing Problem / ElementwiseProblem
5 Constraint handling inequality and equality constraints
6 Decision making from a Pareto front scalarization and MCDM selection

…

Частые вопросы

Что такое компромиссное решение?

Это решение, которое даёт хороший баланс между противоречивыми целями. Например, у автомобиля может не быть абсолютно минимального расхода топлива, но он предлагает разумный компромисс между пробегом и стоимостью.

Что такое «фронт Парето»?

Это набор решений, у которых нельзя улучшить одну цель, не ухудшив другую. Он показывает все лучшие возможные компромиссы.

Какие задачи может решать этот инструмент?

Он может решать задачи с одной или несколькими целями, с ограничениями или без них, а также задачи с разными типами переменных (целочисленными, бинарными и т. д.).

Подробности

Оригинальное описание автора

Solves and validates single-, multi-, and many-objective optimization with pymoo, including NSGA-II, NSGA-III, MOEA/D, constraints, Pareto approximations, reference directions, and ZDT/DTLZ benchmarks for engineering and research problems.

repo: K-Dense-AI/scientific-agent-skills

Популярность

Звёзды на GitHub
51k
Место в рейтинге
#3544
Лицензия
MIT
Обновлён
15.10.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы