Let me guess what you do for the Inverse Kinematics:

You change angels of the joints "randomly", and continue, or reverse the movement
given that the "hand" is getting closer to the target position?
This way you reach the target, without the need
to calculate the correct movment at the beginning.