The Process of Intelligence

As we stand in an era defined by AI, the philosophical implications of AI tools from past eras become increasingly profound. For example, the old language, Prolog—the star of the 1980s/1990s era of Expert System. Today’s AI, particularly large language models (LLMs such as ChatGPT), come as close as we’ve ever seen to something human that isn’t human. For the most part, they pass the Turing test most of the time for most people—even though I think we keep moving that goal post. They offer us a mirror, reflecting back not just data and patterns but the very essence of our language and thought.

This is a great time to explore deeper into how we think, what we’re made of, the nature of sentience. Is it possible to bottle those insights? Can the complexities of human thought, emotion, and intuition be encoded within a simple framework like Prolog? Can we distill the essence of what it means to reason, to know, to be aware, into a series of logical relationships and inferences?

Everything is a process. Things seem real because it changes slower than the process of our minds.

Although the Universe is in constant change, things change at different rates and on different scales. “Change at different rates” means that although the continents might be drifting my human brain is unaware of it. By “on different scales” I mean that the cup on my desk seems perfectly still, but its atoms are buzzing.

In this AI era of LLMs we hear of products such as ChatGPT, Gemini, Llama, and Grok. We might also hear of knowledge graphs (KG) such as Wikidata, the W3C’s “Semantic Web”, GPUs (graphics processing units), and machine learning (ML).

All that I just mentioned are labels of things, names, symbols, avatars, icons we assign to every thing. With the exception of GPUs, those things aren’t tangible things we can sense with sight, reach out a grab, taste, hear, or smell. In an sense, those non-tangible things “exist” as data on some media somewhere. We could “print” them out, but it’s still just information on a piece of paper. And it will be so complicated that we couldn’t comprehend more than a tiny part at a time.

If it were possible to directly see it with our own eyes, we’d need a very powerful microscope. Even then, at that small scale, it doesn’t look like anything. It’s as abstract as the molecules of our big toe would be through such a microscope.

From the time we’re born, we’re taught the labels—mama, dada, dog, cat, lunch box, even conceptual things like a Gaussian curve. But the really important stuff is not the symbols we apply to things. Rather, it’s what we observe about the relationship between things.

When we see a “thing”, our minds register the thing over time. It takes time for the photons of the thing to reach our eyes and for the rods and cones of our retina to generate a signal that makes its way through a maze of neurons. In our minds, it innately feels instantaneous, even though we know that it took time to recognize the thing we see. It’s ironic that it takes time (albeit a very miniscule amount of time) to recognize a thing that exists in space, perceptually in an instant of time.

I think what I just described takes about 100-200 milliseconds (one-fifth of a second), which pretty much seems instantaneous in the context of our normal lives. Of course, that’s not really that fast compared to light that could circle the Earth in that timeframe.

Once we recognize a thing within that 100-200 or so milliseconds timeframe, that information then will take more time to link to other synaptic structures in our brain to diagnose what can be implied. Are any other synaptic structures “interested” in what we just recognized? Putting it all together, is what we’re observing a good thing or a matter of fighting or flighting?

Before continuing, the intelligence level framework I’m about to lay out are very much inspired by one of my favorite books, Thought in a Hostile World, by Kim Sterelny. I read this book a couple of decades ago and it inspired how I approach computing.

An Intelligence Level Framework

Self-assembly is a very intriguing term. Natural life on Earth began as a self-assembly of molecules into amino acids and virtually all life today is self-assembled. Therefore, I have a keen interest (not expertise) in evolutionary biology. What are the steps and interactions that lead to some quality in an organism or ecosystem?

The purpose of presenting the four levels of this intelligence framework is to lay out that there is a plausible spontaneous progression of a very simple intelligence to the robust intelligence we people experience.

Each step composes from the previous step. But each step does not render the previous step obsolete. All the previous steps still play vital roles. For example, we learn math in a progression of basic math, algebra, geometry, calculus, and linear algebra. Even after mastering linear algebra, most of our math tasks are still composed of elements from the previous levels.

Push Button Intelligence

For the vast majority of creatures (from bacteria to us), this type of decision making accounts for the vast majority of our decisions. For the vast majority of creatures (bacteria), those are pretty much the only kind of decisions they are capable of making. Those creatures rely primarily on rules that somehow emerge from the roots of its DNA, which was trained through hundreds of millions of years of evolution.

There is also what is learned through strenuously repetitive training until it becomes “second nature” or it’s an incredibly bad experience now etched into your amygdala. It’s sometimes referred to “nurture” (what we pick up from our environment) as opposed to “nature” (what comes from our genes).

These push-button rules are first off very simple, so they are very fast to process—fast enough so we respond virtually immediately before it’s too late. They are useful when the cost for being wrong is very high and there’s no time to “think through this clearly”.

