The Tower of Hanoi routinization

Initially, a search would take place, resulting in moving disk 1 from peg 1 to peg 2. If this is repeated and reinforced, then a routine form could be developed by the basal ganglia:
move(Disk,Peg,Peg2) -> [get_disk(1,1),get_target(2), move_disk(1,2)]
i.e. the basal ganglia would generate these codes in turn and send them to the planning module.

There could also be an oculomotor routines; by look_for(Disk,disk) we mean a description which is sent to parietal and FEF areas to generate a saccade to a given object and to recognize if it is a disk or not:
look_for(Disk) -> [lookfor(1),recognize(1,disk)]
top_disk(Disk,Peg) -> [top_disk(1,1)]
look_for(Peg2,peg) -> [lookfor(2),recognize(2,peg)]
There could also be a sensorimotor routine; by move(Disk,Peg2) we mean a description sent to premotor cortex to generate a physical movement:
move(Disk,Peg2) -> [move(1,2)]

Then when the working goal wg(move(Disk,Peg,Peg2)) is activated in the initial context, the basal ganglia would generate the sequence.
The cortical mechanism would compare the two possible choices (creative) get_disk(Disk,Peg) (routine) get_disk(1,1) and would choose the latter.
When the latter is complete, the cortical mechanism would sequence to the next action, i.e., get_target_peg(Peg2) or get_target_peg(2), and so on.

There will be different levels of routinization. The one illustrated here is the choice of a subset or a single individual from alternatives. A further level is to eliminate checks, so get_disk(1,1) would not be visually checked, or checked in episodic memory as not just moved.
Eventually, one could reach a fully routinized form move(Disk,Peg,Peg2) -> move(1,2) without any checks.