Szilards Engine, modeled after a machine described in 1929 by Leo Szilard, seems to convert heat from its surroundings into work, contrary to the second law.
That means no energy is require.
But what is the source of this heat? See also
Moving the piston requires no work, since it compresses empty space.
To all it compressesion is a little doubtfull. The more important issue is to undo this requires a lot of work (energy)
(The one-molecule gas expands against the pistol.) Energy lost by the molecule as it works against the piston is replaced by heat from the environment.
This involves energy. This is an irreversible operation.
When the piston has returned to its original position(7), the memory is erased (8) and the cycle can begin again