evomo.algorithms.nsga3#

Classes#

NSGA3

An implementation of the tensorized NSGA-III for many-objective optimization problems.

Module Contents#

class evomo.algorithms.nsga3.NSGA3(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, data_type: torch.dtype | None = None, device: torch.device | None = None)#

Bases: evox.core.Algorithm

An implementation of the tensorized NSGA-III for many-objective optimization problems.

Uses rank-based tournament mating and fixed-shape reference-direction selection. Initialize the workflow before compiling its step with fullgraph=True.

References:
[1] K. Deb and H. Jain, “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based

Nondominated Sorting Approach, Part I: Solving Problems With Box Constraints,” IEEE Transactions on Evolutionary Computation, vol. 18, no. 4, pp. 577-601, 2014. Available: https://ieeexplore.ieee.org/document/6600851

[2] H. Li, Z. Liang, and R. Cheng, “GPU-accelerated Evolutionary Many-objective Optimization Using Tensorized

NSGA-III,” in 2025 IEEE Congress on Evolutionary Computation, 2025.

Initialize NSGA-III with reference-point environmental selection.

Parameters:
  • pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.

  • n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.

  • lb (torch.Tensor) – Required. Lower decision bounds of shape (D,), where D is the number of decision variables. Use floating-point bounds with the same shape, dtype and device as ub, and lb <= ub elementwise.

  • ub (torch.Tensor) – Required. Upper decision bounds of shape (D,). The decision dimension is inferred from the bounds, rather than passed separately. Match lb in shape, dtype and device.

  • selection_op (Callable or None) – Default: None. Mating selection callable selection_op(pop_size, [rank]) -> indices. Return pop_size parent indices on the population device. None selects EvoX’s tournament_selection_multifit. Reference-point environmental selection remains internal.

  • mutation_op (Callable or None) – Default: None. Mutation callable mutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape (B, D); preserve device and return an appropriate decision dtype. None selects EvoX’s polynomial_mutation.

  • crossover_op (Callable or None) – Default: None. Crossover callable crossover_op(parents) -> offspring receiving a two-dimensional decision tensor. None selects EvoX’s simulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.

  • data_type (torch.dtype or None) – Default: None. Initialization mode. torch.bool initializes Boolean decisions; all other values use continuous random initialization. This argument does not cast the population to an arbitrary requested dtype. For Boolean runs, supply compatible crossover and mutation operators.

  • device (torch.device or None) – Default: None. Execution device. None uses torch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Pass torch.device('cuda') explicitly for GPU execution.

Note

Use this algorithm through a workflow that connects the problem’s evaluation method. Call workflow.init_step() before workflow.step() or compiling the step. The current evaluation path expects an objective tensor of shape (B, n_objs). It does not consume a (fitness, constraint_violation) tuple.

init_step()#

Evaluate the initial population and initialize algorithm state.

Invoke through workflow.init_step() before the first optimization step.

Returns:

None; results are stored in algorithm state.

step()#

Generate offspring and select survivors while preserving their true ranks.