I have seen these in stores as "executive toys", where a small moving object is moved by a hidden electromagnetic circuit, and assumed there was a simple permanent magnet being moved by a hidden coil, which is alternatively switched on and off. I realise it is not "perpetual motion". If the coil was energised, say, every two seconds - just on and off, wouldn't this set up an oscillation in the swing, causing it to fall into step and rock back and forth, without any additional sensing circuit?