Rules for computing happiness