Skip to content

Releases: RobertTLange/evosax

Random Projection Indirect Encoding, Restructure

24 May 13:27
4a4775f
Compare
Choose a tag to compare
Added
  • Adds basic indirect encoding method in experimental - via special reshape wrappers: RandomDecoder embeddings (Gaussian, Rademacher)
Fixed
  • Fix import of modified ant environment. Broke due to optional brax dependence.
Changed
  • Restructure batch strategies into experimental
  • Make ant modified more flexible with configuration dict option (modify_dict)

Post-NeurIPS - `SequenceFitness`, `RmES`, `BatchStrategy`

22 May 17:48
Compare
Choose a tag to compare
Added
  • Adds sequential problems (SeqMNIST and MNIST) to evaluation wrappers.
  • Adds Acrobot task to GymFitness rollout wrappers.
  • Adds modified Ant environment to Brax rollout.
  • New strategies:
    • RmES (RmES following Li & Zhang, 2008).
    • Gradientless Descent (GLD following Golovin et al., 2020).
    • Simulated Annealing (SimAnneal following Rasdi Rere et al., 2015)
  • Adds simultaneous batch strategy functionalities:
    • BatchStrategy: vmap/pmap distributed subpopulation rollout
    • Protocol: Communication protocol between subpopulations
    • MetaStrategy: Stack one ES on top of subpopulations to control hyperparameters
Changed
  • Renamed crossover_rate to cross_over_rate in DE to make consistent with SimpleGA.
  • Add option to add optional env_params to GymFitness, seq_length to addition and permute_seq for S-MNIST problem.
  • Network classes now support different initializers for the kernels using the kernel_init_type string option. By default we follow flax's choice in lecun_normal.
Fixed
  • Add spring_legacy option to Brax rollout wrappers.

Sep-CMA-ES, iAMaLGaM, LM-MA-ES, Restarts, pmap

26 Mar 15:09
Compare
Choose a tag to compare
Added
  • New strategies:
    • Separable CMA-ES strategy (Sep_CMA_ES following Ros & Hansen, 2008).
    • BIPOP-CMA-ES (BIPOP_CMA_ES, following Hansen, 2009)
    • IPOP-CMA-ES (IPOP_CMA_ES, following Auer & Hansen, 2005)
    • Full-iAMaLGaM (Full_iAMaLGaM, following Bosman et al., 2013)
    • MA-ES (MA_ES, following Bayer & Sendhoff, 2017)
    • LM-MA-ES (LM_MA_ES, following Loshchilov et al., 2017)
  • Restart wrappers:
    • Base restart class (RestartWrapper).
    • Simple reinit restart strategy (Simple_Restarter).
    • BIPOP strategy with interleaved small/large populations (BIPOP_Restarter).
    • IPOP strategy with growing population size (IPOP_Restarter).
Changed
  • Both ParamReshaper and the rollout wrappers now support pmap over the population member dimension.
  • Add mean state component to all strategies (also non-GD-based) for smoother evaluation protocols.
  • Add strategy_name to all strategies.
  • Major renaming of strategies to more parsimonious version (e.g. PSO_ES -> PSO)
Fixed
  • Fix BraxFitness rollout wrapper and add train/test option.
  • Fix small bug related to sigma decay in Simple_GA.
  • Increase numerical stability constant to 1e-05 for z-scoring fitness reshaping. Everything smaller did not work robustly.
  • Get rid of deprecated index_update and use at[].set()

Python >=3.7 Requirement Fix

21 Feb 11:47
Compare
Choose a tag to compare
v0.0.3

v0.0.3 - Fix python version requirements

Public release - evosax

17 Feb 06:43
Compare
Choose a tag to compare
v0.0.2

Update readme - v.0.0.2

Welcome to evosax

22 Nov 10:04
Compare
Choose a tag to compare

Basic evosax API Usage 🍲

import jax
from evosax import CMA_ES
from evosax.problems import batch_rosenbrock

# Instantiate the search strategy
rng = jax.random.PRNGKey(0)
strategy = CMA_ES(popsize=20, num_dims=2, elite_ratio=0.5)
params = strategy.default_params
state = strategy.initialize(rng, params)

# Run the ask-eval-tell loop
for t in range(num_generations):
    rng, rng_gen = jax.random.split(rng)
    x, state = strategy.ask(rng_gen, state, params)
    fitness = batch_rosenbrock(x, 1, 100)
    state = strategy.tell(x, fitness, state, params)

# Get best overall population member & its fitness
state["best_member"], state["best_fitness"]