Biased Monte Carlo optimization: the basic approach