Pervasive computing requires infrastructures that adapt to changes in user behaviour while minimising user interactions. Policy-based approaches have been proposed as a means of providing adaptability but, at present, require policy goals and rules to be explicitly defined by users. This paper presents a novel, logic-based approach for automatically learning and updating models of users from their observed behaviour. We show how this task can be accomplished using a nonmonotonic learning system, and we illustrate how the approach can be exploited within a pervasive computing framework.