It can also generate many false positives, so the cost of each false positive must be low for such a mechanism to be worthwhile. For example, at the airport, where the cost for being wrong about not correctly identifying a person who is a threat (false negative) is huge. So, we’re all presumed to be potential threats until proven wrong (guilty until proven innocent). The vast majority of us are false positives for being a terrorist but the cost of the inconvenience of screening is low even considering the total inconvenience added up from all of us.

Robust Intelligence

A little better than knee-jerk reactions are creatures where some rules are a little more complicated—an intelligence based on Boolean logic. For example, maple trees grow and drop their leaves based on multiple factors of length of day and temperature. For us, “multi-factor authentication” (logging onto a Web site, then responding to a message to your email or phone).

Like with push-button intelligence, the goal is to make decisions when the cost for being wrong is high. Additionally, the cost of false positives is high. Extending the airport example, airline travel will not work if it took three hours to process each passenger and the screeners were required to be trained to the level of CIA agents. At that point, the cure is worse than the disease.

That is how passengers who are suspected of being high risk are treated. So we filter out all passengers to only the highly suspect. There are multiple characteristics considered so we correctly identify threats, avoiding unnecessarily subjecting innocent people to that level of invasion.

Robust recognition is abstractly analogous to the ubiquitous IF-THEN-ELSE (or SWITCH-CASE) statements in software code. These IF-THEN structures could be quite complicated with compound terms, nested values, and multiple definitions.

It’s the manifestation of Boolean logic. It’s a primitive of virtually all programming languages—even down the the BRx instructions of assembly language and even deeper to the gates (AND, NAND, OR, NOR, XOR) of our semi-conductors. In fact, Prolog, the old AI language could be thought of as a language centered around Boolean logic.

A good way to summarize Push-button versus Robust is like this:

  • Push-button: It seems like I see a bear and we run away.
  • Robust: It seems like I see a bear and it’s in a zoo, so we don’t run away.

Notice that I say, “It seems like I see a bear”.

Iterative Recognition

Push-button and Robust recognition are “zero-shot” recognitions. Zero-shot means we ask a question and get an answer. Iterative recognition means that receiving a final answer takes multiple rounds of querying and receiving an answer. It’s really a game of 20 questions.

When I say, “It seems like I see a bear”, it means what I see might not be a bear. Before I wear myself out running from a bear, I want to be sure it’s a bear. So I can ask a series of questions where each question depends on previous one.

The power of Iterative Recognition is evident when there is imperfect information. With imperfect information we need to take multiple steps to validate our pieces of information. Examples of imperfect information include:

  • The object is too far to be sure it’s really a bear. We need to get closer.
  • The object is partially obscured by brush. We need to move around it for an unobscured view.
  • The object might be dead. We need to somehow nudge it.
  • Imperfect information can be part of a scheme. The bear may know how to play dead, luring hungry hunters close, making them the hunted.

Iterative recognition brings in the power of trial and error. This is our wisdom to devise and perform safe and methodical experimentation.

Decoupled Recognition and Action

The first three levels addressed a question of whether or not to run away to avoid being mauled by a bear. But are there alternative actions to running away that we can take once we’re sure we’re dealing with a bear?

Among Earthly creatures, this level of intelligence is mostly the domain of humans. When we recognize something, we can choose the actions we take given a situation. These are items in the human toolbox:

  • Delayed Gratification: We can save all our pennies, forgoing any luxuries, in order to buy that RV, the thing that will surely make us happy for the rest of our lives.
  • Strategy: We do something other than what our opponents think we will do.
  • Adaptability: We remain flexible and responsive, adjusting our actions in real-time as new information becomes available or as the situation changes.

Adaptability is what allows us to navigate the unpredictable. While Strategy gives us a plan and Delayed Gratification helps us focus on long-term goals, Adaptability ensures that we can pivot when things don’t go as expected. It’s the key to surviving and thriving in environments where the only constant is change.

The first two levels, Push-Button Recognition and Robust Recognition are merely “functions”—give it an input and you get some output. Iterative Recognition and Decoupled Recognition and Action are processes. They are processes that are composed of functions.

In this time of LLMs, a “process” known as retrieval augmented generation (RAG) has emerged. It is in the recognition that the quality of LLM responses alone are too unreliable with “zero-shot” questions and answers. That’s not really a fault of LLMs. Imagine if we lived our lives asking only zero-shot questions and abiding by whatever response we received. Oh wait … uh … never mind.

With RAG, we can engage many components of intelligence in a process consisting of cycles of question, answer, validate answer, plug into a solution formula, assess satisfaction with our solution, formulate further questions, repeat.

At the time I write this, RAG improves the results of just asking ChatGPT something and getting back an answer. RAG is not really a “thing”, but a foundational path refining an AI process. Remember, intelligence is a process.

