Stochastic Search with an Observable State Variable