Hi Alex,

I think there is no reasoning needed here, a pattern matcher query would suffice, that is said it the BC should succeed at the first iteration.

I see query_B is using DefinedPredicateNode("is_tall_B") while your DefineLink is using "tall_B" maybe that's the problem.

Nil

On 4/27/20 7:54 PM, Alexander Gabriel wrote:
Hiya!

I've stumbled upon a new problem I could use your help with.

I've been trying to run a very rudimentary example to understand what goes wrong here:

If I run the queries below through the backward chainer, query_A with the PredicateNode works fine, but if I run query_B with the DefinedPredicateNode, I end up with the log attached at the bottom of this post.

I think, I need to create a PLN rule that replaces DefinedPredicateNodes with their respective definition...(I haven't found one).... is that correct?

Best regards,
Alex

pseudo code:
|
someone =ConceptNode("bob")

someone.set_value(PredicateNode("height"),FloatValue(1.9))


EvaluationLink(
PredicateNode("is_tall_A"),
         someone
)

EvaluationLink(
PredicateNode("is_tall_B"),
         someone
)





DefineLink(
DefinedPredicateNode("tall_B"),
LambdaLink(
VariableNode("X"),
GreaterThanLink(
ValueOfLink(
VariableNode("X"),
PredicateNode("height")
),
NumberNode("1.75")
)
)
)


variables =VariableList(TypedVariableLink(
VariableNode("person"),
TypeNode("ConceptNode")
)
)


query_A =EvaluationLink(
PredicateNode("is_tall_A"),
VariableNode("person")
)


query_B =EvaluationLink(
DefinedPredicateNode("is_tall_B"),
VariableNode("person")
)
|

debug log:
|
[2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:maximum-iterations to 100[default] [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:complexity-penalty to 0.1 [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:jobs to 1[default] [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:FC:retry-exhausted-sources to 0[default] [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:FC:full-rule-application to 0[default] [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:BC:maximum-bit-size to -1[default] [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:BC:MM:complexity-penalty to 0[default] [2020-04-2716:50:34:315][DEBUG]Rule-basededuction-rule-base,setparameter URE:BC:MM:compressiveness to 1[default]
[2020-04-2716:50:34:315][DEBUG]Defaultinference rule TVs:
[2020-04-2716:50:34:315][DEBUG]Startbackward chaining
[2020-04-2716:50:34:315][DEBUG]Withrule set:
size =0
[2020-04-2716:50:34:315][DEBUG]Iteration1/100
[2020-04-2716:50:34:315][DEBUG]InitializeBIT with:
(BindLink
(TypedVariableLink
(VariableNode"person");[40bf26ea112895be][1]
(TypeNode"ConceptNode");[3494df0ad0397660][1]
);[cfa066b73bf288dd][1]
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
);[de1d20a71923fa1f][4]
[2020-04-2716:50:34:315][DEBUG]Selectedand-BIT forfulfillment (fcs value):
[de1d20a71923fa1f][4]
[2020-04-2716:50:34:315][DEBUG]Results:
size =0
[2020-04-2716:50:34:315][DEBUG]Iteration2/100
[2020-04-2716:50:34:315][DEBUG]Weightedand-BITs:
1[de1d20a71923fa1f][4]
[2020-04-2716:50:34:315][DEBUG]Selectedand-BIT forexpansion:
(BindLink
(TypedVariableLink
(VariableNode"person");[40bf26ea112895be][1]
(TypeNode"ConceptNode");[3494df0ad0397660][1]
);[cfa066b73bf288dd][1]
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
);[de1d20a71923fa1f][4]
[2020-04-2716:50:34:315][DEBUG]SelectedBIT-node forexpansion:
body:
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
exhausted:0
rules:
   size =0
[2020-04-2716:50:34:315][DEBUG]Novalid rule forthe selected BIT-node,abort expansion [2020-04-2716:50:34:315][DEBUG]Cannotfulfill an empty and-BIT.AbortBIT fulfillment
[2020-04-2716:50:34:315][DEBUG]Iteration3/100
[2020-04-2716:50:34:315][DEBUG]Weightedand-BITs:
1[de1d20a71923fa1f][4]
[2020-04-2716:50:34:316][DEBUG]Selectedand-BIT forexpansion:
(BindLink
(TypedVariableLink
(VariableNode"person");[40bf26ea112895be][1]
(TypeNode"ConceptNode");[3494df0ad0397660][1]
);[cfa066b73bf288dd][1]
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
(EvaluationLink
(DefinedPredicateNode"is_tall_B");[633392579119c32][1]
(VariableNode"person");[40bf26ea112895be][1]
);[c0a7dafcd6614da1][1]
);[de1d20a71923fa1f][4]
[2020-04-2716:50:34:316][DEBUG]AllBIT-nodes of thisand-BIT are exhausted (orpossibly fulfilled).Abortexpansion. [2020-04-2716:50:34:316][DEBUG]Cannotfulfill an empty and-BIT.AbortBIT fulfillment
[2020-04-2716:50:34:316][DEBUG]Terminate:all AndBITSare exhausted
[2020-04-2716:50:34:316][DEBUG]Finishedbackward chaining withresults:
size =0
TheBackwardChainertook 0.00
|



--
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 [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/ab61f7d9-6110-44fb-a661-d7784bd2ae5a%40googlegroups.com <https://groups.google.com/d/msgid/opencog/ab61f7d9-6110-44fb-a661-d7784bd2ae5a%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/57f545e6-9d49-fe61-6032-4325c16a91d3%40gmail.com.

Reply via email to