Write a backtracking line search for the Rosenbrock function
PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Scientific programming for physicists · Scientific programming for physicists
Scientific Computing for Physicists, Ch Minimisation with guarantees, with constraints and with randomness
Problem
Write a backtracking line search for the Rosenbrock function f(x,y)=(1−x)2+100(y−x2)2. Given the current point x and a direction d, it tries α=1, halves α while the Armijo condition with c1=10−4 fails, and returns the first α accepted. It evaluates f(x) and ∇f(x)⋅d once per call, and stops with an error after 50 halvings.
((a)) By hand, take one steepest-descent step, d=−∇f, with this search from (0,0). Give the number of halvings, the accepted α and the new value of f.
((b)) Run steepest descent with your routine for 1000 iterations from (−1.2,1). Give f at the end and the total number of halvings over the run, and compare the cost with the 22 iterations Newton's method needs from the same start.
((c)) Pass your routine the uphill direction d=+∇f at (−1.2,1) with the cap removed. What does it return, and why is the cap needed?