Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorials:beginner:cram_prolog [2016/01/25 11:47] gkazhoyatutorials:beginner:cram_prolog [2022/05/24 09:20] – [Using built-in predicates] schimpf
Line 1: Line 1:
 ====== Using Prolog for reasoning ====== ====== Using Prolog for reasoning ======
  
 +**Description:** In this tutorial you will learn how the Prolog interpreter that we have inside of CRAM works, what does the syntax look like and what it is at all useful for.
 +
 +**Previous Tutorial:** [[tutorials:beginner:simple_plans|Implementing simple plans to move a turtle]]\\
 +**Next Tutorial:** [[tutorials:beginner:motion_designators|Creating motion designators for the TurtleSim]]
 ==== Using built-in predicates ==== ==== Using built-in predicates ====
  
Line 39: Line 43:
 </code> </code>
 Then we get one correct possible assignment for all the variables as one entry of the lazy list. Then we get one correct possible assignment for all the variables as one entry of the lazy list.
 +
 +It is important to remember that the ` is needed for unbound variables, not the ' or you will get an error.
 +
  
 If there are no solutions for the query Prolog returns NIL: If there are no solutions for the query Prolog returns NIL:
Line 100: Line 107:
 (((?PARENT-OF-ME . MY-DAD) (?GRANDPARENT-OF-MY-KID . MY-DAD))) (((?PARENT-OF-ME . MY-DAD) (?GRANDPARENT-OF-MY-KID . MY-DAD)))
 </code> </code>
 +
 +
 +Now that we are familiar with the CRAM Prolog syntax, let's dive right into resolving CRAM abstract entity descriptions, called designators, using Prolog ...
 +
 +**Next Tutorial:** [[tutorials:beginner:motion_designators|Creating motion designators for the TurtleSim]]