Top Spin (revisited)

In a (much) earlier post of mine, I discussed a puzzle called Top Spin (once made by Binary Arts), in which 20 beads were placed on an oval track with a turntable that could flip the four beads that occupy it. I showed that it was possible to reverse the order of the beads, from [1, 2, 3, ..., 19, 20] to [20, 19, ..., 2, 1], even if the beads were placed on a straight track instead of an oval one.
However, recently I wanted to find create a more general solver that could correctly orient any permutation of the beads, not just the reversed order. Obviously, relying on the circular nature of the actual Top Spin puzzle would be required. Furthermore, while I doubt a perfect solver that always solved each permutation of the puzzle would be achievable, I still wanted to make something that was reasonably efficient.