Skill Tracer
Skills › Scientific Agent Skills › pymoo › problems.md

problems.md

267 lines · skills/pymoo/references/problems.md at 5f2bc03

Open on GitHub
1# Pymoo Test Problems Reference
2
3Reference for pymoo 0.6.2 benchmark problems. Dimensions below are defaults unless specified. Custom parameter choices can change the benchmark. The built-in Sphere is sum((x - 0.5)**2) on [0, 1], not sum(x**2) about the origin.
4

Pymoo Test Problems Reference

Reference for pymoo 0.6.2 benchmark problems. Dimensions below are defaults unless specified. Custom parameter choices can change the benchmark. The built-in Sphere is sum((x - 0.5)2) on [0, 1], not sum(x2) about the origin.

Raw lines 1 to 4
5## Single-Objective Test Problems
6

Single-Objective Test Problems

Raw lines 5 to 6
7### Ackley Function
8**Characteristics:**
9- Highly multimodal
10- Many local optima
11- Tests algorithm's ability to escape local minima
12- Continuous variables

Ackley Function

Characteristics:

  • Highly multimodal
  • Many local optima
  • Tests algorithm's ability to escape local minima
  • Continuous variables
Raw lines 7 to 13
14### Griewank Function
15**Characteristics:**
16- Multimodal with regularly distributed local minima
17- Product term introduces interdependencies between variables
18- Global minimum at origin

Griewank Function

Characteristics:

  • Multimodal with regularly distributed local minima
  • Product term introduces interdependencies between variables
  • Global minimum at origin
Raw lines 14 to 19
20### Rastrigin Function
21**Characteristics:**
22- Highly multimodal with regularly spaced local minima
23- Challenging for gradient-based methods
24- Tests global search capability

Rastrigin Function

Characteristics:

  • Highly multimodal with regularly spaced local minima
  • Challenging for gradient-based methods
  • Tests global search capability
Raw lines 20 to 25
26### Rosenbrock Function
27**Characteristics:**
28- Unimodal but narrow valley to global optimum
29- Tests algorithm's convergence in difficult landscape
30- Classic benchmark for continuous optimization

Rosenbrock Function

Characteristics:

  • Unimodal but narrow valley to global optimum
  • Tests algorithm's convergence in difficult landscape
  • Classic benchmark for continuous optimization
Raw lines 26 to 31
32### Zakharov Function
33**Characteristics:**
34- Unimodal
35- Single global minimum
36- Tests basic convergence capability

Zakharov Function

Characteristics:

  • Unimodal
  • Single global minimum
  • Tests basic convergence capability
Raw lines 32 to 37
38## Multi-Objective Test Problems (2-3 objectives)

Multi-Objective Test Problems (2-3 objectives)

Raw lines 38 to 39
40### ZDT Test Suite
41**Purpose:** Standard benchmark for bi-objective optimization
42**Construction:** f₂(x) = g(x) · h(f₁(x), g(x)) where g(x) = 1 at Pareto-optimal solutions
44#### ZDT1
45- **Variables:** 30 continuous
46- **Bounds:** [0, 1]
47- **Pareto front:** Convex
48- **Purpose:** Basic convergence and diversity test
50#### ZDT2
51- **Variables:** 30 continuous
52- **Bounds:** [0, 1]
53- **Pareto front:** Non-convex (concave)
54- **Purpose:** Tests handling of non-convex fronts
56#### ZDT3
57- **Variables:** 30 continuous
58- **Bounds:** [0, 1]
59- **Pareto front:** Disconnected (5 separate regions)
60- **Purpose:** Tests diversity maintenance across discontinuous front
62#### ZDT4
63- **Variables:** 10 continuous (x₁ ∈ [0,1], x₂₋₁₀ ∈ [-5,5])
64- **Pareto front:** Convex
65- **Difficulty:** 21⁹ local Pareto fronts
66- **Purpose:** Tests global search with many local optima
68#### ZDT5
69- **Variables:** 80 Boolean entries in pymoo by default (11 bitstring groups)
70- **Encoding:** x₁ uses 30 bits, x₂₋₁₁ use 5 bits each
71- **Pareto front:** Convex
72- **Purpose:** Tests discrete optimization and deceptive landscapes
74#### ZDT6
75- **Variables:** 10 continuous
76- **Bounds:** [0, 1]
77- **Pareto front:** Non-convex with non-uniform density
78- **Purpose:** Tests handling of biased solution distributions
80**Usage:**
81```python
82from pymoo.problems.multi import ZDT1, ZDT2, ZDT3, ZDT4, ZDT5, ZDT6
83problem = ZDT1() # or ZDT2(), ZDT3(), etc.
84```

ZDT Test Suite

Purpose: Standard benchmark for bi-objective optimization Construction: f₂(x) = g(x) · h(f₁(x), g(x)) where g(x) = 1 at Pareto-optimal solutions

ZDT1

  • Variables: 30 continuous
  • Bounds: [0, 1]
  • Pareto front: Convex
  • Purpose: Basic convergence and diversity test

ZDT2

  • Variables: 30 continuous
  • Bounds: [0, 1]
  • Pareto front: Non-convex (concave)
  • Purpose: Tests handling of non-convex fronts

ZDT3

  • Variables: 30 continuous
  • Bounds: [0, 1]
  • Pareto front: Disconnected (5 separate regions)
  • Purpose: Tests diversity maintenance across discontinuous front

ZDT4

  • Variables: 10 continuous (x₁ ∈ [0,1], x₂₋₁₀ ∈ [-5,5])
  • Pareto front: Convex
  • Difficulty: 21⁹ local Pareto fronts
  • Purpose: Tests global search with many local optima

ZDT5

  • Variables: 80 Boolean entries in pymoo by default (11 bitstring groups)
  • Encoding: x₁ uses 30 bits, x₂₋₁₁ use 5 bits each
  • Pareto front: Convex
  • Purpose: Tests discrete optimization and deceptive landscapes

ZDT6

  • Variables: 10 continuous
  • Bounds: [0, 1]
  • Pareto front: Non-convex with non-uniform density
  • Purpose: Tests handling of biased solution distributions

Usage:

from pymoo.problems.multi import ZDT1, ZDT2, ZDT3, ZDT4, ZDT5, ZDT6
problem = ZDT1()  # or ZDT2(), ZDT3(), etc.
Raw lines 40 to 85
86### BNH (Binh and Korn)
87**Characteristics:**
88- 2 objectives
89- 2 variables
90- Constrained problem
91- Tests constraint handling in multi-objective context

BNH (Binh and Korn)

Characteristics:

  • 2 objectives
  • 2 variables
  • Constrained problem
  • Tests constraint handling in multi-objective context
Raw lines 86 to 92
93### OSY (Osyczka and Kundu)
94**Characteristics:**
95- 2 objectives
96- 6 variables
97- Multiple constraints
98- Real-world inspired

OSY (Osyczka and Kundu)

Characteristics:

  • 2 objectives
  • 6 variables
  • Multiple constraints
  • Real-world inspired
Raw lines 93 to 99
100### TNK (Tanaka)
101**Characteristics:**
102- 2 objectives
103- 2 variables
104- Disconnected feasible region
105- Tests handling of disjoint search spaces

TNK (Tanaka)

Characteristics:

  • 2 objectives
  • 2 variables
  • Disconnected feasible region
  • Tests handling of disjoint search spaces
Raw lines 100 to 106
107### Truss2D
108**Characteristics:**
109- Structural engineering problem
110- Bi-objective (weight vs displacement)
111- Practical application test

Truss2D

Characteristics:

  • Structural engineering problem
  • Bi-objective (weight vs displacement)
  • Practical application test
Raw lines 107 to 112
113### Welded Beam
114**Characteristics:**
115- Engineering design problem
116- Multiple constraints
117- Practical optimization scenario

Welded Beam

Characteristics:

  • Engineering design problem
  • Multiple constraints
  • Practical optimization scenario
Raw lines 113 to 118
119### Omni-test
120**Characteristics:**
121- Configurable test problem
122- Various difficulty levels
123- Systematic testing

Omni-test

Characteristics:

  • Configurable test problem
  • Various difficulty levels
  • Systematic testing
Raw lines 119 to 124
125### SYM-PART
126**Characteristics:**
127- Symmetric problem structure
128- Tests specific algorithmic behaviors

SYM-PART

Characteristics:

  • Symmetric problem structure
  • Tests specific algorithmic behaviors
Raw lines 125 to 129
130## Many-Objective Test Problems (4+ objectives)

Many-Objective Test Problems (4+ objectives)

Raw lines 130 to 131
132### DTLZ Test Suite
133**Purpose:** Scalable many-objective benchmarks
134**Objectives:** Configurable (typically 3-15)
135**Variables:** Scalable
137#### DTLZ1
138- **Pareto front:** Linear (hyperplane)
139- **Difficulty:** 11^k - 1 local Pareto fronts
140- **Purpose:** Tests convergence with many local optima
142#### DTLZ2
143- **Pareto front:** Spherical (concave)
144- **Difficulty:** Straightforward convergence
145- **Purpose:** Basic many-objective diversity test
147#### DTLZ3
148- **Pareto front:** Spherical
149- **Difficulty:** Multimodal distance term shared with DTLZ1
150- **Purpose:** Combines DTLZ1's multimodality with DTLZ2's geometry
152#### DTLZ4
153- **Pareto front:** Spherical with biased density
154- **Difficulty:** Non-uniform solution distribution
155- **Purpose:** Tests diversity maintenance with bias
157#### DTLZ5
158- **Pareto front:** Degenerate; the standard three-objective case is a curve
159- **Purpose:** Tests handling of degenerate fronts
161#### DTLZ6
162- **Pareto front:** Degenerate; inspect the selected objective count
163- **Difficulty:** Harder convergence than DTLZ5
164- **Purpose:** Challenging degenerate front
166#### DTLZ7
167- **Pareto front:** Disconnected regions
168- **Difficulty:** 2^(M-1) disconnected regions
169- **Purpose:** Tests diversity across disconnected fronts
171**Usage:**
172```python
173from pymoo.problems.many import DTLZ1, DTLZ2
174problem = DTLZ1(n_var=7, n_obj=3) # 7 variables, 3 objectives
175```

DTLZ Test Suite

Purpose: Scalable many-objective benchmarks Objectives: Configurable (typically 3-15) Variables: Scalable

DTLZ1

  • Pareto front: Linear (hyperplane)
  • Difficulty: 11^k - 1 local Pareto fronts
  • Purpose: Tests convergence with many local optima

DTLZ2

  • Pareto front: Spherical (concave)
  • Difficulty: Straightforward convergence
  • Purpose: Basic many-objective diversity test

DTLZ3

  • Pareto front: Spherical
  • Difficulty: Multimodal distance term shared with DTLZ1
  • Purpose: Combines DTLZ1's multimodality with DTLZ2's geometry

DTLZ4

  • Pareto front: Spherical with biased density
  • Difficulty: Non-uniform solution distribution
  • Purpose: Tests diversity maintenance with bias

DTLZ5

  • Pareto front: Degenerate; the standard three-objective case is a curve
  • Purpose: Tests handling of degenerate fronts

DTLZ6

  • Pareto front: Degenerate; inspect the selected objective count
  • Difficulty: Harder convergence than DTLZ5
  • Purpose: Challenging degenerate front

DTLZ7

  • Pareto front: Disconnected regions
  • Difficulty: 2^(M-1) disconnected regions
  • Purpose: Tests diversity across disconnected fronts

Usage:

from pymoo.problems.many import DTLZ1, DTLZ2
problem = DTLZ1(n_var=7, n_obj=3)  # 7 variables, 3 objectives
Raw lines 132 to 176
177### WFG Test Suite
178**Purpose:** Walking Fish Group scalable benchmarks
179**Features:** More complex than DTLZ, various front shapes and difficulties
181**Variants:** WFG1-WFG9 with different characteristics
182- Non-separable
183- Deceptive
184- Multimodal
185- Biased
186- Scaled fronts

WFG Test Suite

Purpose: Walking Fish Group scalable benchmarks Features: More complex than DTLZ, various front shapes and difficulties

Variants: WFG1-WFG9 with different characteristics

  • Non-separable
  • Deceptive
  • Multimodal
  • Biased
  • Scaled fronts
Raw lines 177 to 187
188## Constrained Multi-Objective Problems

Constrained Multi-Objective Problems

Raw lines 188 to 189
190### MW Test Suite
191**Purpose:** Multi-objective problems with various constraint types
192**Features:** Different constraint difficulty levels

MW Test Suite

Purpose: Multi-objective problems with various constraint types Features: Different constraint difficulty levels

Raw lines 190 to 193
194### DAS-CMOP
195**Purpose:** Difficulty-adjustable and scalable constrained multi-objective problems
196**Features:** Tunable constraint difficulty

DAS-CMOP

Purpose: Difficulty-adjustable and scalable constrained multi-objective problems Features: Tunable constraint difficulty

Raw lines 194 to 197
198### MODAct
199**Purpose:** Multi-objective optimization with active constraints
200**Features:** Realistic constraint scenarios

MODAct

