Autonomics or self-reorganization becomes pertinent for websites serving a large number of users with highly varying workloads. An important component of self-adaptation is to model the behaviour of users and adapt accordingly. This paper proposes a learning-automata based technique for model discovery. User access patterns are used to construct an FSM model of user behaviour that in turn is used for prediction and prefetching. The proposed technique uses a generalization algorithm to classify behaviour patterns into a small number of generalized classes. It has been tested on both synthetic and live data-sets and has shown a prediction hit-rate of up to 89% on a real web-site. Categories and Subject Descriptors: I.2.6 Computing methodologies Artificial Intelligence [Learning], I.5.1 Computing methodologies Pattern Recognition [Models]