evomo.algorithms.rvea#
Classes#
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.AlgorithmA 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,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.alpha (float) – Default:
2.0. Exponent in the angle-penalty schedule(gen / max_gen) ** alphaused 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 everymax(round(1 / fr), 1)steps:0.1means every 10 steps. The interval is independent ofmax_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 callableselection_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.Noneselects EvoMO’sref_vec_guided.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_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.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.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.