Why AI dominates things like Chess:
Artificial Intelligence “AI” is a term that is thrown around a lot these days, however at it’s core, AI is based on 2 key principles:
- Using computers to find patterns in data
- Then using those patterns to then make better decisions/predictions
This is why computers can be so brilliant in chess. First, the computer system collects a mind-boggling amount of data either from human games OR more recently (and more interestingly) by playing chess with itself! Next, the system applies a set of mathematically based computer code to the data as the basis for making decisions on how to move the pieces. Computers can generate vastly more data in a very short amount of time than humans can in their entire lifetimes. As the algorithms used to mine this data become better, the system becomes incredibly “smart” at its particular task.
When applying this basic knowledge of how AI works to psychology, we can then ask whether or not predictable patterns can be found in the data about people that we feed computers? Conceptually this leads us down a fascinating path.
Predicting the Predictable? Or Not?
A truly random system cannot be predicted by a set of rules (that is the definition of random). But what about a system that isn’t random. Here’s a mind-blowing fact:
You can have a deterministic system (where we knows the rules) that exhibits what is essentially unpredictable behavior.
How can we have a system with nothing random (everything is deterministic) yet it is basically impossible to find any pattern in the data? Think about it– we can write down all the equations for how something works, yet we cannot predict the outcomes! This feels very counter-intuitive, as it seems logical that if we know the rules for how something works, we should then be able to follow these rules to see patterns and predict the outcomes.
Chaos Theory Math
There is a field of mathematics called “chaos theory” that sheds light on this highly counter-intuitive concept.
When we mathematically “model” something (what AI does) we use a set of equations (or ‘algorithms’, the same thing written in computer code), to create a set of rules that predict an outcome.
In the following simple equation: Y = X + 1,
We can predict the values of Y for every value of X. Just add 1 to X!
Here’s another equation that is used to predict various occurrences in nature – things that depend on time. If I’m calculating what X is right now, I need to know what X was in the past. This is very common, since predicting the future is often very dependent on what happened in the past! Especially in human behavior.
The value now = the prior value * (1- the prior value) * some constant number
We’ll make the constant number here = 1 for simplicity. Let’s start with a value of X in the past that was 0.1 (we just picked a random number to start with).
Then the value of X now is: The value now = the prior value * (1- the prior value) * 1
X = 0.1 * (1 – 0.1) * 1
X = 0.1 * 0.9
X = 0.09
You can then get the next X value after this by doing the same thing: The value now = the prior value * (1- the prior value of X)
X = 0.09 * (1-0.09)
X = 0.09 * (0.91)
X = 0.08
This can continue for as long as you want to predict the values of X.
Now, here’s the question: Would you say that you can “predict” the value of X far out into the future by looking for patterns in the data? Well, let’s try it:
As you can see if you take this sequence of numbers out to 100 places, it has a very predictable pattern (as you would probably expect from such a simple equation).
Kind of boring right?
Well, let’s see what happens if we change that constant from 1 to something else.
With the exact same simple equation and the constant value being 2 instead of 1, we get this:
It’s still as you would expect, somewhat of a predictable pattern. If we were asking some algorithm, or AI system to predict what X will be in the future by just looking at the data, it won’t have a very hard time (even a child could probably do it).
Let’s try another by now letting the constant = 3
Here we have a slightly more interesting pattern in the data, as time goes on. As the sequence increases, the results are bouncing back and forth between 2 numbers –slightly more complicated, however we still have a clear pattern. From this data, you could still predict what is going to happen next in the sequence.
As a side note, this was a bit surprising to me when I first saw it. How did it go from converging to 1 number to now all of the sudden bouncing back and forth between 2 numbers? This is a longer topic, and what is MUCH MORE interesting is what happens next:
We keep that same exact equation: X = X[prior] * (1-X[prior]) * constant, but now make the constant 4:
The patterns completely go away! Nothing. It looks totally random even thought it came from a deterministic equation! In fact it came from the exact same equation that produced very predictable patterns before. What’s different now? All we did was change the constant that we multiplied the X values to form 1, 2 or 3 to the number 4. This seems pretty minor, however the impact is massive! Now we have a system without a discernible pattern in the data, making it extremely hard to predict what happens as we extend the sequence.
How does a “system” go from experiencing highly predictable behavior (constant = 1, 2 or 3) to something that is unpredictable (constant =4)? Something that is stable and predictable (like this simple little equation) can also become completely unpredictable with only a seemingly minor change.
Highly Sensitive Systems
This is the essence of “chaos theory” in mathematics – very small changes in “predictable” systems can lead to incredible changes in the results. The classic example of this is weather, where we know may of the physical laws and relationships that govern weather, yet we still cannot predict it accurately very far in advance. The “butterfly effect” is often cited as the reason why: a butterfly flapping it’s tiny wings in one part of the world can create such a very small change to air pressure that can then lead to massive consequences on weather somewhere else in the world. Seemingly minor changes (the butterfly) can lead to massive changes in outcomes.
But still, we haven’t addressed why this occurs? After all, if we know the rules for how something works (the equation) how can we not be able to predict what happens into the future? The answer lies in the precision of the numbers that are fed into the equations that we know, often referred to as “sensitivity to initial conditions”. In our example, this means that if we plug in the numbers 1, 2, or 3 into the equation, the equation is not sensitive to the precision of these numbers — whether you plug in 3.00001 or 1.9999 you get the same result.
However, when we plug in 4, the system exhibits “sensitive” or “chaotic” behavior. Plugging in 4.0000000001 or 4.0000001 will give you completely different results (don’t believe me? See the graph below!). Computers are limited in how precise they can be in defining an initial value for a sequence of data, and thus very small differences in precision lead to wildly different changes in the results. The patterns might look the same for a while (here they look the same for the first 20 or so values in the sequence), but then, very quickly, each series takes on a (seemingly random) life of its own.
If such a simple system (this one little equation!) can reach “chaos” with such minor changes, imagine what happens in an significantly more complex system with hundreds, thousands, or even millions of variables.
Chaos and Human Behavior
What better example of this is there than human behavior? Small changes in a person’s life (the constant value in the equation above) may have a totally unpredictable effect on what happens next in terms of thoughts, feelings, and actions. It may be extremely difficult to know the exact, precise “state” of someone’s thoughts or feelings, and thus even if we could somehow determine the “rules” we still might never know the outcomes.
Over time, AI may become better at deciphering the complex patterns that exists in our thoughts and behavior, but perhaps no matter how sophisticated the algorithm, true predictability might just lie beyond reach. Something about this feels fundamentally human as well – that machines will not be able to model (predict) out all of our thoughts, feelings and actions. And if they could, what does that even say about our free will? Machines will surely be used to give us incredible insights into human psychology, however there may also be major structural limits.
I love this topic. Ping me to discuss it more and/or tell me where I’m wrong!
– Steve Shaheen