Code Monkey home page Code Monkey logo

cma-learning-rate-adaptation's Introduction

CMA-ES with Learning Rate Adaptation: Can CMA-ES with Default Population Size Solve Multimodal and Noisy Problems? (GECCO2023 Best Paper Nominated) [slide]

About

This repository contains the code for the paper "CMA-ES with Learning Rate Adaptation: Can CMA-ES with Default Population Size Solve Multimodal and Noisy Problems?" by Masahiro Nomura, Youhei Akimoto, and Isao Ono, which has been accepted to GECCO'23 (Best Paper Nominated at ENUM Track).

You can also use the LRA-CMA-ES via the following Python libraries:

  • cmaes (Recommended): It's only necessary to specify lr_adapt=True when using CMA.
  • Optuna: Similarly, it's only necessary to specify lr_adapt=True in CmaEsSampler.

If you find this code useful in your research then please cite:

@inproceedings{nomura2023cma,
author = {Nomura, Masahiro and Akimoto, Youhei and Ono, Isao},
title = {CMA-ES with Learning Rate Adaptation: Can CMA-ES with Default Population Size Solve Multimodal and Noisy Problems?},
year = {2023},
isbn = {9798400701191},
publisher = {Association for Computing Machinery},
url = {https://doi.org/10.1145/3583131.3590358},
doi = {10.1145/3583131.3590358},
booktitle = {Proceedings of the Genetic and Evolutionary Computation Conference},
pages = {839โ€“847},
numpages = {9},
location = {Lisbon, Portugal},
series = {GECCO '23}
}

Dependencies

  • numpy=1.24.2

Example (Noiseless)

In the noiseless case, e.g. Sphere function, you can run the code by the following command:

python main.py --function=sphere \
  --dim=10 \
  --mean=3.0 \
  --sigma=2.0

Users can specify the experimental settings by adding the following flags:

  • --function: objective function (required; please see the below)
  • --dim: # dimension (required)
  • --mean: initial mean vector (required; currently only scalar value is accepted)
  • --sigma: initial step-size (required)
  • --max_evals: maximum # evaluations (default=10000000; int)
  • --criterion: target value, i.e., the optimization will stop when the function value reaches it (default=1e-3; float)

You can run the experiments on other functions by specifying such arguments in the same way. The benchmark functions include sphere (Sphere), ellipsoid (Ellipsoid), rosen (Rosenbrock), ackley (Ackley), schaffer (Schaffer), rastrigin (Rastrigin), bohachevsky (Bohachevsky), and griewank (Griewank),

Example (Noisy)

In the noiseless case, e.g. NoisySphere function with variance=1.0, you can run the code by the following command:

python main.py --function=noisysphere-var=1.0 \
  --dim=10 \
  --mean=3.0 \
  --sigma=2.0

You can specify the variance by changing the 1.0 in the noisysphere-var=1.0. The benchmark functions include noisysphere-var=... (NoisySphere), noisyellipsoid-var=... (NoisyEllipsoid), and noisyrastrigin-var=... (NoisyRastrigin).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.