evox.algorithms.so.de_variants.shade

Module Contents

Classes

SHADE

The implementation of SHADE algorithm.

API

class evox.algorithms.so.de_variants.shade.SHADE(pop_size: int, lb: torch.Tensor, ub: torch.Tensor, diff_padding_num: int = 9, device: torch.device | None = None)[source]

Bases: evox.core.Algorithm

The implementation of SHADE algorithm.

Reference: Tanabe R, Fukunaga A. Success-history based parameter adaptation for differential evolution[C]//2013 IEEE congress on evolutionary computation. IEEE, 2013: 71-78.

Initialization

Initialize the SHADE algorithm with the given parameters.

Parameters:
  • pop_size – The size of the population.

  • lb – The lower bounds of the search space. Must be a 1D tensor.

  • ub – The upper bounds of the search space. Must be a 1D tensor.

  • diff_padding_num – The number of differential padding vectors to use. Defaults to 9.

  • device – The device to use for tensor computations (e.g., “cpu” or “cuda”). Defaults to None.

step()[source]

Perform a single step of the SHADE algorithm.

This involves the following sub-steps:

  1. Generate trial vectors using the SHADE algorithm.

  2. Evaluate the fitness of the trial vectors.

  3. Update the population.

  4. Update the memory.