2D Peak Finder

Legend

= The algorithm is examining all such highlighted locations to find the best possible value.
= This is the maximum of the locations that the algorithm chose to examine.
= The algorithm is examining the neighbors of a location in an attempt to find a better location.
= The algorithm has found a better neighbor at the highlighted location.
= The highlighted location is the best that the algorithm has seen so far. (Only shown when the algorithm is keeping track of it.)
= The highlighted location is the peak that the algorithm has chosen to return.