I've been looking at this one for some time... (18+ months or so) which is how I found the links from Livermore, Sandia and Los Alamos national labs... a strange type of fuel injection computer/controller would control spark - the piston travel obviously would slow with the compression, however, depending on idling frequency (60 HZ or a multiple thereof perhaps?) a combination of compression and detonation/spark advance would reverse the piston assembly.

A start capacitor discharged backwards through the power coil would be the initial compression stroke, making the magnetic slug act as a solenoid.

Main inefficiencies were due to thermal/resistive losses in the coil and the strength/isolation of the magnet - they were playing with superconducting windings and liquid nitrogen, but when you're a physicist employed by a think tank, WTF...