evox.algorithms.so.es_variants.open_es

Module Contents

Classes

OpenES

The OpenES algorithm as described in “Evolution Strategies as a Scalable Alternative to Reinforcement Learning” from https://arxiv.org/abs/1703.03864.

API

class evox.algorithms.so.es_variants.open_es.OpenES(pop_size: int, center_init: torch.Tensor, learning_rate: float, noise_stdev: float, optimizer: Literal[adam] | None = None, mirrored_sampling: bool = True, device: torch.device | None = None)[source]

Bases: evox.core.Algorithm

The OpenES algorithm as described in “Evolution Strategies as a Scalable Alternative to Reinforcement Learning” from https://arxiv.org/abs/1703.03864.

Initialization

Initialize the OpenES algorithm with the given parameters.

Parameters:
  • pop_size – The size of the population.

  • center_init – The initial center of the population. Must be a 1D tensor.

  • learning_rate – The learning rate for the optimizer.

  • noise_stdev – The standard deviation of the noise.

  • optimizer – The optimizer to use. Defaults to None. Currently, only “adam” or None is supported.

  • mirrored_sampling – Whether to use mirrored sampling. Defaults to True.

  • device – The device to use for the tensors. Defaults to None.

step()[source]

Step the OpenES algorithm by evaluating the fitness of the current population and updating the center.

record_step()[source]