Text this: Application of reinforcement learning to wireless sensor networks: models and algorithms