his article is concerned with the weather compensated heating of buildings by means of air-to-water heat pumps. A novel adaptive method is proposed for on-line optimization of the heating curve that defines the relation between the heating temperature and the outdoor temperature. Parametrization of the linear heating curve with two reference points is presented, with the aim of providing good tracking of the desired indoor temperature by adaptively adjusting the reference points of the heating curve. Two adaptation strategies are investigated, and a wide range of adaptation constants is explored. The use of these methods is demonstrated on two different buildings, simulated in Transient System Simulation Tool (TRNSYS). The simulation model was validated on a reference building. The results of adaptive optimization show good performance, which is comparable to and even better than the performance based on referential optimal static heating curves.