evox.algorithms.so.es_variants.des

模块内容

DES

DES算法的实现。

API

class evox.algorithms.so.es_variants.des.DES(pop_size: int, center_init: torch.Tensor, temperature: float = 12.5, sigma_init: float = 0.1, device: torch.device | None = None)[源代码]

基础: evox.core.Algorithm

DES算法的实现。

参考文献: Discovering Evolution Strategies via Meta-Black-Box Optimization (https://arxiv.org/abs/2211.11260)

这段代码受到了 evosax 中算法实现的启发或使用了其实现。有关 evosax 的更多信息,请访问以下网址:GitHub 链接:https://github.com/RobertTLange/evosax

初始化

用给定的参数初始化DES算法。

参数:
  • pop_size -- 种群大小。

  • center_init -- 种群的初始中心。必须是一个一维张量。

  • temperature -- 软max的温度参数。默认为12.5。

  • sigma_init -- 噪声的初始标准差。默认为 0.1。

  • device -- 设备的使用者(设备用于存放张量的硬件)。默认为 None。

step()[源代码]

通过对种群进行采样、评估适应度和更新中心,逐步执行DES算法。

record_step()[源代码]