**Grid search **methodically evaluates a model for each combination of hyperparameters specified in a grid
**Random search** samples each set of hyperparameters from a distribution over possible parameter values.

Source: [Bergstra et al. (2012)](http://jmlr.csail.mit.edu/papers/volume13/bergstra12a/bergstra12a.pdf)
In the above famous diagram by James Bergstra and Yoshua Bengio in their [2012 paper](http://jmlr.csail.mit.edu/papers/volume13/bergstra12a/bergstra12a.pdf), we see grid search on the left and random search on the right, both with nine trials (black dots) and two parameters.
The green area above each square shows **the gain in function by changing the values of the important parameter **and the yellow area left of each square shows the gain attributed to the unimportant parameter.
The diagram illustrated that **random search is likely to more thoroughly explore the parameter space and lead to discovery of more optimal settings**.