Trying to understand how solving TruthQuery works

37 views
Skip to first unread message

Tareq Alkhaldi

unread,
Oct 21, 2016, 3:11:20 AM10/21/16
to opencog
Hi everyone,

So I've been trying to figure out the steps of inference the bc/fc will do in order to answer the following TruthQuery:

(nlp-parse "Japan won the game.")

(ReferenceLink
   (InterpretationNode "sentence@4603e95d-b5b8-4831-a0ac-95f28feaa119_parse_0_interpretation_$X")
   (SetLink
      (InheritanceLink
         (ConceptNode "game@85e71213-577b-4aa2-8412-da49e62ba2f4")
         (ConceptNode "game" (stv 0.03125 0.0012484394))
      )
      (EvaluationLink
         (DefinedLinguisticPredicateNode "definite")
         (ListLink
            (ConceptNode "game@85e71213-577b-4aa2-8412-da49e62ba2f4")
         )
      )
      (InheritanceLink
         (ConceptNode "Japan@2d483477-9a2d-4049-968f-8f7120f43e51")
         (ConceptNode "Japan" (stv 0.03125 0.0012484394))
      )
      (EvaluationLink
         (DefinedLinguisticPredicateNode "definite")
         (ListLink
            (ConceptNode "Japan@2d483477-9a2d-4049-968f-8f7120f43e51")
         )
      )
      (ImplicationLink
         (PredicateNode "won@349785b2-b0c2-4feb-bd51-29d7fffefc73")
         (PredicateNode "win" (stv 0.055555556 0.0012484394))
      )
      (EvaluationLink
         (PredicateNode "won@349785b2-b0c2-4feb-bd51-29d7fffefc73")
         (ListLink
            (ConceptNode "Japan@2d483477-9a2d-4049-968f-8f7120f43e51")
            (ConceptNode "game@85e71213-577b-4aa2-8412-da49e62ba2f4")
         )
      )
      (EvaluationLink
         (PredicateNode "won@349785b2-b0c2-4feb-bd51-29d7fffefc73")
         (ListLink
            (ConceptNode "Japan@2d483477-9a2d-4049-968f-8f7120f43e51")
         )
      )
      (InheritanceLink
         (InterpretationNode "sentence@4603e95d-b5b8-4831-a0ac-95f28feaa119_parse_0_interpretation_$X")
         (DefinedLinguisticConceptNode "DeclarativeSpeechAct")
      )
      (InheritanceLink
         (PredicateNode "won@349785b2-b0c2-4feb-bd51-29d7fffefc73")
         (DefinedLinguisticConceptNode "past")
      )
   )
)

and the question:

(nlp-parse "Did Japan win the game?")

(ReferenceLink
   (InterpretationNode "sentence@71d1be55-9c56-46d5-a293-94c4d002feea_parse_0_interpretation_$X")
   (SetLink
      (InheritanceLink
         (ConceptNode "game@19f5a774-8b38-4d92-b6e5-f443e2115476")
         (ConceptNode "game" (stv 0.05882353 0.0024937657))
      )
      (EvaluationLink
         (DefinedLinguisticPredicateNode "definite")
         (ListLink
            (ConceptNode "game@19f5a774-8b38-4d92-b6e5-f443e2115476")
         )
      )
      (InheritanceLink
         (ConceptNode "Japan@6df1a66e-f269-460d-bd32-9f300dc4a607")
         (ConceptNode "Japan" (stv 0.05882353 0.0024937657))
      )
      (EvaluationLink
         (DefinedLinguisticPredicateNode "definite")
         (ListLink
            (ConceptNode "Japan@6df1a66e-f269-460d-bd32-9f300dc4a607")
         )
      )
      (ImplicationLink
         (PredicateNode "win@72e29756-e848-4eb8-8924-407072e74d5e")
         (PredicateNode "win" (stv 0.10526316 0.0024937657))
      )
      (EvaluationLink
         (DefinedLinguisticPredicateNode "Truth Value")
         (EvaluationLink
            (PredicateNode "win@72e29756-e848-4eb8-8924-407072e74d5e")
         )
         (VariableNode "$O1UKaXxsl6dTKvIOxy67sJqT5cVPhF4uSq6o")
      )
      (EvaluationLink
         (PredicateNode "win@72e29756-e848-4eb8-8924-407072e74d5e")
         (ListLink
            (ConceptNode "Japan@6df1a66e-f269-460d-bd32-9f300dc4a607")
            (ConceptNode "game@19f5a774-8b38-4d92-b6e5-f443e2115476")
         )
      )
      (EvaluationLink
         (PredicateNode "win@72e29756-e848-4eb8-8924-407072e74d5e")
         (ListLink
            (ConceptNode "Japan@6df1a66e-f269-460d-bd32-9f300dc4a607")
         )
      )
      (InheritanceLink
         (InterpretationNode "sentence@71d1be55-9c56-46d5-a293-94c4d002feea_parse_0_interpretation_$X")
         (DefinedLinguisticConceptNode "TruthQuerySpeechAct")
      )
      (InheritanceLink
         (PredicateNode "win@72e29756-e848-4eb8-8924-407072e74d5e")
         (DefinedLinguisticConceptNode "past_infinitive")
      )
   )
)



