Training AI Scientists to Replicate Research