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 في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أريد تحسين تصميم سيارة لأقل استهلاك للوقود وأقل تكلفة إنتاج، ما هي أفضل الخيارات؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تحدد المسألة، وتختار طريقة تحسين (مثل 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

…

الأسئلة الشائعة

ما هو «حل المقايضة»؟

هو حل يقدم توازناً جيداً بين أهداف متعارضة. فمثلاً، قد لا تملك السيارة أدنى استهلاك للوقود، لكنها تقدم حلاً وسطاً جيداً بين المسافة المقطوعة والتكلفة.

ما هي «الجبهة الفلكية» (Pareto front)؟

هي مجموعة الحلول التي لا يمكن تحسين أحد أهدافها دون إضعاف هدف آخر. وهي تمثل كل أفضل المقايضات الممكنة.

ما أنواع المسائل التي تستطيع هذه المهارة حلها؟

تستطيع حل المسائل ذات الهدف الواحد أو الأهداف المتعددة، مع القيود أو بدونها، وحتى المسائل ذات أنواع مختلفة من المتغيرات (صحيحة، ثنائية، وغيرها).

التفاصيل

الوصف الأصلي من المؤلف

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

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة