A thermodynamic machine (1,111) of a Stirling cycle type, the machine being operable as a heat engine and/or a heat pump, the machine comprising: an expansion cylinder defining an expansion chamber, a compression cylinder defining a compression chamber and respective pistons (7,8) reciprocally movable in the cylinders (10,11) during operation of the machine (1,111); a regenerator disposed between and in communication with the expansion and compression chambers, wherein the regenerator comprises a regenerator chamber; a first heat exchanger in communication with the expansion chamber and the said regenerator chamber and a second heat exchanger in communication with the compression chamber and the said regenerator chamber; a first bypass conduit connecting the expansion chamber with the said regenerator chamber bypassing the first heat exchanger and a second bypass conduit connecting the compression chamber with the said regenerator chamber bypassing the second heat exchanger; wherein the machine (1,111) comprises at least a pair of valves (18,20,22,24); one valve (18,20) being provided between the expansion chamber and the first heat exchanger or between the said regenerator chamber and the first heat exchanger or in the first bypass conduit between the expansion chamber and the said regenerator chamber; and the other valve (22,24) being provided between the compression chamber and the second heat exchanger or between the said regenerator chamber and the second heat exchanger or in the second bypass conduit between the compression chamber and the said regenerator chamber; and wherein at least one of the pair of valves (18,20,22,24) is capable of being controllable at least once during each cycle of the thermodynamic machine (1,111); the thermodynamic machine being characterised in that it is arranged such that substantially the whole volume of a working fluid will pass through said regenerator chamber twice, once in a first direction and once in a second, reverse, direction, during a single cycle of the thermodynamic machine (1,111); wherein the said regenerator chamber comprises a thermal storage medium, and the said regenerator chamber is adapted to intermittently store heat from a relatively hot working fluid in said thermal storage medium as the relatively hot working fluid contacts said thermal storage medium as it passes through said regenerator chamber in said first direction, and the said regenerator chamber is adapted to intermittently transfer heat from the said thermal storage medium to a relatively cold working fluid as the relatively cold working fluid contacts said thermal storage medium as it passes through said regenerator chamber in said second, reverse, direction. an expansion cylinder defining an expansion chamber, a compression cylinder defining a compression chamber and respective pistons (7,8) reciprocally movable in the cylinders (10,11) during operation of the machine (1,111); a regenerator disposed between and in communication with the expansion and compression chambers, wherein the regenerator comprises a regenerator chamber; a first heat exchanger in communication with the expansion chamber and the said regenerator chamber and a second heat exchanger in communication with the compression chamber and the said regenerator chamber; a first bypass conduit connecting the expansion chamber with the said regenerator chamber bypassing the first heat exchanger and a second bypass conduit connecting the compression chamber with the said regenerator chamber bypassing the second heat exchanger; wherein the machine (1,111) comprises at least a pair of valves (18,20,22,24); one valve (18,20) being provided between the expansion chamber and the first heat exchanger or between the said regenerator chamber and the first heat exchanger or in the first bypass conduit between the expansion chamber and the said regenerator chamber; and the other valve (22,24) being provided between the compression chamber and the second heat exchanger or between the said regenerator chamber and the second heat exchanger or in the second bypass conduit between the compression chamber and the said regenerator chamber; and wherein at least one of the pair of valves (18,20,22,24) is capable of being controllable at least once during each cycle of the thermodynamic machine (1,111); the thermodynamic machine being characterised in that it is arranged such that substantially the whole volume of a working fluid will pass through said regenerator chamber twice, once in a first direction and once in a second, reverse, direction, during a single cycle of the thermodynamic machine (1,111); wherein the said regenerator chamber comprises a thermal storage medium, and the said regenerator chamber is adapted to intermittently store heat from a relatively hot working fluid in said thermal storage medium as the relatively hot working fluid contacts said thermal storage medium as it passes through said regenerator chamber in said first direction, and the said regenerator chamber is adapted to intermittently transfer heat from the said thermal storage medium to a relatively cold working fluid as the relatively cold working fluid contacts said thermal storage medium as it passes through said regenerator chamber in said second, reverse, direction.