4 ms·
> The Unification algorithm at the heart of Prolog (I'm not an expert!) is pretty much what your brain does when you solve logical puzzles and problems. What
by tom_mellior 8y ago
> The Unification algorithm at the heart of Prolog (I'm not an expert!) is pretty much what your brain does when you solve logical puzzles and problems.
What makes you think that? I don't think we have a clear idea of what the brain does when doing "intelligent" things, but syntactic unification is very probably not it. For whatever it's worth, the CLP(FD) stuff you posted isn't "just" unification, it needs additional powerful constraint solving algorithms behind it to work as well as it does.
All that unification does is solve simple equations between terms without knowing anything about what is going on:
?- f(X, b) = f(g(a), Y). % query
X = g(a), % solution
Y = b.
This is nice, but it's not exactly intelligence.
Yay for Prolog enthusiasm! I like calling it "magical" too. But let's not go overboard with grand AI claims.
- carapace 8y ago> What makes you think that? Direct observation. I learned unification algorithm from studying Matthew Rocklin's Python Kanren implementation [1]. The next time I was thinking out the solution of a programming problem, as I was witnessing my brain (or mind if you prefer) solve the problem, I realized on a "meta-track" that what it was doing was exactly unification. I actually "saw" it happening and had a context to recognize and name it. I think it helped that I was working in a domain that has models very close to the forms (computer programming) but the rational logical thinking process is the unification algorithm. > I don't think we have a clear idea of what the brain does when doing "intelligent" things Well, I don't mean to suggest that rational thinking is the only kind of thinking! I'm just pointing out that it's a kind of thinking that really has been automated. It's AI. (Not all that AI is or ever will be, but it counts.) Turing essentially made concrete the thought process of solving (some kinds of) math problems, noticed that the "atomic elements" of the process were a finite set, and designed a machine to automate those steps, so in a sense, computers have always been AI. > CLP(FD) stuff you posted isn't "just" unification, it needs additional powerful constraint solving algorithms behind it to work as well as it does. Yes, and the brain has powerful sensory systems attached to it. I think science has identified something like twenty-seven different human senses. These all supply "finite domains" to the reasoning system. The sensory systems are very active, and can function in "virtual" mode (aka imagination) to permit a kind of thinking by simulation (analogs.) Animals have this sort of thinking as well (that's why they can dream.) The linguistic/digital system reifies this fast primary mode thinking into slower rational thinking distinctions and reasoning, which is then used to build coherent models of the world which are then used to generate behavior. [2] If you codify that thinking process you get the unification algorithm. [1] https://github.com/logpy/logpy https://github.com/logpy/logpy [2] ...and behavior generates new sensory inputs... The whole thing constitutes a feedback loop linking the real world with your subjective experience. Linguistic thinking permits direct modeling of recursion, which permits thinking about open-ended loops in behavior in a concrete way, which permits self-referential modification of the reasoning structures, enabling rapid innovation in behavior (aka "culture".) You're a cybernetic process that can become a Gödel machine.