Algorithm parameter guide#
Every public algorithm’s generated API page documents its constructor parameters in English, including types, shapes, defaults, and their meaning in the current implementation. This guide explains shared conventions and the parameters that are easiest to confuse. The algorithm catalogue lists all public class names.
Recommendations such as positive horizons are usage requirements, not a promise that each constructor validates every input. Check the class’s API for its exact signature.
Population, objectives, bounds, and device#
Parameter |
Type and shape |
Meaning |
|---|---|---|
|
Positive |
Requested candidate count. Some reference-vector algorithms use the sampled vector count instead; inspect |
|
|
Number of minimized objectives, matching the problem’s fitness columns. It is independent of decision dimension. |
|
Floating tensors, |
Per-variable bounds. Match shapes, dtypes, and devices, with |
|
|
|
|
Extra named settings, where accepted |
Generally ignored, including an unrecognized |
The constructors with an explicit device argument are HypE, IBEA, LMOCSO, MOEAD,
NSGA2, NSGA3, RVEA, RVEAa, and TensorMOEAD. For other algorithms, put both bounds
on the intended device before constructing the algorithm.
After initialization, common state tensors are pop with decision dimension D and fit
with objective dimension n_objs. Algorithms can also keep archives, sparse masks, velocities,
reference vectors, or NaN placeholders; inspect their state and filter invalid results when needed.
step() updates state and returns None. Initialize with workflow.init_step() first.
Only the documented NSGA2 evaluation path consumes (fitness, constraint_violation) in this
algorithm collection. The other current implementations expect an objective tensor. See the
constraint guide before connecting a constrained problem.
Decomposition and differential evolution#
Here N denotes the actual population size after weight sampling.
Parameter |
Algorithms and defaults |
Meaning and limits |
|---|---|---|
|
|
Nearest-weight mating neighborhood size, including self; positive values are capped at |
|
|
Resolve to |
|
|
Resolve to |
|
|
Probability of drawing mating parents locally, in |
|
|
Maximum incumbents replaced per offspring; this is separate from mating neighborhood size. |
|
|
Resolve to |
|
|
External archive capacity; |
|
|
Positive differential step scale applied to parent differences. |
|
|
Mutant-component probability in binomial crossover, in |
|
|
Accepted and stored, but currently unused. Its variation step forms differential offspring and applies polynomial mutation without binomial crossover. |
|
|
Respectively, closest reference weights allowed in restricted ranking, or cosine-nearest subproblems considered for updating. Positive and no larger than the available vector count. |
|
|
Reward-window entry count, default |
|
|
|
|
|
Pair of aggregation names for incumbent comparison and eligible-offspring selection. Options: |
Schedules, selection, and sparsity#
Parameter |
Algorithms and defaults |
Meaning and limits |
|---|---|---|
|
|
Positive generation horizon used in adaptation or penalty schedules. The caller controls termination. |
|
|
Positive evaluation horizon. |
|
|
Exponent of |
|
|
Positive adaptation rate, using interval |
|
|
Trajectory-buffer capacity including the initial entry. Keep subsequent step count below this capacity; the buffers do not wrap. |
|
|
Positive scale for exponential indicator fitness; smaller values strengthen the effect of indicator differences. |
|
|
Positive Monte Carlo sample count per hypervolume estimate; increasing it reduces sampling noise at additional cost. |
|
|
Positive grid division count per objective; larger values give finer objective-space cells. |
|
|
|
|
|
Threshold on normalized convergence-score differences when eliminating a close angular pair. |
|
|
Multiplicative epsilon tolerance using |
|
|
Positive additive objective-grid width shared by all objectives; expressed in objective-value units. |
|
|
Initial zero-component fraction endpoints, with |
|
|
Positive decision-group count, also the weight-vector dimension. Normally no larger than |
|
|
Preferred objective-space point, |
|
|
|
LSMOF additionally reads wD=5 reference solutions, SubN=20 weight candidates,
wmax=0.1 decision-reconstruction scale, and max_fe=10000 from **kwargs.
The first phase evaluates 2 * wD * SubN decisions per step. Use positive counts and ensure
enough distinct reference solutions for wD. wmax scales offsets along unit directions;
it is not an evaluation-budget fraction. Initial evaluations count toward its phase switch.
Custom operator contracts#
Argument |
Calling contract |
Defaults and exceptions |
|---|---|---|
|
|
Where exposed, |
|
|
|
|
|
Mating selection, default |
|
|
Environmental selection. The default is EvoMO’s |
|
Constructor accepts it |
Currently overwritten by |
|
Constructor stores it |
Currently not called by |
MOEADFRRMAB example#
The example uses explicit bounds on the selected device, an automatically sized reward window, and three workflow steps. It prints actual population and window sizes. These steps are not an equal-evaluation-budget benchmark.
"""Show MOEADFRRMAB's effective population and reward-window sizes."""
import torch
from evomo.algorithms import MOEADFRRMAB
from evomo.problems.numerical import DTLZ2
from evomo.workflows import UnifiedWorkflow
def main():
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
torch.set_default_device(device)
torch.manual_seed(42)
problem = DTLZ2(d=12, m=3)
algorithm = MOEADFRRMAB(
pop_size=100,
n_objs=problem.m,
lb=torch.zeros(problem.d, device=device),
ub=torch.ones(problem.d, device=device),
T=20,
delta=0.9,
nr=2,
window_size=None,
)
workflow = UnifiedWorkflow(algorithm, problem, device=device)
workflow.init_step()
for _ in range(3):
workflow.step()
assert torch.isfinite(workflow.algorithm.fit).all()
print(f"Population shape: {tuple(workflow.algorithm.pop.shape)}")
print(f"Reward window entries: {workflow.algorithm.W}")
print(f"Fitness shape: {tuple(workflow.algorithm.fit.shape)}")
if __name__ == "__main__":
main()
See the MOEADFRRMAB API for all constructor fields and lifecycle methods.