Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Both sides previous revision Poprzednia wersja
Nowa wersja
Poprzednia wersja
pl:dydaktyka:dss:rules:intro [2017/12/06 15:02]
msl [6.2. Rule tracking]
pl:dydaktyka:dss:rules:intro [2019/06/27 15:50] (aktualna)
Linia 107: Linia 107:
   siblings(X, Y),   siblings(X, Y),
   man(X).</​code>​   man(X).</​code>​
-Define ​two additional ​rules: +Define ​the following ​rules: 
-  * siblings(X,​Y) --- two different people with a common parent+  * siblings(X,​Y) --- two different people with a common parent;  
 +    * tip: ** (test (neq ?x ?y)) ** checks inequality of variables. 
 +    * question: why do you have to use ** test ** keyword?
   * sister(X,Y)   * sister(X,Y)
   * grandfather(X,​Y)   * grandfather(X,​Y)
Linia 114: Linia 116:
   * grandparent(X,​Y) --- tip: use ** OR **   * grandparent(X,​Y) --- tip: use ** OR **
   * cousins(X,​Y) --- two different people with a common grandparent. You can check this rule in Prolog with a query: <​code>​cousins(X,​Y),​ parent(R,​X),​ parent(R, Y)</​code>,​ it should return **false**   * cousins(X,​Y) --- two different people with a common grandparent. You can check this rule in Prolog with a query: <​code>​cousins(X,​Y),​ parent(R,​X),​ parent(R, Y)</​code>,​ it should return **false**
 +    * remember: siblings are not cousins! ​
   * aunt(X,Y) and uncle(X,Y) in terms of sister, brother and parent.   * aunt(X,Y) and uncle(X,Y) in terms of sister, brother and parent.
   * half-orphan(X) --- a person with only one parent. TIP: celina is the only half-orphan in the KB   * half-orphan(X) --- a person with only one parent. TIP: celina is the only half-orphan in the KB
pl/dydaktyka/dss/rules/intro.1512568963.txt.gz · ostatnio zmienione: 2019/06/27 15:57 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0