evomo.algorithms.hype#
Classes#
The tensorized version of HypE algorithm. |
Functions#
|
Module Contents#
- evomo.algorithms.hype.cal_hv(fit: torch.Tensor, ref: torch.Tensor, pop_size: int, n_sample: int)#
- class evomo.algorithms.hype.HypE(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, n_sample: int = 10000, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmThe tensorized version of HypE algorithm.
- References:
- [1] J. Bader and E. Zitzler, “HypE: An algorithm for fast hypervolume-based many-objective optimization,”
Evolutionary Computation, vol. 19, no. 1, pp. 45-76, 2011. Available: https://direct.mit.edu/evco/article-abstract/19/1/45/1363/HypE-An-Algorithm-for-Fast-Hypervolume-Based-Many
- [2] Z. Liang, H. Li, N. Yu, K. Sun, and R. Cheng, “Bridging Evolutionary Multiobjective Optimization and
GPU Acceleration via Tensorization,” IEEE Transactions on Evolutionary Computation, 2025. Available: https://ieeexplore.ieee.org/document/10944658
Initialize the HypE 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.n_sample (int) – Default:
10000. Positive number of Monte Carlo samples for each hypervolume contribution estimate. More samples reduce sampling noise at higher computation and memory cost.selection_op (Callable or None) – Default:
None. Accepted in the signature, but the current constructor overwrites it with EvoX’stournament_selection. A custom value has no effect.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.- 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()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.