Same budget, two ways to spend it

Both searches get exactly the same number of trials. The shaded region is where the settings are good. Press play for a fresh problem — then ask what happens when the second dial turns out not to matter.

Trials each search may spend
Which dials actually matter?

Grid search

distinct values tried on the dial that matters
best score found

Random search

distinct values tried on the dial that matters
best score found
Over 0 problems at this setting, random search came out ahead of the time.

A grid of n trials only ever probes √n different values of any one dial — it spends the rest of its budget repeating them. Random search spends every trial on a new value of every dial.