Disclaimer: The story told within this question is entirely fictional, and invented solely for the purpose of providing an intro.
My boss has gotten a new toy robot, and he wants me to help program it. He wants to be able to enter simple arrow instructions to get it to move. These instructions are: ^ (for move forward) < (for turn left), and > (for turn right). However, now that I've programmed the robot, he wants additional functionality. He wants me to transform any sequence of arrows he inputs, so that rather than having the robot take the path indicated, it moves to the desired location, indicated by the place it would end up if it had taken the inputted path, as efficiently as possible. I appeal to you, the members of PP&CG, to help me with this task.
Write a program or function to convert a string made up of arrows into a string that will get to the location indicated by the input as quickly as possible. Turning takes exactly as long as moving backwards or forwards.
A string of arrows, as indicated above. If you wish, different characters may be substituted for the arrows, but be sure to include the fact that you do so in your answer. All test cases use the arrows normally.
A string of arrows (or your equivalent characters), that take the robot to the desired destination as efficiently as possible.
Note that the solutions offered are only possibilities, and that other solutions may be valid.
>^<<^^>^^ -> ^^<^ ^^^^>^^^^ -> ^^^^>^^^^ >>>^^^^^^ -> <^^^^^^ >^>^>^>^ -> (empty string) ^<^^<^^<^^^^ -> >^^>^
The robot's memory is limited, so your program must have the lowest byte count possible.