See Five Aggregates of Machine Learning for some of my thoughts on the parts of AI.

Prolog – The Zen Art of AI

Whether we’re talking about an “artificial general intelligence” (AGI) or “artificial super intelligence” (ASI)—which would be magnitudes smarter than all of us put together or today’s less than super-intelligent AI such as ChatGPT—AI could be a candidate for the label of “existential threat”.

AGI is like Commander Data of Star Trek, very smart, but apparently not magnitudes smarter than the smartest sentient “natural” creature. ASI is like the Skynet of Terminator—a lot more encompassing than a single being. In some ways I’m less concerned about an impending ASI as I am of today’s AI which is really the epitome of being just “smart enough to be dangerous”.

I’ve often referred to software development as my Zen art. It’s the art of developing the skill side of systems. Designing a car or fast-food restaurant isn’t the same as designing how it is intended to interact with the world. But in a Zen art, the physical aspects of the art and the skill of the practitioner are inseparable. What is different about traditional software development (creating systems that automates and optimizes a process) versus AI is that most of what it attempts to automate the process of our human intelligence. That’s in the same way that many machines replaced and/or amplified our human muscles.

In the realm of computer science, there exists a language that resonates deeply with the way we think, reason, and explore the world around us. This language is Prolog—a language that, rather than instructing a computer how to do something step by step, engages in a dialogue of questions and answers, of truths and logical inferences. It is a language that, at its core, embodies a way of reasoning, deductive reasoning, that mirrors our own contemplative processes. This type of reasoning in Prolog, which involves deriving conclusions from known facts and rules, resonates with the deductive methodology one might associate with Sherlock Holmes’ style of problem-solving.

Prolog, short for “Programming in Logic,” is a pioneer among programming languages (COBOL, C++, Java, and Python among others I think of as pioneering). Instead of defining a series of steps to solve a problem, you describe relationships and let the system infer the answers. Imagine telling a computer not how to find the path through a maze, but rather what a path is and letting it discover the route on its own. This is the essence of Prolog—it operates on the principles of logic, allowing us to define a world in terms of facts and rules, and then query that world to uncover hidden connections.

Philosophically, Prolog invites us to consider the nature of truth and the process of reasoning. In many ways, it echoes the Zen practice of inquiry, where questions are posed not to receive direct answers but to deepen understanding.

I think of Prolog as a form of poetry—a succinct capture of worldly phenomena. Just as a Zen koan might challenge us to transcend binary thinking, Prolog challenges us to see beyond linear algorithms and engage with the underlying structure of knowledge itself.

Prolog is the manifestation of Boolean logic, the IF-THEN-ELSE constructs I mentioned earlier. For readers who are not software developers used to reading code, this is one of the simpler syntaxes to pick up, right up there with SQL.

Prolog Example

We can create a Prolog program that helps suggest a Zen art based on the lessons it teaches and who might benefit from it. We’ll focus on simple matching rules based on traits or preferences:

% 1. Define Zen arts and what they teach, along with candidate traits
zen_art(ikibana, "patience and attention to detail", introspective).
zen_art(tea_ceremony, "discipline and tranquility", calm).
zen_art(kendo, "focus and resilience", determined).
zen_art(aikido, "harmony and flexibility", peaceful).
zen_art(software_development, "problem-solving and creativity", analytical).
zen_art(calligraphy, "concentration and fluidity", artistic).
zen_art(prolog, "logical thinking and precision", logical).

% 2. Rule to suggest a Zen art based on personal traits
suggest_zen_art(Trait, Art) :-
zen_art(Art, , Trait), !.

% Example queries
% ?- suggest_zen_art(introspective, Art).
% ?- suggest_zen_art(analytical, Art).

% 3. Provide a recommendation with explanation
recommend_zen_art(Trait) :- suggest_zen_art(Trait, Art),
zen_art(Art, Lesson, ),
format("You might enjoy ~w, which teaches ~w.", [Art, Lesson]), nl.

% 4. Fallback for unrecognized traits
recommend_zen_art(_) :-
write("Your trait doesn't match any Zen art we know. Perhaps try meditation."), nl.

Don’t worry about understanding the syntax right now. It’s not nearly as bad as it looks, although this is a very simple example. The important thing is it encapsulates knowledge about the Zen arts—not deep knowledge, but knowledge. My conjecture is that practicing with Prolog is a way to hone the spiritual and professional aspects of your life.

