In The Hitchhiker's Guide to the Galaxy there is a famous scene in which a super intelligent computer, Deep Thought, is asked the "Ultimate Question to Life, the Universe, and Everything" and determines the answer is 42. Since we don't know the "real" answer to this question, we can't rule out the possibility that Deep Thought was right.
Natural Language Processing
In 1966, Joseph Weizenbaum presented a computer program for natural language processing, named ELIZA, which used the pattern matching technique to simulate a live person. The most known script was DOCTOR, which simulated a Rogerian psychotherapist, who is just using a patient's words to deepen the conversation and learn more about their mental states.
The simulation could be very convincing, so the invention of this program was a milestone for the reflection about the nature of the human thinking process and the possibility of passing the Turing test.
Since Weizenbaum's program, the technology of natural language processing has advanced, employing complex trained probabilistic models, like hidden Markov chains or PCFG (Probabilistic context-free grammar). Simulated conversations can be more human than ever, and some chatbots have allegedly passed the Turing test.
However, do we know more about the nature of language than we knew in 1966? Or, more importantly, does AI know more about it?
Shakespeare and The Monkeys
If you seat a chimpanzee at a typewriter or a computer keyboard, you can reasonably expect that after some time it will write a poem or a novel, or even Shakespeare's Hamlet, just by randomly pressing keys. Maybe not quite "reasonably", since the probability of this particular event is incredibly low (to be exact: 3,4×10^-183946), but it can still happen.
We can increase the probability of a creative monkey scenario by assuming that the monkey could have just written a short poem that goes like this:
Oh, how strange a feeling it is to be
A man trapped in an alien body
Like a fish out of water
Well, it's not a very good poem, but remember that it was written by a monkey that doesn't even exist, so it's pretty impressive.
Let's make this example even more accurate and give to our primate friend a canvas, some paint and brushes instead of a typewriter. Then tell a curator of some art gallery that you are in possession of several works of an unknown artist from a distant country and convince him to exhibit the collection (this scenario is much more probable, since it really has happened).
I am not an expert in abstract art (far from it, actually), but I think we can assume that if I was in possession of some unknown Jason Pollock painting and told someone that it was painted by a monkey, very few people would have any problem believing me. I am not using a scenario with a monkey taping a banana to a wall for one obvious reason: a monkey would never do that, because it is too smart. So, what we have here are syntactic structures – shapes of lines, stains, shapes of different colors etc. – and the question of whether or not they “mean” anything is observer-relative.
If we take poems and paintings made by a monkey out of context, showing them to unaware human observers, it can happen that its works can be attributed with meaning; they can mean something to the human mind. Many people who saw the work of Pierre Brassau were interpreting his paintings as though they were made by a human and therefore, they were an expression of Pierre's emotions).
And anyone who would read a poem written by a monkey (especially if it was about being a man trapped in an alien body), would probably freak out first and then would then start considering different possibilities, like proof for reincarnation or something like that. A "random event" is never fully accepted by our minds and we're constantly looking for the meaning of events (this is also a reason why so many people are persuaded by different kinds of magic, such as fortune-telling).
The question of "what is meaning" is strongly related to other questions related to the matter of the human mind and consciousness, and therefore the question if machines are capable of thinking.
Does the world make sense?
For David Hume, the famous Scottish 18th century philosopher, the world was just a bundle of different kinds of perceptions (sensations, desires, ideas, etc.), which our mind has to organize in some way. The world as we know it is not objective. We are just creating an image of it inside our minds. The same event can be remembered differently by different people, because at the time of the event they can be focused on different aspects of it. We can't be focused on everything at the same time, and our mind needs to choose where to focus in order to survive.
Hume identified three principles that our minds follow when organizing our perception. These principles are resemblance, contiguity in time and place, and causation. This is where, according to the Scottish philosopher, meaning originates. The strongest of all three is the causation principle, which creates a link between our perceptions from the past and the present and makes it possible for us to expect anything from the future. Of course some links are false – the most familiar examples are post hoc ergo propter hoc ("X occurs after Y, therefore Y causes X") or stereotypes ("X is similar to Y, and Y has the property A, therefore X has the property A"). We just need an answer to the question "why", so we can deal with the passage of time, but also to save our time analyzing reality.
The last reason is probably the most important part of all. When we were living in the jungle, looking for food and avoiding predators, the analysis of our perceptions could not be based on complex calculations. Our ability to survive depended on how quickly we could make the right decision (mostly whether or not to run away). What we call intelligence today is also based on the ability to think quickly, to recognize patterns in the environment, and to react accordingly to what we perceive and understand.
In other words, meaning is a derivative of human action. We could not be “brains in a vat” and still have the same (if any) understanding of the world as we have now, when our brains are connected to our bodies.
Can AI write a book? Well, yes, but actually no.
In their 1963 paper “Finitary models of language users” Noam Chomsky and George Miller observed that “a native speaker of a language has the ability to comprehend an immense number of sentences that he has never previously heard and to produce (...) novel utterances that are similarly understandable to other native speakers”.
This observation is used to emphasize the difference between the human learning process and natural language processing based on probabilistic models, like hidden Markov chains.
Chomsky says: “We cannot seriously propose that a child learns the values of 10^9 parameters in a childhood lasting only 10^8 seconds”. Today probabilistic NLP models have much more parameters than 10^9. Human brain can never compute amounts of data that are used in Artificial Intelligence today. We learn language without reading hundreds of thousands of pages and we play chess without knowing all 10^120 possible positions in a decision tree of the game. So, the conclusion here is: the human mind doesn’t need the ability to compute large numbers because it operates in a different way. On the other hand, a computer doesn’t need to operate in the way the human mind does, since it has the ability of processing large amounts of data to perform “purely intellectual” tasks.
If a computer learns about the world in a different way than the human mind, there is no reason to think it will ever have “mental states” that are anywhere close to human cognition. Even the most advanced Artificial Intelligence algorithm cannot have human experiences of the outside world, doesn’t have human needs or desires and doesn’t feel human emotions (even if it is perfectly able to recognize them).
When we are talking about AI algorithms that are writing books, composing music (from baroque classic to death metal), painting van Gogh- or Rembrandt-like pictures, we are still in the field of creating syntactic structures, based on something that already have been created in the past. Sooner or later we would be able to create an algorithm that, trained on J.R.R. Tolkien’s writings, would write another “Lord of The Rings”. However, telling a story is much more than manipulating symbols. To be interesting, a story has to have meaning – and a machine can’t create that.
But wait, didn't we just say that the meaning is observer-relative? Since even a random event can be attributed to meaning, isn't it possible that we will interpret creations of AI the same way? Well, it can happen. In the process of communication the meaning lies between the sender (e.g. the author of a book) and the observer. The observer can interpret the same syntactic structure in a different way than the sender intended.
However, if the meaning was intended, it is more probable that it will be understood. The probability of creating a meaningful story that would be relatable for readers, by a machine that does not understand the meaning, is incredibly low.
The Logic of Science
So, was Deep Thought right about the answer to the "Ultimate Question to Life, the Universe, and Everything"? It depends on how are we able to understand it. Since we can’t attribute meaning to it, we can never know.
The question about the meaning is not only a matter of literature and art. It is also about how we perceive the world in general – and this includes the scientific vision of it. Science is a way of understanding how nature works and therefore it is inseparable from the questions about language. Science is not just a collection of observable facts. Facts per se don't mean anything – just like a poem written by a monkey. We need to connect them in the right way.
You have probably heard about Spurious Correlations (everyone has). It is full of examples of how unrelated pairs of events can be seen as correlations. However, if there is actually a correlation, who is to decide that it is just by coincidence? How do we know that the consumption of margarine is not related to the divorce rate in Maine?
Science is not only a process of observation. As we mentioned before, reality is too complex to be observed as a whole. Our mind needs to know where to look. This is where we create hypotheses, which create links between facts and events. These links can be false (like "post hoc ergo propter hoc" relations), so hypotheses need to be constantly verified or falsified. However, they can't be formulated without meaning and activity of the human brain.
Without any doubt, AI is more efficient than any human when it comes to computation; it can even accurately predict chaotic processes. However it can't decide what is to be investigated and how. This part is reserved for human creativity.