Trust and reputation for agent societies