Changed the sample to return a (reward, state) pair.