opennars / Narjure

A Clojure implementation of the Non-Axiomatic Reasoning System proposed by Pei Wang.
GNU General Public License v2.0
44 stars 11 forks source link

NAL4 image to product. #33

Closed patham9 closed 8 years ago

patham9 commented 8 years ago
(generate-conclusions
  (r/rules :belief)
  '{:statement  [--> base [ext-image reaction acid _]]
    :truth      [0.9 0.9]
    :task-type  :belief
    :occurrence :eternal}
  '{:statement  reaction
    :truth      [1 0.9]
    :task-type  :belief
    :occurrence :eternal})
=> ()

Expected output:

<(acid,base) --> reaction>. %1.0;0.9%

Rule:

(Ai --> (/ M :list/A )) M |- ((* :list/A) --> M)
               :pre ((:substitute-from-list _ Ai) (:contains? (:list/A) Ai))
               :post (:t/identity :d/identity)
patham9 commented 8 years ago

Problem was (:contains? (:list/A) Ai)) which is indeed not in the list of the premise. Removing it made the two transformation rules working. NAL4=DONE