evorl.ec.optimizers.vanilla_es

Module Contents

Classes

VanillaES

Canonical Evolution Strategies.

VanillaESMod

Variant of VanillaES.

VanillaESState

State of the VanillaES.

API

class evorl.ec.optimizers.vanilla_es.VanillaES[source]

Bases: evorl.ec.optimizers.ec_optimizer.EvoOptimizer

Canonical Evolution Strategies.

Paper: Back to basics: Benchmarking canonical evolution strategies for playing atari

ask(state: evorl.ec.optimizers.vanilla_es.VanillaESState) tuple[evorl.types.Params, evorl.ec.optimizers.vanilla_es.VanillaESState][source]
elite_weights: chex.Array

‘pytree_field(…)’

init(mean: evorl.types.Params, key: chex.PRNGKey) evorl.ec.optimizers.vanilla_es.VanillaESState[source]
noise_std_schedule: evorl.ec.optimizers.utils.ExponentialScheduleSpec

None

num_elites: int

None

pop_size: int

None

tell(state: evorl.ec.optimizers.vanilla_es.VanillaESState, fitnesses: chex.Array) tuple[evorl.types.PyTreeDict, evorl.ec.optimizers.vanilla_es.VanillaESState][source]
class evorl.ec.optimizers.vanilla_es.VanillaESMod[source]

Bases: evorl.ec.optimizers.vanilla_es.VanillaES

Variant of VanillaES.

Add external_size number of external individuals and corresponding fitnesses during the ES update by tell_external()

Variables:
  • external_size – number of external individuals

  • mix_strategy

    strategy to mix external individuals with the elites.

    • ”always”: always mix external individuals with elites

    • ”normal”: concat external individuals to the population and select num_elites elites from the combined population.

external_size: int

None

mix_strategy: str

‘always’

tell_external(state: evorl.ec.optimizers.vanilla_es.VanillaESState, fitnesses: chex.Array) tuple[evorl.types.PyTreeDict, evorl.ec.optimizers.vanilla_es.VanillaESState][source]
class evorl.ec.optimizers.vanilla_es.VanillaESState[source]

Bases: evorl.types.PyTreeData

State of the VanillaES.

key: chex.PRNGKey

None

mean: chex.ArrayTree

None

noise: None | chex.ArrayTree

None

noise_std: chex.Array

None