https://www.youtube.com/watch?v=-exdu4ETscs&t=13m6s
Advertisements appeal to characters based on their current motivations (feelings, hunger, etc), their distance from the object, their relationship with the object (so you prefer to sleep in your own bed), and SimAntics scoring functions that can perform arbitrary calculations.
Then it shows how all that works together in the "Food Chain", a complex Rube Goldberg device comprised of many different objects, that compels characters to perform the many sequential steps required to prepare and eat food (when then compels them to poop, which makes them need a shower, which makes them tired, and so on).
The main loop of the "autonomy" algorithm that decides what to do next (if you don't tell them what to do) searches for the top several advertisements with the highest score, and then chooses randomly between them. If they always chose the top scoring best thing to do, then their lives would be too mechanically optimized, lacking in whimsey and spontaneity, and anything the user told them to do would deviate from the optimal path, making their lives less efficient, more miserable.
So for better game play and happier users, we randomly dumbed them down a bit so they needed the user's guidance to have a better life (but we didn't make them so dumb that users couldn't fuck up their lives even more, either).