BasinHopping

Data & Analytics

Tuning basin-hopping step size on a test function

Step size decides whether basin-hopping explores or merely shuffles in place. This guide shows a practical way to choose it, using a bumpy test function and a few repeated runs.

Step one: set a fair test and baseline — BasinHoppingBasinHoppingWordmarkShapeIdentity

01

Step one: set a fair test and baseline

Pick a function with many local minima, such as a two-dimensional Rastrigin surface, and note its known global minimum. Fix the starting point, temperature and number of hops so runs can be compared. Begin with a step size of about one tenth of the search range. Run it with several random seeds, because a single lucky run proves nothing. Record the best value found, how many hops it took to reach it and the acceptance rate. This baseline turns tuning into measurement instead of guesswork, and it gives you a reference when later adjustments seem to help.

Step two: read acceptance rate and adjust — BasinHoppingBasinHoppingProductDescriptorContext

02

Step two: read acceptance rate and adjust

Acceptance rate is the quickest signal. If nearly every hop is accepted and the best value barely improves, the steps are probably too small to leave a basin. If almost none are accepted, the steps may be landing on high ridges. Many practitioners aim for a middle band, often around half, though the right figure depends on the problem. Try step sizes at half and double the baseline, keeping everything else unchanged. Change one setting at a time so the cause of any difference stays clear. Write each result beside its seed so patterns across runs are visible.

Step three: confirm with a worked comparison — BasinHoppingBasinHoppingDomainHandleDocument

03

Step three: confirm with a worked comparison

Suppose your range is minus five to five and the baseline step is one. Run twenty seeds at steps of 0.5, 1 and 2, each for two hundred hops. Count how many seeds reach within a small tolerance of the global minimum. Perhaps step 0.5 finds it in a few runs, step 1 in more, and step 2 in fewer because jumps overshoot. Choose the best performer, then test it on a slightly different function to check it holds. Keep the table and plots, since they document why the setting was chosen and make later reruns easier.

basinhopping.com

Explore BasinHopping

Held for potential development. Acquisition inquiries may be considered.

Domain options ↗