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-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:maximum-iterations to 100 [default]
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:complexity-penalty to 0.1
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:jobs to 1 [default]
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:FC:retry-exhausted-sources to 0 [default]
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:FC:full-rule-application to 0 [default]
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:BC:maximum-bit-size to -1 [default]
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:BC:MM:complexity-penalty to 0 [default]
[2020-04-27 16:50:34:315] [DEBUG] Rule-base deduction-rule-base, set
parameter URE:BC:MM:compressiveness to 1 [default]
[2020-04-27 16:50:34:315] [DEBUG] Default inference rule TVs:
[2020-04-27 16:50:34:315] [DEBUG] Start backward chaining
[2020-04-27 16:50:34:315] [DEBUG] With rule set:
size = 0
[2020-04-27 16:50:34:315] [DEBUG] Iteration 1/100
[2020-04-27 16:50:34:315] [DEBUG] Initialize BIT 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-27 16:50:34:315] [DEBUG] Selected and-BIT for fulfillment (fcs
value):
[de1d20a71923fa1f][4]
[2020-04-27 16:50:34:315] [DEBUG] Results:
size = 0
[2020-04-27 16:50:34:315] [DEBUG] Iteration 2/100
[2020-04-27 16:50:34:315] [DEBUG] Weighted and-BITs:
1 [de1d20a71923fa1f][4]
[2020-04-27 16:50:34:315] [DEBUG] Selected and-BIT for expansion:
(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-27 16:50:34:315] [DEBUG] Selected BIT-node for expansion:
body:
(EvaluationLink
(DefinedPredicateNode "is_tall_B") ; [633392579119c32][1]
(VariableNode "person") ; [40bf26ea112895be][1]
) ; [c0a7dafcd6614da1][1]
exhausted: 0
rules:
size = 0
[2020-04-27 16:50:34:315] [DEBUG] No valid rule for the selected BIT-node,
abort expansion
[2020-04-27 16:50:34:315] [DEBUG] Cannot fulfill an empty and-BIT. Abort
BIT fulfillment
[2020-04-27 16:50:34:315] [DEBUG] Iteration 3/100
[2020-04-27 16:50:34:315] [DEBUG] Weighted and-BITs:
1 [de1d20a71923fa1f][4]
[2020-04-27 16:50:34:316] [DEBUG] Selected and-BIT for expansion:
(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-27 16:50:34:316] [DEBUG] All BIT-nodes of this and-BIT are
exhausted (or possibly fulfilled). Abort expansion.
[2020-04-27 16:50:34:316] [DEBUG] Cannot fulfill an empty and-BIT. Abort
BIT fulfillment
[2020-04-27 16:50:34:316] [DEBUG] Terminate: all AndBITS are exhausted
[2020-04-27 16:50:34:316] [DEBUG] Finished backward chaining with results:
size = 0
The BackwardChainer took 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/ab61f7d9-6110-44fb-a661-d7784bd2ae5a%40googlegroups.com.