Added code and tests to implement Random Search (Algorithm 2.2.1)