evomo.algorithms.rvea#

Classes#

RVEA

A tensorized implementation of the Reference Vector Guided Evolutionary Algorithm (RVEA)

Module Contents#

class evomo.algorithms.rvea.RVEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, alpha: float = 2.0, fr: float = 0.1, max_gen: int = 100, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#

Bases: evox.core.Algorithm

A tensorized implementation of the Reference Vector Guided Evolutionary Algorithm (RVEA) for multi-objective optimization problems.

References:
[1] R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff, “A reference vector guided evolutionary algorithm

for many-objective optimization,” IEEE Transactions on Evolutionary Computation, vol. 20, no. 5, pp. 773-791, 2016. Available: https://ieeexplore.ieee.org/document/7386636

[2] Z. Liang, T. Jiang, K. Sun, and R. Cheng, “GPU-accelerated Evolutionary Multiobjective Optimization

Using Tensorized RVEA,” in Proceedings of the Genetic and Evolutionary Computation Conference, ser. GECCO ’24, 2024, pp. 566–575. Available: https://doi.org/10.1145/3638529.3654223

Initialize the RVEA population and optimization state.

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.

  • alpha (float) – Default: 2.0. Exponent in the angle-penalty schedule (gen / max_gen) ** alpha used by reference-vector guided selection. A larger positive exponent delays the growth of angular selection pressure.

  • fr (float) – Default: 0.1. Positive reference-vector adaptation rate. The current implementation adapts every max(round(1 / fr), 1) steps: 0.1 means every 10 steps. The interval is independent of max_gen.

  • max_gen (int) – Default: 100. Positive generation horizon used to normalize the algorithm’s adaptation schedule. Set it consistently with your run length. It does not stop the workflow; the caller controls the loop.

  • selection_op (Callable or None) – Default: None. Environmental selection callable selection_op(pop, fit, vectors, theta) -> (pop, fit). The input includes parents and offspring. Return matching decision and fitness tensors on the input device; preserve reference-vector slots, including NaN padding where required. None selects EvoMO’s ref_vec_guided.

  • 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.

  • 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.

Reference-vector sampling can change the requested population size. Read self.pop.shape[0] for the actual size.

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()#

Perform a single optimization step.