Advertisement
Guest User

Untitled

a guest
May 18th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;--------------------------------------------------------
  2. ; This one starts the player on table1, makes them climb off, then walks over to table2, and climb up.
  3.  
  4. (def world2
  5.   '#{(connects G1 G2)
  6.      (connects G2 G1)
  7.      (connects G2 G3)
  8.      (connects G3 G2)
  9.      (connects G3 G4)
  10.      (connects G4 G3)
  11.      (connects G4 G5)
  12.      (connects G5 G4)
  13.      (on table1 G1)
  14.      (on table2 G3)
  15.      (platform table1)
  16.      (platform table2)
  17.      (climbable table1)
  18.      (climbable table2)
  19.      (agent R)
  20.      })
  21.  
  22. (def state2
  23.   '#{(on R table1)
  24.      })
  25.  
  26. (def ops
  27.   '{move     {:pre ((agent ?agent)
  28.                      (at ?agent ?p1)
  29.                      (connects ?p1 ?p2))
  30.  
  31.               :add ((at ?agent ?p2))
  32.               :del ((at ?agent ?p1))
  33.               :txt (move ?p1 to ?p2)
  34.               :cmd [move ?p2]
  35.               }
  36.  
  37.     climb-on {:pre ((agent ?agent)
  38.                      (at ?agent ?place)
  39.                      (on ?platform ?place)
  40.                      (climbable ?platform))
  41.               :del ((at ?agent ?place))
  42.               :add ((on ?agent ?platform))
  43.               :txt (climb-on ?platform)
  44.               :cmd [on ?agent ?platform]
  45.               }
  46.  
  47.     climb-off {:pre ((agent ?agent)
  48.                       (on ?agent ?platform)
  49.                       (on ?platform ?place))
  50.                :del ((on ?agent ?platform))
  51.                :add ((at ?agent ?place))
  52.                :txt (climb-off from ?platform)
  53.                :cmd [climb-off from ?platform]
  54.                }
  55.     })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement