Image for local optima

local optima

A local optimum is a solution that is better than all nearby options, but not necessarily the best overall. Imagine hiking in a hilly landscape: you might reach a peak that’s higher than the surrounding hills, but there could be a taller mountain elsewhere. In optimization problems, seeking the best overall solution (the global optimum) can be tricky, and the search might get stuck at a local optimum—an "impressive" peak that isn’t the highest point overall. Recognizing local optima helps in designing strategies to find the best possible solution, not just a good one nearby.