Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
tutorials:beginner:high_level_plans [2022/02/25 23:16] – [Writing plans for the TurtleSim] schimpftutorials:beginner:high_level_plans [2022/03/15 13:27] – [Defining inference rules for designators] schimpf
Line 109: Line 109:
  
 (def-fact-group turtle-action-designators (action-grounding) (def-fact-group turtle-action-designators (action-grounding)
-  (<- (desig:action-grounding ?desig (draw-house)) 
-    (desig-prop ?desig (:type :drawing)) 
-    (desig-prop ?desig (:shape :house))) 
  
-  (<- (desig:action-grounding ?desig (draw-simple-shape ?vertices)) +  (<- (desig:action-grounding ?action-designator (navigate ?action-designator)) 
-    (desig-prop ?desig (:type :drawing)) +     (desig-prop ?action-designator (:type :navigating)) 
-    (desig-prop ?desig (:shape :rectangle)) +     (desig-prop ?action-designator (:target ?target))) 
-    (desig-prop ?desig (:width ?width)) +  
-    (desig-prop ?desig (:height ?height)) +  (<(desig:action-grounding ?action-designator (draw-house ?action-designator)) 
-    (lisp-fun get-shape-vertices :rectangle ?width ?height ?vertices))+    (desig-prop ?action-designator (:type :drawing)) 
 +    (desig-prop ?action-designator (:shape :house)))
  
-  (<- (desig:action-grounding ?desig (draw-simple-shape ?vertices)) +  (<- (desig:action-grounding ?action-designator (draw-simple-shape ?resolved-action-designator)) 
-    (desig-prop ?desig (:type :drawing)) +    (desig-prop ?action-designator (:type :drawing)) 
-    (desig-prop ?desig (:shape :triangle)) +    (desig-prop ?action-designator (:shape :rectangle)) 
-    (desig-prop ?desig (:base-width ?base-width)) +    (desig-prop ?action-designator (:width ?width)) 
-    (desig-prop ?desig (:height ?height)) +    (desig-prop ?action-designator (:height ?height)) 
-    (lisp-fun get-shape-vertices :triangle ?base-width ?height ?vertices)) +    (lisp-fun get-shape-vertices :rectangle ?width ?height ?vertices)    
-   +    (desig:designator :action ((:type :drawing) 
-  (<- (desig:action-grounding ?desig (navigate ?target)) +                              (:vertices ?vertices)) 
-    (desig-prop ?desig (:type :navigating)) +                      ?resolved-action-designator)) 
-    (desig-prop ?desig (:target ?target))))+ 
 +  (<- (desig:action-grounding ?action-designator (draw-simple-shape ?resolved-action-designator)) 
 +    (desig-prop ?action-designator (:type :drawing)) 
 +    (desig-prop ?action-designator (:shape :triangle)) 
 +    (desig-prop ?action-designator (:base-width ?base-width)
 +    (desig-prop ?action-designator (:height ?height))     
 +    (lisp-fun get-shape-vertices :triangle ?base-width ?height ?vertices) 
 +    (desig:designator :action ((:type :drawing) 
 +                              (:vertices ?vertices)) 
 +                      ?resolved-action-designator)))
  
 </code> </code>
Line 146: Line 153:
 TUT> (reference (desig:an action (type drawing) (shape rectangle) (width 5) (height 4))) TUT> (reference (desig:an action (type drawing) (shape rectangle) (width 5) (height 4)))
 (DRAW-SIMPLE-SHAPE (DRAW-SIMPLE-SHAPE
- ((3.077953338623047d0 11.088889122009277d0 0) + #<A ACTION 
-  (8.077953338623047d0 11.088889122009277d0 0) +    (TYPE DRAWING) 
-  (8.077953338623047d0 15.088889122009277d0 0) +    (VERTICES ((9.255966663360596d0 10.373946189880371d0 0) 
-  (3.077953338623047d0 15.088889122009277d0 0)))+               (9.255966663360596d0 14.373946189880371d0 0) 
 +               (4.255966663360596d0 14.373946189880371d0 0) 
 +               (4.255966663360596d0 10.373946189880371d0 0)))>)
 TUT> (reference (desig:an action (type drawing) (shape house))) TUT> (reference (desig:an action (type drawing) (shape house)))
-(DRAW-HOUSE)+(DRAW-HOUSE 
 + #<A ACTION 
 +    (TYPE DRAWING) 
 +    (SHAPE HOUSE)>)
 </code> </code>