cog-fc returns empty Setlink

45 views
Skip to first unread message

Vishnu Priya

unread,
Feb 24, 2017, 11:10:53 AM2/24/17
to opencog
Hi, 

This is the data, that i gave,

(EvaluationLink
   (PredicateNode "eats")
   (ListLink
      (ConceptNode "tom")
      (ConceptNode "chicken-feet")
      
   )
)

(InheritanceLink (stv 0.9 0.9)
        (ConceptNode "tom")
        (ConceptNode "chinese")
    )


(EvaluationLink
   (PredicateNode "eats")
   (ListLink
       (ConceptNode "tim")
      (ConceptNode "chicken-feet")
     
   )
)

(InheritanceLink (stv 0.9 0.9)
        (ConceptNode "tim")
        (ConceptNode "chinese")
    )

(EvaluationLink
   (PredicateNode "eats")
   (ListLink
       (ConceptNode "chinese")
      (ConceptNode "chicken-feet")
     
   )
)

(InheritanceLink (stv 0.9 0.9)
        (ConceptNode "Jim")
        (ConceptNode "chinese")
    )

Defining Source :
(define source
    (InheritanceLink
        (ConceptNode "Jim")
        (ConceptNode "chinese")
    )
)

Defining rules and adding rules to the rule-base:

(load "/opt/opencog/opencog/pln/rules/deduction-rule.scm

(define base (ConceptNode "my-rule-base"))

(InheritanceLink  
    (ConceptNode "my-rule-base")
    (ConceptNode "URE")
)

(ExecutionLink
   (SchemaNode "URE:maximum-iterations")
   (ConceptNode "my-rule-base")
   (NumberNode "100")
)

(MemberLink (stv 0.9 1)

    deduction-inheritance-rule-name
    (ConceptNode "my-rule-base")
)

(MemberLink (stv 0.5 1)
    deduction-implication-rule-name
    (ConceptNode "my-rule-base")
)

(MemberLink (stv 0.5 1)
    deduction-subset-rule-name
    (ConceptNode "my"my-rule-base"))


When i run, (cog-fc source base (SetLink))
it returned, 

(SetLink
)

What do i miss here???


Regards,
Vishnu


Nil Geisweiller

unread,
Feb 24, 2017, 6:13:09 PM2/24/17
to ope...@googlegroups.com
Hi,

in this example, deduction rules alone cannot inference anything because
you don't have in your knowledge base things of the sort

Inheritance
A
B

Inheritance
B
C

Some rules are explained in the wiki, like

http://wiki.opencog.org/w/DeductionRule (though I think this section
http://wiki.opencog.org/w/DeductionRule#The_general_case is a bit
misleading).

For those that aren't, there is a comment at the top of the rule file,
such as
https://github.com/opencog/opencog/blob/master/opencog/pln/rules/implication-direct-evaluation-rule.scm

I suppose you took this example from
https://github.com/opencog/opencog/tree/master/examples/pln/chicken-feet-or-pizza
but so you know, it's incomplete and was designed to test reasoning on
the parsed sentences. Perhaps you want to start with something simpler like

https://github.com/opencog/atomspace/blob/master/tests/rule-engine/bc-friends.scm

with the config file

https://github.com/opencog/atomspace/blob/master/tests/rule-engine/conditional-instantiation-config.scm

should be runnable by the forward or backward chainer.

Nil
> *Defining Source *:
> (define source
> (InheritanceLink
> (ConceptNode "Jim")
> (ConceptNode "chinese")
> )
> )
>
> *Defining rules and adding rules to the rule-base:*
> *
> *
> --
> You received this message because you are subscribed to the Google
> Groups "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opencog+u...@googlegroups.com
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/fb264f62-fed8-478d-bdd1-0174cc636e94%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/fb264f62-fed8-478d-bdd1-0174cc636e94%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Roman Treutlein

unread,
Feb 26, 2017, 6:23:37 AM2/26/17
to opencog
That looks more like a task for the Pattern Miner and not for PLN.
Reply all
Reply to author
Forward
0 new messages