opennars / Narjure

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

Edge Case of Conditional Abduction (NAL5) #35

Closed patham9 closed 8 years ago

patham9 commented 8 years ago

With rule

R[((&& M :list/A) ==> C) ((&& :list/A) ==> C) |- M :post (:t/abduction :order-for-all-same)]

the following works

(is (derived "<(&&,<robin --> [withWings]>,<robin --> [chirping]>) ==> <robin --> bird>>."
               "<(&&,<robin --> [flying]>,<robin --> [withWings]>,<robin --> [chirping]>) ==> <robin --> bird>>."
               ["<robin --> [flying]>. %1.00;0.45%"]))

but the following edge case of this rule does not:

(is (derived "<(&&,<robin --> swimmer>,<robin --> [flying]>) ==> <robin --> bird>>."
               "<<robin --> [flying]> ==> <robin --> bird>>."
               ["<robin --> swimmer>. %1.00;0.45%"]))

As you can see the second premise is the case where <robin --> [flying]> plays the role of a conjunction with a single element in the second premise.

Thoughts on this, Roman?

patham9 commented 8 years ago

Resolved by adding an additional rule

R[((&& M U) ==> C) (U ==> C) |- M :post (:t/abduction :order-for-all-same)]

for now. But I would want to have this matching functionality since I don't want multiconditional rules to be specified twice. But it's not a high priority for now.

patham9 commented 8 years ago

I've added the edge cases for good reason, see commit message.