Static Line Search

Static line search is the simplest form of line search in which the guess for $\alpha$ is always just a fixed value. In the following we demonstrate how to use this line search.

Example

We show how to use linesearches in SimpleSolvers to solve a simple toy problem:

x = [1., 0., 0.]
f = x -> sum(x .^ 3 / 6 + x .^ 2 / 2)
obj = OptimizerProblem(f, x)

α = .1
sl = Static(α)

SimpleSolvers contains a function SimpleSolvers.linesearch_problem that allocates a SimpleSolvers.LinesearchProblem that only depends on $\alpha$:

cache = NewtonOptimizerCache(x)
state = NewtonOptimizerState(x)
grad = GradientAutodiff{Float64}(obj.F, length(x))
update!(cache, state, grad, x)
x₂ = [.9, 0., 0.]
update!(cache, state, grad, x₂)
value!(obj, x₂)
gradient!(obj, grad, x₂)
ls_obj = linesearch_problem(obj, grad, cache, state)

We now use this to compute a static line search[1]:

ls = LinesearchState(sl)
ls(ls_obj, α)
0.1
Info

We note that for the static line search we always just return $\alpha$.