working onQ-learning for the worker