The Branin function is a two-variable test surface for optimization. Its four local minima make it useful for seeing why search direction and initialization matter. section 5.1.1
Its role becomes intuitive through visualization and descent:
- A grid search can miss minima when coarse or become slow when excessively fine. section 5.1.1
- Gradient descent follows the negative gradient, using line search and convergence checks to approach one local minimum. section 5.1.1
A concrete descent run
Implement the Branin function and its gradient, start at [-4, -5], and record the path. The trajectory converges to one minimum, zigzagging with smaller steps near the solution.
