Heat engine with a heat source, an expansion machine, a condenser, a condensate collection container, a working medium pump, an evaporator, a first container for heat transfer medium, a second container for heat transfer medium, a first pump for heat transfer medium, a second pump for heat transfer medium, a first valve, a second valve, a third valve and a fourth valve, wherein the heat engine is set up so that, during operation of the heat engine, the first container, in a first mode of operation of the heat engine, hydraulically is connected via the first valve and the first pump to the heat source and, in a second operating mode of the heat engine, is connected to the evaporator via the second valve and the second pump, wherein in the first mode of operation of the heat engine when the container is connected to the heat source, warmer heat transfer medium is filled from the heat source into the first container at the top and colder heat transfer medium is removed from the lower area of the container and is returned to the heat source and in the second operating mode of the heat engine, when the container is connected to the evaporator, warmer heat transfer medium is removed from the upper region of the first container, is passed into the evaporator and from the evaporator by means of the second pump is pumped into the lower area of the first container, wherein the second container, in the second operating mode of the heat engine, hydraulically is connected via the third valve and the first pump to the heat source and, in the first operating mode of the heat engine, the second container is connected via the fourth valve and the second pump is connected to the evaporator, wherein, in the second operating mode of the heat engine, when the second container is connected to the heat source, warmer heat transfer medium from the heat source is filled into the second container at the top and colder heat transfer medium in the lower region of the second container is removed and returned to the heat source and, in the first mode of operation of the heat engine, when the second container is connected to the evaporator, warmer heat transfer medium is removed from the upper region of the second container, passed into the evaporator and from the evaporator is pumped into the lower area of the second container by means of the second pump, wherein the heat engine is set up so that when the heat engine is in operation, one of the first and second containers (1a, 1b) is connected to the heat source and the other of the first or second containers (1a, 1b) is connected to the evaporator so that evaporation energy is transferred either from one or the other of the first and second containers to the evaporator and the expansion machine is continuously supplied with steam during operation of the heat engine and the container connection to the heat source and evaporator during operation of the heat engine, after some time by means of valves (19, 20, 21, 22) is interchangeable. wherein the heat engine is set up so that, during operation of the heat engine, the first container, in a first mode of operation of the heat engine, hydraulically is connected via the first valve and the first pump to the heat source and, in a second operating mode of the heat engine, is connected to the evaporator via the second valve and the second pump, wherein in the first mode of operation of the heat engine when the container is connected to the heat source, warmer heat transfer medium is filled from the heat source into the first container at the top and colder heat transfer medium is removed from the lower area of the container and is returned to the heat source and in the second operating mode of the heat engine, when the container is connected to the evaporator, warmer heat transfer medium is removed from the upper region of the first container, is passed into the evaporator and from the evaporator by means of the second pump is pumped into the lower area of the first container, wherein the second container, in the second operating mode of the heat engine, hydraulically is connected via the third valve and the first pump to the heat source and, in the first operating mode of the heat engine, the second container is connected via the fourth valve and the second pump is connected to the evaporator, wherein, in the second operating mode of the heat engine, when the second container is connected to the heat source, warmer heat transfer medium from the heat source is filled into the second container at the top and colder heat transfer medium in the lower region of the second container is removed and returned to the heat source and, in the first mode of operation of the heat engine, when the second container is connected to the evaporator, warmer heat transfer medium is removed from the upper region of the second container, passed into the evaporator and from the evaporator is pumped into the lower area of the second container by means of the second pump, wherein the heat engine is set up so that when the heat engine is in operation, one of the first and second containers (1a, 1b) is connected to the heat source and the other of the first or second containers (1a, 1b) is connected to the evaporator so that evaporation energy is transferred either from one or the other of the first and second containers to the evaporator and the expansion machine is continuously supplied with steam during operation of the heat engine and the container connection to the heat source and evaporator during operation of the heat engine, after some time by means of valves (19, 20, 21, 22) is interchangeable.