COMPASS_SEARCH is a FORTRAN90 library which seeks the minimizer of a scalar function of several variables using compass search, a direct search algorithm that does not use derivatives.
The algorithm, which goes back to Fermi and Metropolis, is easy to describe. The algorithm begins with a starting point X, and a step size DELTA.
For each dimension I, the algorithm considers perturbing X(I) by adding or subtracting DELTA.
If a perturbation is found which decreases the function, this becomes the new X. Otherwise DELTA is halved.
The iteration halts when DELTA reaches a minimal value.
The algorithm is not guaranteed to find a global minimum. It can, for instance, easily be attracted to a local minimum. Moreover, the algorithm can diverge if, for instance, the function decreases as the argument goes to infinity.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
COMPASS_SEARCH is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.
ASA047, a FORTRAN90 library which minimizes a scalar function of several variables using the Nelder-Mead algorithm.
ENTRUST, a MATLAB program which minimizes a scalar function of several variables using trust-region methods.
NELDER_MEAD, a MATLAB program which minimizes a scalar function of several variables using the Nelder-Mead algorithm.
PRAXIS, a FORTRAN90 library which implements the principal axis method of Richard Brent for minimization of a function without the use of derivatives.
TEST_OPT, a FORTRAN90 library which defines test problems requiring the minimization of a scalar function of several variables.
TEST_OPT_CON, a FORTRAN90 library which defines test problems for the minimization of a scalar function of several variables, with the search constrained to lie within a specified hyper-rectangle.
TOMS178, a FORTRAN90 library which optimizes a scalar functional of multiple variables using the Hooke-Jeeves method.
John Burkardt
You can go up one level to the FORTRAN90 source codes.