With reinforcement learning positive rewards are assigned for positive outcomes (a “carrot”) and negative rewards are assigned for negative outcomes (a “stick”).
The model is trained to maximize the expected rewards per decision. I’d say this is fairly analogous to desire.
I’ve written an introduction to reinforcement learning here: https://improve.ai/reinforcement-learning/