I'm doing a program for my robot arm to build the tower of Hanoi. I got the algorithm working on a standing tower (replacing the tower to a different place using only 3 locations).
Locations: A, B, C
Pieces: 5
I'd like to build up the tower step-by-step (I'll place a piece on location C, the arm places the piece onto/into the tower on location A). The code is working if the current piece goes on top.
Question: Is there a (recursive) algorithm to place a piece into the tower using only 3 places (A is the current tower, C is the new piece, B empty)?
EDIT: I'm not trying to build the tower on a different place. I'm asking for an algorithm, that could place a piece on C into the tower on A (let's say tower is 5-3-2-1 and I place the final '4' piece on C. The algorithm should place it into the right place for it to become 5-4-3-2-1).