I would suggest restricting the possible moves more to reduce trial and error. And try speeding up the rotation speed, or generally reduce the time between moves. It is very satisfying to have the pipe slot into place so you're on the right track.
Thanks!