evomo.algorithms.ibea#

Classes#

IBEA

The tensorized version of IBEA algorithm.

Functions#

cal_max(pop_obj1, pop_obj2)

Calculates the maximum difference between elements of two objective tensors.

Module Contents#

evomo.algorithms.ibea.cal_max(pop_obj1, pop_obj2)#

Calculates the maximum difference between elements of two objective tensors.

class evomo.algorithms.ibea.IBEA(n_objs: int, pop_size: int, lb: torch.Tensor, ub: torch.Tensor, kappa: float = 0.05, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#

Bases: evox.core.Algorithm

The tensorized version of IBEA algorithm.

References:
[1] E. Zitzler and S. Künzli, “Indicator-based selection in multiobjective search,” in Proceedings of the International

Conference on Parallel Problem Solving from Nature, 2004, pp. 832-842. Available: https://link.springer.com/chapter/10.1007/978-3-540-30217-9_84

Initialize the IBEA population and optimization state.

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

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

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

  • kappa (float) – Default: 0.05. Positive scale in the exponential indicator-fitness calculation. Smaller values make indicator differences more influential. Objective scaling also affects the resulting selection pressure.

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

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.

cal_fitness(pop_obj, kappa)#

Calculate the indicator-based fitness, indicator matrix, and scaling factor.