In order for this statement to be true, you must also have perfect knowledge: something that is unachievable in most circumstances. Getting trapped in a local-optimal solution is perfectly possible if you are blindly following stochastic decent along a gradient: as it is too with life... getting trapped like this looks like being in the situation where there is no rational action (only irrational ones) that (eventually) lead to anything other that that status quo. a local optimum is where you have to do increasingly (in proportion to the level of optimization) non-positive actions to escape (likely to another local-optimal).