In this paper we introduce an algorithm for approximatinga function by means of local models. We assumethat the data arrives pattern-by-pattern. Theshapes and locations of receptive fields are changedin an adaptive manner. With each pattern not onlymodel equations are updated but also the regions forwhich each model contributes significantly to theforecast. This error-dependent step is based on competition:models with worse forecasts in the long termretire in favour of superior models. Areas with highererrors attract models, so there is a tendency to balancelocal errors. We assume that the distribution of inputvectors is known and therefore we use a fixed numberof models, distributed randomly according to theknown distribution during the initialisation phase. Althoughour algorithm was developed in the frameworkof continuous learning an even betterperformance can be achieved by presenting the patternsrepeatedly. The learning capabilities are demonstratedby means of an example.