?-
#move(3,left,right,center)
move top disk from left to right
move top disk from left to center
move top disk from right to center
move top disk from left to right
move top disk from center to left
move top disk from center to right
move top disk from left to right
-> ( ) := 1.00 (0.013) 1
move {
(1,:X,:Y,_) :- console.puts("move top disk from ",:X," to ",:Y);
(:N ?[gt(1)],:X,:Y,:Z) :- sub(:N,1,:M), #move(:M,:X,:Z,:Y), #move(1,:X,:Y,_), #move(:M,:Z,:Y,:X);
}