Purpose: Multi-objective optimization with active constraints Features: Realistic constraint scenarios

Raw lines 198 to 201
202## Dynamic Multi-Objective Problems

Dynamic Multi-Objective Problems

Raw lines 202 to 203
204### DF Test Suite
205**Purpose:** CEC2018 Competition dynamic multi-objective benchmarks
206**Features:**
207- Time-varying objectives
208- Changing Pareto fronts
209- Tests algorithm adaptability
211**Variants:** DF1-DF14 with different dynamics

DF Test Suite

Purpose: CEC2018 Competition dynamic multi-objective benchmarks Features:

  • Time-varying objectives
  • Changing Pareto fronts
  • Tests algorithm adaptability

Variants: DF1-DF14 with different dynamics

Raw lines 204 to 212
213## Custom Problem Definition
215Define custom problems by extending base classes:
217```python
218from pymoo.core.problem import ElementwiseProblem
219import numpy as np
221class MyProblem(ElementwiseProblem):
222 def __init__(self):
223 super().__init__(
224 n_var=2, # number of variables
225 n_obj=2, # number of objectives
226 n_ieq_constr=0, # inequality constraints
227 n_eq_constr=0, # equality constraints
228 xl=np.array([0, 0]), # lower bounds
229 xu=np.array([1, 1]) # upper bounds
230 )
232 def _evaluate(self, x, out, *args, **kwargs):
233 # Define objectives
234 f1 = x[0]**2 + x[1]**2
235 f2 = (x[0]-1)**2 + x[1]**2
237 out["F"] = [f1, f2]
239 # Optional: constraints
240 # out["G"] = constraint_values # <= 0
241 # out["H"] = equality_constraints # == 0
242```

Custom Problem Definition

Define custom problems by extending base classes:

from pymoo.core.problem import ElementwiseProblem
import numpy as np

class MyProblem(ElementwiseProblem):
    def __init__(self):
        super().__init__(
            n_var=2,           # number of variables
            n_obj=2,           # number of objectives
            n_ieq_constr=0,    # inequality constraints
            n_eq_constr=0,     # equality constraints
            xl=np.array([0, 0]),   # lower bounds
            xu=np.array([1, 1])    # 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]**2

        out["F"] = [f1, f2]

        # Optional: constraints
        # out["G"] = constraint_values  # <= 0
        # out["H"] = equality_constraints  # == 0
Raw lines 213 to 243
244## Problem Selection Guidelines
246**For algorithm development:**
247- Simple convergence: DTLZ2, ZDT1
248- Multimodal: ZDT4, DTLZ1, DTLZ3
249- Non-convex: ZDT2
250- Disconnected: ZDT3, DTLZ7
252**For comprehensive testing:**
253- ZDT suite for bi-objective
254- DTLZ suite for many-objective
255- WFG for complex landscapes
256- MW/DAS-CMOP for constraints
258**For real-world validation:**
259- Engineering problems (Truss2D, Welded Beam)
260- Match problem characteristics to application domain
262**Variable types:**
263- Continuous: Most problems
264- Discrete: ZDT5
265- Mixed: Define custom problem
267Reviewed 2026-10-01 against native problem objects and [ZDT](https://pymoo.org/problems/multi/zdt.html), [OSY](https://pymoo.org/problems/multi/osy.html), and [DTLZ](https://pymoo.org/problems/many/dtlz.html). Benchmark engineering equations are synthetic validation cases, not validated physical designs. A known Pareto-front helper is not available for every custom problem or parameterization; never fabricate a reference front.

Problem Selection Guidelines

For algorithm development:

  • Simple convergence: DTLZ2, ZDT1
  • Multimodal: ZDT4, DTLZ1, DTLZ3
  • Non-convex: ZDT2
  • Disconnected: ZDT3, DTLZ7

For comprehensive testing:

  • ZDT suite for bi-objective
  • DTLZ suite for many-objective
  • WFG for complex landscapes
  • MW/DAS-CMOP for constraints

For real-world validation:

  • Engineering problems (Truss2D, Welded Beam)
  • Match problem characteristics to application domain

Variable types:

  • Continuous: Most problems
  • Discrete: ZDT5
  • Mixed: Define custom problem

Reviewed 2026-10-01 against native problem objects and ZDT, OSY, and DTLZ. Benchmark engineering equations are synthetic validation cases, not validated physical designs. A known Pareto-front helper is not available for every custom problem or parameterization; never fabricate a reference front.

Raw lines 244 to 267