The Simulator: Understanding Adaptive Sampling in the Moderate-Confidence Regime