title: Clips Family Expert System
body: <p>I'm trying to implement a basic expert system in the Clips programming language. I have a knowledge base of children with their respective parents. I want to set up a rule so that if two children have the same parents then it asserts the fact that they are siblings.</p>
  
  <hr>
  
  <pre><code>(deftemplate person "family tree"
            (slot name)
            (slot father)
            (slot mother))
  
  (assert
          (person
                  (name "William")
                  (father "John")
                  (mother "Megan")))
  (assert
          (person (name "David")
                  (father "John")
                  (mother "Megan")))
  
  (defrule sibling
          (person
                  (name ?name1)
                  (father ?x)
                  (mother ?x))
          (person
                  (name ?name2)
                  (father ?y)
                  (mother ?y)))
  </code></pre>
  
  <p>and when I define the rule I get a syntax error:</p>
  
  <pre><code>Syntax Error:  Check appropriate syntax for defrule.
  </code></pre>