Neuromodulated networks for lifelong learning and adaptation