Reinforcement learning for adaptive cognitive orthotics