Text this: Q-learning to develop an IoT network controlled by an agent