  A major limitations for many heat engines is that their functioning demands
on-line control, and/or an external fitting between environmental parameters
(e.g. temperatures of thermal baths) and internal parameters of the engine. We
study a model for an adaptive heat engine, where---due to feedback from the
functional part---the engine's structure adapts to given thermal baths. Hence
no on-line control and no external fitting are needed. The engine can employ
unknown resources, it can also adapt to results of its own functioning that
makes the bath temperatures closer. We determine thermodynamic costs of
adaptation and relate them to the prior information available about the
environment. We also discuss informational constraints on the
structure-function interaction that are necessary for adaptation.
