Hi Joel,
since I am not the author of the forward chainer, I don't recall
precisely how it does the input validation, but it may well be that it
simply uses the type checking method for the input arguments as you say.
For backward chainer, the argument selection mechanism is much more
complex, and includes variable binding system to ensure that <L2,L1>
cannot happen.
The deduction of <L2,L1> does _not_ give you B->B, however, though that
is inconsequential here. <L2,L1> is simply invalid unless C=A.
Your question is a subquestion of the larger question of how to select
arguments for PLN forward chainer. The selection process must pay
attention to both the legitimacy and sensibility of the input arguments
and the general fitness for them to be selected for inference.
Which piece of code have you been looking into in this regard?
-A
Joel Pitt wrote:
Hi Ari,
I'm trying to implement/modify the forward chainer in PLN.
I'm wondering about specifically what argument validation does in the
Rules. Initially I thought it would ensure both the structure and type
of the arguments were correct, but it seems to only check type... at
least for the DeductionRule.
Say we have nodes:
A B C
and inheritance links:
L1 = A->B
L2 = B->C
And we want to find L3 = A->C
If we present the Rule with arguments in the order < L1, L2 > then
deduction works as expected. But if we present with < L2, L1 > then it
outputs L3 = B->B, which isn't all that useful and should probably not
return true when validation of arguments is attempted.
Now perhaps I broke something while changing things, but I wanted to
check if the design ever checked that the arguments were connected in
the right way (i.e. L1.getOutgoingAt(1) == L2.getOutgoingAt(0) ) or if
that's meant to be left to the code constructing the argument list?
Thanks!
J
--
Ari Heljakka
CTO
Dream Broker Ltd
Tekniikantie 14 [EMAIL PROTECTED]
02150 Espoo +358 40 568 2420
Finland www.dreambroker.fi
_______________________________________________
Mailing list: https://launchpad.net/~opencog-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~opencog-dev
More help : https://help.launchpad.net/ListHelp