Translating the NARS-1 examples into OpenCog PLN representation

Added by Cosmo Harrigan over 6 years ago

I imagine we may discuss this some later this week, but for fun I would like to mention it now to be able to start thinking about it earlier.

There are some simple examples of NARS-1 inference that are easy to follow here:
https://code.google.com/p/open-nars/source/browse/trunk/nars-dist/Examples/Example-NAL1-unedited.txt

NARS grammar is defined here: https://code.google.com/p/open-nars/wiki/InputOutputFormat
PLN is defined in Chapter 34 here: http://goertzel.org/bbm_pdf.zip

I want to try to translate these simple examples into PLN. I would appreciate guidance on the following:

NARS truth value (Frequency, Confidence) vs PLN simple truth value (Strength, Weight of Evidence)
NARS –> vs PLN InheritanceLink
NARS term vs PLN ConceptNode (etc.)

Let’s start with the deduction rule. In NARS:
IN: <bird –> animal>. 1.00;0.90 {0 : 1}
IN: <robin –> bird>. 1.00;0.90 {0 : 2}
5
OUT: <robin –> animal>. 1.00;0.81 {5 : 2;1}
OUT: <animal –> robin>. 1.00;0.45 {5 : 2;1}

My attempt to translate to PLN using forward chaining:

OpenCog Scheme shell:
(define robin (ConceptNode "robin" (stv 1 1)))
(define bird (ConceptNode "bird" (stv 1 1)))
(define animal (ConceptNode "animal" (stv 1 1)))
(InheritanceLink bird animal (stv 1 0.9))
(InheritanceLink robin bird (stv 1 0.9))

Cogserver shell:
pln fc 5

Scheme shell:
(cog-incoming-set robin)
(cog-incoming-set animal)

This did not produce any new InheritanceLink between robin and animal. Why is that? It would be good to know what I’m doing wrong.


Replies (5)

RE: Translating the NARS-1 examples into OpenCog PLN representation - Added by Ben Goertzel over 6 years ago

I don’t think there is any operational PLN forward chainer in the current OpenCog codebase ... Ramin Barati is building a new one at this moment though... so we should have a new one able to do this simple inference within a week or two...

We decided to "deprecate" the PLN implementation and build a new one,

http://wiki.opencog.org/w/New_PLN_Design,_2013

If you want to run the old python PLN, there is a separate PLN python shell that will do that, but it only supports backward chaining,

http://wiki.opencog.org/w/PLN_Examples

This PLN python shell is separate from the Scheme shell .. yes that’s awkward...

ben

RE: Translating the NARS-1 examples into OpenCog PLN representation - Added by Ben Goertzel over 6 years ago

Your translation into PLN expression seems fine though...

RE: Translating the NARS-1 examples into OpenCog PLN representation - Added by Karl Frank about 1 month ago

A Bayesian prior over first-order theories is defined. It is shown that the prior can be approximated, and the relationship to previously studied priors is examined.
touch/click map to see google street view images

바카라사이트 - Added by hasnain khatri 6 days ago

Awesome article!I want people to know just how good this information is in your article.It’s interesting, compelling content.Your views are much like my own concerning this subject.바카라사이트

zenith labs review - Added by hasnain khatri 3 days ago

Wow, cool post. I’d like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though.zenith labs review

(1-5/5)