object
lbfgs(Problem)
Problem- Problem object implementinglocal_optimization_problem_protocoland defininggradient/2.
L-BFGS (limited-memory Broyden-Fletcher-Goldfarb-Shanno) quasi-Newton local optimizer with backtracking Armijo line search. Requires the problem to define gradient/2. Supports optional box constraints via projection, minimization and maximization.
logtalk_load(local_optimization(loader))static, context_switching_calls
Update: Instead of maintaining a dense inverse-Hessian approximation like
bfgs(_), only the lastmemory_size(M)step/gradient-difference pairs(s, y)are kept, and the search direction is recovered from them with the standard two-loop recursion (Nocedal and Wright, Algorithm 7.4). Memory and per-iteration cost areO(M*n)instead ofbfgs(_)’sO(n^2).Internal minimization form: Maximization is handled by internally minimizing the negated objective and gradient, so the two-loop recursion, curvature test, and Armijo condition are always expressed in minimization form, which avoids sign errors in the line search.
Curvature safeguard: Whenever the curvature condition
y . s > 0is not comfortably satisfied (possible here since the line search only enforces sufficient decrease, not a Wolfe curvature condition), the pair history is cleared and the next step falls back to steepest descent, rather than keeping a stale history that would otherwise keep producing the same near-zero-progress direction.Restarts: The
restart(N)option (off by default) periodically clears the pair history, exactly asbfgs(_)resets its inverse-Hessian approximation to the identity.Bounds: When the problem defines
position_bounds/1, trial points are projected onto the box after each step. Projection can weaken the quasi-Newton model; a pure bound-constrained formulation (L-BFGS-B style) is not implemented.
Public predicates
(no local declarations; see entity ancestors if any)
Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)