From: zadkiel
Subject: How to solve hanoi tower ?
Date: 
Message-ID: <8tmr3g$jed$1@gemini.ntu.edu.tw>
Hi every !
I have trouble to solve the hanoi tower problem.
can anyone help me ?
---------------------------
Jess>  <== f-1 (move-a-stack (size 3) (from 1) (to 3) (other-peg-being 2)
(in-state 0))
 ==> f-2 (move-a-stack (size 2) (from 2) (to 3) (other-peg-being 1)
(in-state 1))
 ==> f-3 (move-a-stack (size 1) (from 1) (to 3) (other-peg-being 2)
(in-state 1))
 ==> f-4 (move-a-stack (size 2) (from 1) (to 2) (other-peg-being 3)
(in-state 1))
 <== f-4 (move-a-stack (size 2) (from 1) (to 2) (other-peg-being 3)
(in-state 1))
 ==> f-5 (move-a-stack (size 1) (from 3) (to 2) (other-peg-being 1)
(in-state 2))
 ==> f-6 (move-a-stack (size 1) (from 1) (to 2) (other-peg-being 3)
(in-state 2))
 ==> f-7 (move-a-stack (size 1) (from 1) (to 3) (other-peg-being 2)
(in-state 2))
Move from peg 1 to peg 3
 <== f-7 (move-a-stack (size 1) (from 1) (to 3) (other-peg-being 2)
(in-state 2))
Move from peg 1 to peg 2
 <== f-6 (move-a-stack (size 1) (from 1) (to 2) (other-peg-being 3)
(in-state 2))
Move from peg 3 to peg 2
 <== f-5 (move-a-stack (size 1) (from 3) (to 2) (other-peg-being 1)
(in-state 2))
Move from peg 1 to peg 3
 <== f-3 (move-a-stack (size 1) (from 1) (to 3) (other-peg-being 2)
(in-state 1))
 <== f-2 (move-a-stack (size 2) (from 2) (to 3) (other-peg-being 1)
(in-state 1))
 ==> f-8 (move-a-stack (size 1) (from 1) (to 3) (other-peg-being 2)
(in-state 2))
 ==> f-9 (move-a-stack (size 1) (from 2) (to 3) (other-peg-being 1)
(in-state 2))
 ==> f-10 (move-a-stack (size 1) (from 2) (to 1) (other-peg-being 3)
(in-state 2))
Move from peg 2 to peg 1
 <== f-10 (move-a-stack (size 1) (from 2) (to 1) (other-peg-being 3)
(in-state 2))
Move from peg 2 to peg 3
 <== f-9 (move-a-stack (size 1) (from 2) (to 3) (other-peg-being 1)
(in-state 2))
Move from peg 1 to peg 3
 <== f-8 (move-a-stack (size 1) (from 1) (to 3) (other-peg-being 2)
(in-state 2))
10
Jess> EOF
Jess>
From: glauber
Subject: Re: How to solve hanoi tower ?
Date: 
Message-ID: <8tn5ke$7iv$1@nnrp1.deja.com>
In article <············@gemini.ntu.edu.tw>,
  "zadkiel" <·······@pchome.com.tw> wrote:
> Hi every !
> I have trouble to solve the hanoi tower problem.
> can anyone help me ?


Emacs comes with one.

--
Glauber Ribeiro
··········@my-deja.com    http://www.myvehiclehistoryreport.com
"Opinions stated are my own and not representative of Experian"


Sent via Deja.com http://www.deja.com/
Before you buy.