an adequately corresponding decrease in the objective function. The condition is fulfilled, see , if This condition, when used appropriately as part of a line search, can ensure that the step size is not excessively large. However, this condition is not sufficient on its own to ensure that the step size is nearly optimal, since any value of that is sufficiently small will satisfy the condition. Thus, the backtracking line search strategy starts with a relatively large step size, and repeatedly shrinks it by a factor until the Armijo–Goldstein condition is fulfilled. The search will terminate after a finite number of steps for any positive values of and that are less than 1. For example, Armijo used for both and in . Algorithm This condition is from . Starting with a maximum candidate step size value , using search control parameters and , the backtracking line search algorithm can be expressed as follows: Set and iteration counter . Until the condition is satisfied that repeatedly increment and set Return as the solution. In other words, reduce by a factor of in each iteration until the Armijo–Goldstein condition is fulfilled. Function minimization using backtracking line search in practice In practice, the above algorithm is typically iterated to produce a sequence , , to converge to a minimum, provided such a minimum exists and is selected appropriately in each step. For gradient descent, is selected as . The value of for the that fulfills the Armijo–Goldstein condition depends on and , and is thus denoted below by . It also depends on , , and of course, although these dependencies can be left implicit if they are assumed to be fixed with respect to the optimization problem. The detailed steps are thus, see , : Choose an initial starting point and set the iteration counter . Until some stopping condition is satisfied, choose a descent direction , increment , and update the position to . Return as the minimizing position and as the function minimum. To assure good behavior, it is necessary that some conditions must be satisfied by . Roughly speaking should not be too far away from . A precise version is as follows (see e.g. ). There are constants so that the following two conditions are satisfied: For all n, . Here, is the Euclidean norm of . (This assures that if , then also . More generally, if