Soo, about this part:

(EvaluationLink
         (DefinedLinguisticPredicateNode "Truth Value")
         (EvaluationLink
            (PredicateNode "win@72e29756-e848-4eb8-8924-407072e74d5e")
         )
         (VariableNode "$O1UKaXxsl6dTKvIOxy67sJqT5cVPhF4uSq6o")
      )

What do the nested EvaluationLink here mean? 

And what steps will the bc follow to ground the variable to this (if that's how it works):

(EvaluationLink
         (PredicateNode "won@349785b2-b0c2-4feb-bd51-29d7fffefc73")
         (ListLink
            (ConceptNode "Japan@2d483477-9a2d-4049-968f-8f7120f43e51")
            (ConceptNode "game@85e71213-577b-4aa2-8412-da49e62ba2f4")
         )
      )


I appreciate any help on this! (and sorry if these are trivial things)

Linas Vepstas

unread,
Nov 10, 2016, 8:39:22 PM11/10/16
to opencog
Its not a trivial question, I'm sorry no one answered your email earlier.  Nil works on this component, I am not sure how it works or how well it works right now.

--linas 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to 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/a1e990db-df73-4372-8ef5-0931a0a8cb69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Linas Vepstas

unread,
Nov 10, 2016, 8:40:39 PM11/10/16
to opencog
I mean -- to be clear -- this question should have a step-by-step analysis on a wiki page, to illustrate how R2L and PLN actually deal with it.  The fact that we don't have such a page is a major issue.

--linas

Nil Geisweiller

unread,
Nov 10, 2016, 11:53:47 PM11/10/16
to ope...@googlegroups.com
Hi,

sorry for the lack of documentation, I'm really close to be done with
the backward chainer implementation and then I'll write a detailed
documentation.

Regarding true query, it is ATM no different than a variable query, and
yet it works! Specifically it can answer true queries where the fitness
function would be to maximize confidence, that is because the PLN rules,
as currently implemented almost only get applied when they increase
confidence.

There is a place holder for a fitness function that I'll implement when
needed.

Nil
> 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>.
> <https://groups.google.com/group/opencog>.
> <https://groups.google.com/d/msgid/opencog/a1e990db-df73-4372-8ef5-0931a0a8cb69%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
> --
> 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/CAHrUA35K0Rrz%3DoCGgE8j%2BO3nRip3%2Bv2OWPretcEuXXkU7zEAwA%40mail.gmail.com
> <https://groups.google.com/d/msgid/opencog/CAHrUA35K0Rrz%3DoCGgE8j%2BO3nRip3%2Bv2OWPretcEuXXkU7zEAwA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Tareq Alkhaldi

unread,
Nov 20, 2016, 10:45:16 PM11/20/16
to opencog
Thanks Linas and Nil,

Yeah, I'm looking forward to the documentation. I'm also looking forward to reaching the point when PLN can be applied to parsed sentences to solve parsed questions, because so far the examples I've seen only work on handmade facts in scheme.

Ben Goertzel

unread,
Nov 20, 2016, 10:47:00 PM11/20/16
to opencog
Tareq, I think it is months away, because first Nil needs to finish
some technical stuff in the backward chainer, and THEN he has to make
scalable inference control work for PLN via doing pattern mining on
inference histories... the latter won't be easy and help with that
would be valued if anyone wants to chip in...
> email to opencog+u...@googlegroups.com.
> To post to this group, send email to 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/2cca81b3-5d2a-4ac2-adff-d8dc620bb06d%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Ben Goertzel, PhD
http://goertzel.org

“I tell my students, when you go to these meetings, see what direction
everyone is headed, so you can go in the opposite direction. Don’t
polish the brass on the bandwagon.” – V. S. Ramachandran

Tareq Alkhaldi

unread,
Nov 20, 2016, 10:52:39 PM11/20/16
to opencog
Hi Ben,

On Monday, 21 November 2016 12:47:00 UTC+9, Ben Goertzel wrote:
Tareq, I think it is months away, because first Nil needs to finish
some technical stuff in the backward chainer, and THEN he has to make
scalable inference control work for PLN via doing pattern mining on
inference histories... the latter won't be easy and help with that
would be valued if anyone wants to chip in...

The latter does sound difficult. I'd love to help when I know more details about the problem and once I have free time. (Maybe Nil would be done with BC by then :) )
Reply all
Reply to author
Forward
0 new messages