Every solution is a position, its quality a height The horizontal axis holds the possible solutions: x can be any number between 0 and 10. The height of a point is the fitness of that solution, how good it is. In this unit we always look for the highest point.
Try one candidate solution x = 3 is a candidate solution. To measure its fitness we ask the function: f(3) = 0.17. This is the only information a search method has; it never sees the whole landscape, only the height of the points it asks about.
Local peaks highest fitness local peak local peak x = 1.50 and x = 4.50 are local peaks. Their fitness is 0.45 and 0.70. Standing on a local peak, one step to either side lowers the height; someone looking only nearby believes they have reached the top.
The global peak highest fitness local peak local peak x = 8, where the flag stands, is the global peak, with fitness 1.00. It is the highest point of the landscape. A method is judged by whether it reaches this point without getting stuck on local peaks.
Trying everywhere, brute force The simplest way is to place 5 evenly spaced candidates and measure the fitness of each. The red dots are these candidates. This works in one dimension, but the number of candidates grows exponentially with the dimension: 10 points per axis in 10 dimensions means 10 billion candidates.
The best of the grid The best of the 5 candidates is x = 7.50, with fitness 0.86. It is 0.14 below the global peak: if the peak falls between two candidates, the grid cannot see it. The methods in the next topics choose where to look instead of trying everywhere.
Smallest and largest are the same job In unit 3 gradient descent made the loss as small as possible. Minimizing a loss is the same as maximizing its negative: turn the loss valley upside down and it becomes a peak. In this unit, when we say fitness, larger is always better.