Simple(x) Global Optimization

A Rust implementation of the Simple(x) global optimization algorithm.

This algorithm, which should not be confused with the simplex algorithm, is closest to bayesian optimization. Its strengths compared to bayesian optimization would be the ability to deal with a large number of sample and high dimension gracefully.

Usage

There are two ways to use the algorithm, either use one of the Optimizer::minimize / Optimizer::maximize functions :

```rust let f = |v| v[0] + v[1]; let inputinterval = vec![(-10., 10.), (-20., 20.)]; let nbiterations = 100;

let (maxvalue, coordinates) = Optimizer::maximize(f, inputinterval, nbiterations); println!("max value: {} found in [{}, {}]", maxvalue, coordinates[0], coordinates[1]); ```

Or use an iterator if you want to set exploration_depth to an exotic value or to have fine grained control on the stopping criteria :

```rust let f = |v| v[0] * v[1]; let inputinterval = vec![(-10., 10.), (-20., 20.)]; let shouldminimize = true;

// sets exploration_depth to be greedy // runs the search for 30 iterations // then waits until we find a point good enough // finally stores the best value so far let (minvalue, coordinates) = Optimizer::new(f, inputinterval, shouldminimize) .setexplorationdepth(10) .skip(30) .takewhile(|(value,coordinates)| value > 1. ) .next().unwrap();

println!("min value: {} found in [{}, {}]", min_value, coordinates[0], coordinates[1]); ```

Divergences to the reference implementation

Potential future developements

Do not hesitate to ask for improvements if needed. The list of things that could be done but will probably be left undone unless requested includes :