This is how it works:

  1. Zen Art Definitions: The zen_art predicate links each Zen art to a lesson it teaches and the type of person who might enjoy it based on their traits.
  2. Suggest a Zen Art: The suggest_zen_art rule finds the Zen art that matches a given personal trait, making it easy to link a trait like “introspective” to an art like ikebana.
  3. Provide Recommendations: The recommend_zen_art rule offers a more user-friendly response by explaining both the suggested art and the lesson it teaches.
  4. Fallback Response: If the trait isn’t recognized, the program suggests meditation as a fallback, keeping the tone Zen-like and non-judgmental.
  5. Query examples:
    • Please recommend an introspective Zen art.
      • Query: ?- recommend_zen_art(introspective).
      • Response: “You might enjoy ikibana, which teaches patience and attention to detail.”
    • Please recommend an analytical Zen art.
      • ?- recommend_zen_art(analytical).
      • Response: “You might enjoy software_development, which teaches problem-solving and creativity.”

Readers can explore Zen arts based on their traits or preferences, and it could also be a playful way to introduce Zen concepts through logic programming.

A very technical note. The descriptions of the art and the request from the seeker are in the form of rather arbitrary “natural language”. The thing about natural language is that there are countless ways to say the same thing. For example, it’s highly unlikely people will ask in exactly the same way. For example, how many would ask for exactly, to the exact characters, “patience and attention to detail”?

Today, with LLMs, the descriptions would instead be robust embeddings which abstract any text in a way that can be understood from thousands of different angles. Prolog plus LLMs is incredibly powerful.

Bodhidharma and Daruma Would have had a Blast Today

As I mentioned, Prolog is like a form of poetry—a way to capture and express the state of mind at a specific moment. Just as an enso reflects the state of the artist at the time it was drawn, Prolog captures a snapshot of understanding and logic as it was conceived. While Prolog and LLMs might seem like different sides of the same coin, they each reveal different aspects of intelligence.

Imagine Bodhidharma and Daruma using Prolog to encode their insights, the same way a calligrapher’s brush captures the flow of their thoughts in a single, unbroken stroke. The exploration of Prolog isn’t just about mastering a programming language; it can be about understanding our minds itself. Through Prolog, we have a tool that allows us to represent, scrutinize, and even transcend the intricate web of thoughts, perceptions, and truths that define us.

In this way, Prolog, like a Zen koan, offers us not just logical structures, but a deeper understanding of the fleeting yet profound moments that shape our reality.

Use Prolog Like Sudoku

Through my decades of Zen-related studies and AI/BI-related work, the bulk of my thinking has been “thinking about thinking” (and maybe food as a close 2nd). That is, the mechanics of how individual humans and society as a whole think.

LLMs are to the collective knowledge of humanity as the Human Genome Project back in the late 1990s is to DNA. LLMs are a model of the big chunks of what humanity has documented over history. It was crunched from the bulk of our writings—books, articles/blogs, social media conversations, and even programming code that’s publicly available.

What LLMs don’t include are the knowledge of the vast majority of people (billions of people alive today) who have never written a book, not even an article or YouTube video, or documentation of what they do at work. They are mostly disenfranchised from contributing to LLMs—although there are mechanisms that enable AI to learn, for example, “reinforcement learning”.

As we each grow to depend on these LLMs, our own thoughts are extinguished like billions of embers still flickering after the major fire is out. The paradox is that LLMs are fantastic tools, packed with integrated knowledge none of us could ever hope to cram in our brains. They are very helpful for most questions. But since the world is fuzzy, no answers are foolproof—not ours, not that of LLMs, not even an ASI still vulnerable to imperfect information.

So it doesn’t make sense to abstain from using LLMs or even campaigning for severe limitations on them. What we must do it keep our own intelligence sharp and improving. That is the Zen way.

A human grateful for the wonder of Life on Earth and open the vastness of the Universe is sentient, sapient, and intelligent. LLMs alone don’t make an AI. Intelligence is a whole greater than the sum of its parts. LLMs are merely one of those parts.

Bodhi Season is About Three Months Away

This site and fishnu.org are my Zen lessons from a lifetime of software development—from right out of high school in 1979 to today. So a “practical” lesson in this time of AI is to become proficient in a language such as Prolog (Lisp is the other OG AI language) and concepts such as knowledge graphs.

Whatever happens, this day of AI will be one of those times of humanity right up there with the invention of agriculture, the wheel, smelting metals, the printing press, etc. It could possibly have the largest impact on our course of humanity. So a very sensible thing is to use the insights from AI to better understand ourselves – the Gift of Sentience.

As I’ve mentioned, even if (when) AI that is smarter than us comes into existence, we are still sentient and sapient creatures with feelings, fears, desires, and loved ones. That doesn’t change because as one of my favorite sayings go: “Humankind is a piece of the Universe made alive” – Ralph Waldo Emerson.

For the Zen Order of the Common Area Ponds (the sect of the Rubber Ducky Buddha of Joliet), the “secular” Bodhi Season begins on December 1, 2024, only three months away. This would be a great time for a serious Bodhi Day, one of thinking about thinking.

Faith and Patience,

Reverend Dukkha Hanamoku

Leave a comment