-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CondLink design #46
Comments
Also, I think that it will be easier to discuss the correct design, once most of the reduct engine is implemented and working. Attempting to design this before the rest of reduct is in place is almost guaranteed to create confusion. See issue #21 for the reduct design. |
@linas, but we don't necessarily want to use We want to port Combo to Atomese and For instance, here's how you'd express the max function (maybe it is the program we want to evolve)
There's no need to have the pattern matcher involved. Though of course it could be, just not in the manner you've presented. For instance
which will build the set of all pairs of numbers such that either the first or second element are greater than 10. |
As you guessed |
Get some subset of reduct working first. I'm concerned that this is over-engineering something simple, while at the same time ignoring the hard parts. |
Sorry I don't get it. What is being over-engineered? How are you gonna express the What good is getting some subset of reduct working first (we already have that BTW, on an old branch of @Yidnekachew, if it hasn't been deleted, and we already have a combo version of reduct anyway, I don't see what it is gonna enlighten that we don't already know)? |
I'm totally for pushing reduct dev earlier than scheduled (it's coming pretty soon anyway), but again I just don't see what it is gonna tell us. Besides we need the operators before we can write reduction rules for them. |
@linas, if you don't like adding |
Is too verbose and what if EvaluateableAtom is random?
As i understand prolog lacks if-else operator, but some logical languages introduced it e.g. mercury. |
OK, I thought about it some more; IfThenElseLink seems reasonable. How do you want CondLink to work?. |
@noskill Yes, the LetLink is interesting. I think I kind-of want to avoid introducing it, for now. |
@linas sorry for the late replay. This is what I have in mind w/CondLink, w/IfThenElseLink. |
OK, I need a day or two tor review the pull req. If it does what the wiki page says then OK. The pull-req does it support BOTH the flattened, and the non-flattened version, or only one? (I presume you want to support both...!?) |
Edited for clarity |
yeah both. |
Silence compiler warning in vertex_seq_to_value
I'm think we're done with that, so I'm closing. |
After spotting this work in progress: kasimebrahim/atomspace@371efb5 I would like to have a formal design discussed here. The CondLink has been discussed on and off for ten years now, and it always gets rejected because it is always problematic and has issues. I want to review the issues, here, and have this issue as a place to discuss alternative designs.
I'm not sure but I think the CondLink is being envisioned as a kind of if-the-else link:
so that when the above is executed, the
EvaluateableAtom
is evaluated first, and if it returns true, thenIfSoResultAtom
is returned as the execution result, else theElseResultAtom
is returend as the execution result.The problem that arises is that the
ElseResultAtom
is not definable, when there are variables. Consider this form:If the evaluatable clause is true, and we find some $X that matches, then there is no problem. However, if the evaluatable clause is false, then there is no such $X, and so it is impossible to say that X is a cat, because there is no such X. There is no way to get that X. The problem is that if-then-else is a kind of "law of the excluded middle", (see wikipedia) and the law of the excluded middle is well-known to cause these kinds of problems, which is why it is generally rejected in constraint-satisfaction systems, action-planning systems, route-finding systems, and theorem-proving systems. And since the atomspace plus URE is a bit like all of these, combined, we need to reject it as well.
The simplest replacement that I can think of is instead having a pair of BindLinks: instead of writing
write
and
The above is what you do when you want to have
IfSoResultAtom
andElseResultAtom
to be executable. But if you only want truth values, then its much simpler: useSequentialAndLink
There are two existing examples for this:and
The text was updated successfully, but these errors were encountered: