Text this: Learning to maximize reward rate: a model based on semi-Markov decision processes