In The Sims, the characters are deliberately not very smart. The intelligence lives in the furniture. As Kenneth Forbus and Will Wright describe in their notes on programming Sims objects, every object carries “a set of advertisements that describe its properties in terms of what need(s) of a Sim it will satisfy,” and “Sims choose what to do by selecting, from all of the possible behaviors in all of the objects, the behavior that maximizes their current happiness.”
So a hungry Sim does not reason about cooking; the refrigerator advertises that it can reduce hunger, the Sim compares that advertised payoff against everything else in range, and picks the most appealing option. The chosen object then runs its own behavior code on the Sim. This object-advertises-needs design is what let Maxis keep adding new interactive items without rewriting the characters’ brains.