Skip to content

Commit

Permalink
Towers of Hanoi with 1 disk and with (fixed) 2 disks
Browse files Browse the repository at this point in the history
  • Loading branch information
ikarpov committed Sep 20, 2011
1 parent b1f34bb commit b452edf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions towers1_strips.txt
@@ -0,0 +1,12 @@
Initial state: On(Disk3, Pole1), Clear(Pole2), Clear(Pole3), Smaller(Disk3, Pole1), Clear(Disk3) Smaller(Disk3, Pole2), Smaller(Disk3, Pole3)
Goal state: On(Disk3, Pole3)

Actions:
// Move a disk from source to dest
Move(Disk, Source, Dest)
Preconditions: Clear(Disk), On(Disk, Source), Clear(Dest), Smaller(Disk, Dest)
Postconditions: On(Disk, Dest), !On(Disk, Source), !Clear(Dest), Clear(Source)

//Move(Disk3, Pole1, Pole3)
//Preconditions: Clear(Disk3), On(Disk3, Pole1), Clear(Pole3), Smaller(Disk3, Pole3)
//Postconditions: On(Disk3, Pole3), !On(Disk3, Pole1), !Clear(Pole3), Clear(Pole1)
2 changes: 1 addition & 1 deletion towers2_strips.txt
@@ -1,4 +1,4 @@
Initial state: On(Disk2, Disk3), On(Disk3, Pole1), Clear(Pole2), Clear(Pole3), Smaller(Disk2, Disk3), Smaller(Disk2, Pole1), Smaller(Disk2, Pole2), Smaller(Disk2, Pole3), Smaller(Disk3, Pole1), Smaller(Disk3, Pole2), Smaller(Disk3, Pole3)
Initial state: On(Disk2, Disk3), On(Disk3, Pole1), Clear(Disk2), Clear(Pole2), Clear(Pole3), Smaller(Disk2, Pole1), Smaller(Disk2, Pole2), Smaller(Disk2, Pole3), Smaller(Disk3, Pole1), Smaller(Disk3, Pole2), Smaller(Disk3, Pole3)
Goal state: On(Disk2, Disk3), On(Disk3, Pole3)

Actions:
Expand Down

0 comments on commit b452edf

Please sign in to comment.