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

Commutative terms matching #29

Closed patham9 closed 8 years ago

patham9 commented 8 years ago

Internal representation for (<-> A B) should be (<-> #{A B}) in order to allow taking commutativity of <-> into account by the rule engine. Also for consistency: (--> [A B]) instead of (--> A B).

Motivation:

(conclusions "<gull --> swimmer>."
             "<swan <-> gull>.")
=>
#{{:statement [--> swan swimmer], :task-type :belief, :occurrence 0, :truth [1.0 0.81]} ...}

with

<gull <-> swan>.

the derivation currently can not happen without additional rule.

patham9 commented 8 years ago

I guess commutative matching has a high price anyway, and is probably not compatible with core.unify. So I will generate permuted terms on matching now as it was the case in 1.5.x, this approach seems quite doable also for me.

patham9 commented 8 years ago

this one is fixed since yesterday evening.