…people wrote Racket programs to
generate instructions that Michael the Bot could follow.
[under construction for incremental development.
Someday provide the format of the instructions here.]
The aim was to have Michael the Bot move any number of disks…
…while adhering to these rules:
Many of the programs produced seemingly-valid instructions, and we tested one on four disks. But nobody wants to put a few thousand years into a test of 64 disks only to discover that there was an error that ends the universe prematurely.
accept inputs:
simulate following the instructions, checking for rule violations
produce a web page showing the configuration after each instruction, that is, the disks on each tower.
[echo the abbot's request, like "Move 4 disks from Hanoi to HCMC using Da Nang as a spare"]
| config # | configuration | next move: from |
to | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 |
|
Hanoi | Da Nang | |||||||||||||||
| 1 |
|
Hanoi | HCMC | |||||||||||||||
| … | ||||||||||||||||||
| 5 |
|
HCMC | Da Nang | |||||||||||||||
| … |
Listen to the official theme song for erroneous programs,
and especially for Towers of Hanoi instructions: