Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;--------------------------------------------------------
- ; This one starts the player on table1, makes them climb off, then walks over to table2, and climb up.
- (def world2
- '#{(connects G1 G2)
- (connects G2 G1)
- (connects G2 G3)
- (connects G3 G2)
- (connects G3 G4)
- (connects G4 G3)
- (connects G4 G5)
- (connects G5 G4)
- (on table1 G1)
- (on table2 G3)
- (platform table1)
- (platform table2)
- (climbable table1)
- (climbable table2)
- (agent R)
- })
- (def state2
- '#{(on R table1)
- })
- (def ops
- '{move {:pre ((agent ?agent)
- (at ?agent ?p1)
- (connects ?p1 ?p2))
- :add ((at ?agent ?p2))
- :del ((at ?agent ?p1))
- :txt (move ?p1 to ?p2)
- :cmd [move ?p2]
- }
- climb-on {:pre ((agent ?agent)
- (at ?agent ?place)
- (on ?platform ?place)
- (climbable ?platform))
- :del ((at ?agent ?place))
- :add ((on ?agent ?platform))
- :txt (climb-on ?platform)
- :cmd [on ?agent ?platform]
- }
- climb-off {:pre ((agent ?agent)
- (on ?agent ?platform)
- (on ?platform ?place))
- :del ((on ?agent ?platform))
- :add ((at ?agent ?place))
- :txt (climb-off from ?platform)
- :cmd [climb-off from ?platform]
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement