Releases: RobertTLange/evosax
Releases · RobertTLange/evosax
Random Projection Indirect Encoding, Restructure
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`
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)
- RmES (
- Adds simultaneous batch strategy functionalities:
BatchStrategy
:vmap
/pmap
distributed subpopulation rolloutProtocol
: Communication protocol between subpopulationsMetaStrategy
: Stack one ES on top of subpopulations to control hyperparameters
Changed
- Renamed
crossover_rate
tocross_over_rate
in DE to make consistent withSimpleGA
. - Add option to add optional
env_params
toGymFitness
,seq_length
to addition andpermute_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 inlecun_normal
.
Fixed
- Add
spring_legacy
option to Brax rollout wrappers.
Sep-CMA-ES, iAMaLGaM, LM-MA-ES, Restarts, pmap
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)
- Separable CMA-ES strategy (
- 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
).
- Base restart class (
Changed
- Both
ParamReshaper
and the rollout wrappers now supportpmap
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 useat[].set()
Python >=3.7 Requirement Fix
v0.0.3 v0.0.3 - Fix python version requirements
Public release - evosax
v0.0.2 Update readme - v.0.0.2
Welcome to evosax
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"]