Skip to content

NAL3 Truth Function Inconsistent with Docs #62

@automenta

Description

@automenta

https://github.com/opennars/opennars2/blob/2.0.0_postdev1/src/nal/deriver/truth.clj#L101

(t-and c1 c2)

https://github.com/opennars/opennars2/blob/2.0.0_postdev1/docs/NAL-spec/NAL-3.tex#L206

c &=& or(and(not(f_1), c_1), and(not(f_2), c_2)) + and(f_1, c_1, f_2, c_2)

the preceding paragraph in the NAL spec explains:

When T 1 and T 2 are either highly
similar or opposite to each other, the compound terms produced by these
rules may not have much practical value. However, even when it happens,
it is an issue to be handled by inference control, not by logic.
In the confidence functions, each case for the conclusion to reach its
maximum is separately considered. The plus operator is used in place of an
or operator, because the two cases involved are mutually exclusive, rather
than independent of each other.

i had suspected a symmetric form of this function was missing for negated cases of certain truth functions. not only is the code missing the negated case, inconsistent for the positive case, but i see a possible mistake written for the unimplemented negated case. taking the intersection case as an example

c = or(and(not(f 1 ), c 1 ), and(not(f 2 ), c 2 )) + and(f 1 , c 1 , f 2 , c 2 )

the first component of this formula alone can produce confidence values higher than its conf inputs (ex: two 90% conf inputs producing a 98% conf output in one test case). no other truth functions compute a confidence combining freq and conf in an or( ) in this way.

my guess is that that '+' actually means max as the explanation seems to suggest, and that one of these variations will produce more reasonable confidence values for the various positive and negative combinations.

max(and(f1, f2, c1, c2), and( 1-f1, c1, 1-f2, c2 ))
max(and(f1, f2, c1, c2), and( or(1-f1, 1-f2), c1, c2 ))

otherwise please clarify the documentation and/or why the code seems inconsistent for these functions (including opennars 1.x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions