## Genetic Algorithm – Example 4.

I quote below a personal portable implementation (in C++) of a classic genetic algorithm (evolutionary algorithm) used to maximize the function **f(x, y) = sin(x) * sin(y)** in the domain 0 <= x, y <= 2pi. You can compile the program with the g++ compiler.

## Genetic Algorithm – Example 3.

I quote below a personal portable implementation (in C++) of a classic genetic algorithm (evolutionary algorithm) used to maximize the function **f(x) = sin(x)** in the domain 0 <= x <= 2pi. You can compile the program with the g++ compiler.

## Stochastic Hill Climbing (Stochastic Algorithm).

**Taxonomy**

The Stochastic Hill Climbing algorithm is a Stochastic Optimization algorithm and is a Local Optimization algorithm (contrasted to Global Optimization). It is a direct search technique, as it does not require derivatives of the search space. Stochastic Hill Climbing is an extension of deterministic hill climbing algorithms such as Simple Hill Climbing (first-best neighbor), Steepest-Ascent Hill Climbing (best neighbor), and a parent of approaches such as Parallel Hill Climbing and Random-Restart Hill Climbing.