evox.algorithms.so.es_variants.virtual_es#
Module Contents#
Classes#
Virtual-population Evolution Strategy for neuroevolution. |
Data#
API#
- class evox.algorithms.so.es_variants.virtual_es.VirtualES(param_shapes: list[tuple], pop_size: int, center_init: torch.Tensor, learning_rate: float, noise_stdev: float, optimizer: Literal[adam] | None = None, device: torch.device | None = None)[source]#
Bases:
evox.core.AlgorithmVirtual-population Evolution Strategy for neuroevolution.
Instead of materializing a full
(pop_size, dim)population, this algorithm stores a center vector(dim,)and per-individual seeds(pop_size,). Per-individual full weight/bias Gaussian perturbations are generated on-demand via the fused virtual-noise kernel, achieving O(dim) memory instead of O(pop_size * dim) while still searching in the full parameter space.The algorithm passes a
(center_flat, seeds, sigma)tuple toself.evaluate(), which the workflow routes to a virtual-population problem for on-demand evaluation.Initialization
Initialize the VirtualES algorithm with the given parameters.
- Parameters:
param_shapes – List of parameter shapes, e.g. [(256, 784), (256,), (10, 256), (10,)].
pop_size – The size of the population.
center_init – The initial center of the population. Must be a 1D tensor of length equal to the total number of parameters (sum of element counts over param_shapes).
learning_rate – The learning rate for the optimizer.
noise_stdev – The standard deviation of the noise (sigma).
optimizer – The optimizer to use. Defaults to None. Currently, only “adam” or None is supported.
device – The device to use for the tensors. Defaults to None.
- evox.algorithms.so.es_variants.virtual_es.VirtualLoRAES#
None