Advertisement
logicmoo

Untitled

Jan 14th, 2019
1,996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tCol(ttAbstractType).
  2. tCol(ttSpatialType).
  3. tCol(vtActionTemplate).
  4. tSet(tCol).
  5. tSet(tContainer).
  6. tSet(tFunction).
  7. tSet(tObj).
  8.  
  9. disjointWith(Sub, Super) ==> disjointWith( Super, Sub).
  10. disjointWith(tObj,tRegion).
  11. disjointWith(ttSpatialType,ttAbstractType).
  12.  
  13.  
  14. argIsa(apathFn,1,tRegion).
  15. argIsa(apathFn,2,vtDirection).
  16. argIsa(localityOfObject,1,tObj).
  17. argIsa(localityOfObject,2,tSpatialThing).
  18. argIsa(mudColor,1,tObj).
  19. argIsa(mudColor,2,vtColor).
  20. argIsa(mudFacing,1,tObj).
  21. argIsa(mudFacing,2,vtDirection).
  22. argIsa(aDirectionsFn,2,ftListFn(vtDirection)).
  23.  
  24. % create pathway objects and place them in world
  25. (pathDirLeadsTo(Region,Dir,R2),  
  26.  mudExitAtLoc(Region,Dir,LOC),
  27.  Obj = apathFn(Region,Dir)) ==>  
  28.    (tPathway(Obj),localityOfObject(Obj,Region),mudAtLoc(Obj,LOC)).
  29.  
  30. % objects are placed by default in center of region
  31. ((spatialInRegion(Obj), inRegion(Obj,Region),
  32.  \+ tPathway(Obj), \+ mudAtLoc(Obj,xyzFn(Region,_,_,_))),
  33.   {in_grid_rnd(Region,LOC)})
  34.   ==>
  35.    mudAtLoc(Obj,LOC)).
  36.  
  37.  
  38. % objects cannot be in two localities (Regions?) at once
  39. ((spatialInRegion(Obj),localityOfObject(Obj,NewLoc),
  40.   localityOfObject(Obj,OldLoc), OldLoc\==NewLoc))
  41.   ==>
  42.   ~localityOfObject(Obj,OldLoc)).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement