flexs.baselines.explorers.cmaes

CMAES explorer.

class flexs.baselines.explorers.cmaes.CMAES(model, rounds, sequences_batch_size, model_queries_per_batch, starting_sequence, alphabet, population_size=15, max_iter=400, initial_variance=0.2, log_file=None)[source]

Bases: flexs.explorer.Explorer

An explorer which implements the covariance matrix adaptation evolution strategy (CMAES).

Optimizes a continuous relaxation of the one-hot sequence that we use to construct a normal distribution around, sample from, and then argmax to get sequences for the objective function.

http://blog.otoro.net/2017/10/29/visual-evolution-strategies/ is a helpful guide.

propose_sequences(measured_sequences)[source]

Propose top sequences_batch_size sequences for evaluation.

Return type

Tuple[ndarray, ndarray]