Hey list,
I've toyed with an implementation of a solution to the Tower of Hanoi
problem in Pd. It ended up being too simple once i skipped trying to
use the recursive algorithm that normally is used to solve the
problem. Instead i've used an iterative algorithm that uses a binary
representation of each move, and from that the disk number being
moved, from where it's moved and where to, is fairly simply
calculations using the bitwise operators that ships with Pd ( - which
I thought i was gonna implement that first, but no).
See for example the wikipedia entry on the topic for more info.
Attached is the patch, made as an abstraction, and a help file that
demonstrate it.
Any comment is very welcome!
Best, Steffen
will have a look now, but wikipedia says it takes 561 billion years to get a solution.
you may never see me again!