Re: Storing data and code in a Db with LISP-like interface

From: Neo <neo55592_at_hotmail.com>
Date: 28 Apr 2006 16:44:38 -0700
Message-ID: <1146267877.974477.232900_at_j73g2000cwa.googlegroups.com>


> > Note: I deduct points for methodologies that are not systematic :)
>
> I'm tired of this game.

:) The human mind is so powerful that it routinely makes complex things appear as games. Sometimes when people present a solution they do not realize that it is not systematic or missing relevant data because their mind is filling in the gaps. These gaps are best realized when one actually trys to implement a program, like an android, to do what humans see as simple. Your solution is not systematic and is missing relevant data.

According to Prolog documentation, it appears the following syntax: "x (y)" can only be interpretted in one way, that is "y isA x". If this is true, then so far Prolog is systematic. An andriod-like program can count on it to determine the relationship between any x and y.

According to Prolog doc, it appears the following syntax: "x (y, z)" can be interpretted (by user) as either "y x z" or "z x y" because both versions are fine, however it is a good programming practice to stick to either convention during the writing of single program to avoid confusion. This is not quite systematic but I can live with it. However, if one andriod was built using "y x z" and the other with "z x y", the would misinterpret each other. Such type of misinterpretation would not occur if the andriods were built with dbd.

Now beyond two parameters, Prolog is not systematic. It is up to the user to be systematic. In your solution, you used the syntax "x (y, z, q)" and it seems to imply that "y z q isA x", which I was able to figure out using my mind, but the andriod would not know this rule unless it was a standard rule or told that "x (y, z, q)" always implies "y z q isA x" for every x, y, z, q.

Let's apply your implied rule to the following from a different user: bought (john,10,apple). This implies "john 10 apple isA bought" ??? This doesn't make much sense. What we are missing are the rule(s) implied in the other user's mind when writting this statement, processing against such data and interpretting results. Same thing here, I need to know your implied rules to interpret things properly (which in this case are fairly obvious to humans). These rules are not standardizes {like for x (y)} and you didn't represent them in the solution.

The reason you probably didn't implement a more systematic solution (as shown below) is because Prolog probably does not allow functions (not function results) to be parameters.

like (john, mary)
hate (john, bob)

opposite (like, hate) /// Is this possible in Prolog ????

Instead you used two different methods to relate things:

> opposite (like,hate).
> relationship (john,like,mary).
> relationship (john,hate,bob).
>
> // let's pose the question:
> // for whatever relationship john has with mary, find another person with
> whom john has the opposite relationship
>
> ? relationship(john, R1, mary), opposite(R1, R2), relationship(john, R2,
> Other)
>
> Prolog replies
> R1 = like
> R2 = hate
> Other = bob
>
> OK. I've done my part

Try this experiment, replace john, mary, bob, likes, hates, opposite,
relationship with letters a, b, c, d, e, f and g. Then it might be
easier to realize that  f(d,e),  g(a, d, b) and g(a, e, c) is not
systematic and missing some rules that are not standard or represented. Why do you use two different methods to represent essentially the same type of relationships? And since there is no standard for interpretting the format f(d, e) and especially g(a, d, b), where did you represent them in the solution? If Prolog doesn't allow functions (not function results) to be parameters, this will ultimately limit its ability to represent things in a systematic manner. For example, in your solution, how does one make relationships to opposite and relationship? Received on Sat Apr 29 2006 - 01:44:38 CEST

Original text of this message