TheJach.com

Jach's personal blog

(Largely containing a mind-dump to myselves: past, present, and future)
Current favorite quote: "Supposedly smart people are weirdly ignorant of Bayes' Rule." William B Vogt, 2010

A brief foray into determinism

A deterministic system is one where some piece of information determines another. This is most commonly the case in Math and input-less programming:


def f(x):
return x * x

or
[math]y = f(x) = x^2[/math]

In this example, the result of the function, y, is determined by x. If you know the value of x, you immediately know the value of y. Is the reverse true, however? If you know y, you only know the absolute value of x. x itself could be positive or negative. However, x is still determined from y: x can't be anything. y is determined by x: if you stick in the same x, over and over again, the same y will still pop out. Two possible values of x are determined by y: if you stick in the same y, over and over again, the same two possibilities will pop out.

An indeterministic system is one where nothing determines anything else. The most common case is system input, and random numbers.


def f(msg):
return raw_input(msg)


What is result of f("Type something! ")? You don't know. It could be "Foo". Let's say we ran this, and out came "Foo". Then we ran it again, and out came "Bar". Run it again, "Paris". Run it again, "pneumonoultramicroscopicsilicovolcanoconiosis" pops out.

How about f("Type 'blah': ")? Well, "blah" could come back, or maybe "2398sflkj", or maybe "Foo" again. We have no idea! And if we take one of our outputs, say "Foo", what was the input? It could have been anything as well.

Let's consider this binary, compiled for 64-bit Linux. Right now, without invoking a hexedit or anything, you have no idea what's in it. If you can run it, you won't see anything. But you keep trying dumb things, and lo-and-behold:

$ ./dumb_determined blah

You gave me "blah".


Wow, it did something! You try again, and again, and again, and it gives the same thing. You don't know what else it could be doing, but you can be pretty damn certain that whenever you give it one command line argument, it's going to print out what you gave it. The output is determined by the input.

In fact, the source looks like this:

#include 


int main(int argc, char **argv) {
if (argc == 2) {
int i;
int k = 0;
for (i = 0; i < 20; i++) {
k += i;
}
printf("You gave me \"%s\".\n", argv[1]);
}
return 0;
}


Oh look, it's summing from 1 to 19 for some dumb reason. Bet you never guessed that! But what do you care, you know that the result of printf() is determined by what you give it. Your input determines the output. This program is deterministic, even though you don't have access to all its innards unless I show you the source (which I did).

This is getting us closer to the situation physics sometimes finds itself in. We know what fundamental physics looks like, we know it's deterministic, we know reality doesn't operate any other way. But for us to use the fundamental rules on anything large enough that it shows up way up here on the macro scale, well, it's pretty much impossible to do the computation. There's just too much to keep track of and too much to update. Reality itself works over one giant configuration space, but fortunately due to relativity we can pretend we have distinct configurations for ease of calculation.

Yet nonetheless we also know how to make planes fly. It turns out, way up here on the macro scale, reality seems pretty deterministic too. Stuff holds together, and we can describe mathematical models of flight that, while not perfect (we can treat the airplane as a dot with a few properties like mass, wingspan, lift potential, etc.), are close enough for our purposes. Flight seems pretty deterministic, too, even though it's not fundamental reality and reality's working on the individual quarks of the plane and the air molecules and so forth.

Fluid dynamics and weather prediction is a bit trickier (air is a fluid!), because there's a lot more to keep track of, but chaos theory helps along. Chaos theory is the idea that due to imperfect knowledge of the initial state, a system can evolve in unforeseen ways that from a naive view might make it look as if the system is indeterministic. But there's nothing about chaos theory demanding indeterminism: in fact, chaos theory gets its power from more-or-less accurately modeling deterministic phenomena whose initial state we can't measure precisely enough. We're admitting that we don't entirely know what x is, but we have guesses, and therefore we can also guess at y. Has science been reduced to giving probabilities? Yes, but that's nothing to be ashamed about. Probability is a state of mind, reality is never uncertain. (Because it's deterministic. (Do I have probability = 1 for that statement? No, because I can imagine a situation that would convince me of reality not being deterministic. For example, some sort of God intervening in a clear and obvious way that violates understood reality. (Of course, that God could just seem God-like, and simply be using a different set of deterministic rules that have our set as a special case, but that's a consideration for if the time came.)))

That binary program somewhat represents chaos theory: you don't know the source code, so you have no idea it's summing the numbers 1 through 19. But you do know it is deterministic for your input, at least, and the output is what you're cared about. Now, if that unseen part somehow messed with the output, for example randomly printing out "Hello!", we couldn't call it deterministic anymore. (To the extent that we assume our program is really random: in reality it would seed with the OS's timestamp of seconds since the Unix epoch and call a deterministic math formula for a 'random' number. And then it'd be even more proper to call it a chaotic deterministic system.) We can either label that "hello" feature as indeterministic if it is truly random, or if we assume a real-life random generator we can label that "hello" feature as a chaotic side-effect that sometimes happens due to unknown initial state.

It seems like a lot of people misunderstand chaos theory and seem to think it means an indeterministic system. No, the contrary is more often the case. Fluid dynamics is deterministic, it's just so computationally inefficient to model running water from the base reality that we use other models that can sometimes surprise us due to not taking into account some fact of the water we didn't measure. The classic example of Chaos Theory is a butterfly flapping its wings, disturbing the air currents and thus minutely affecting the weather hundreds of miles away. Reality takes that into account, but we can't. That doesn't mean weather can't be determined.

Let's look at a really stupid program:


def choice_outcome(option):
scale = range(100, 201)
if option < len(scale):
return scale[option]
return 0

def make_choice(options):
highest = -1
choice = None
for option in options:
outcome = choice_outcome(option)
if outcome > highest:
highest = outcome
choice = option
print "I choose %d" % choice

choices = [28, 1, 9, 91, 20, 2, 72]
make_choice(choices)


Note I could make the choices array come from an outside source, but this is just a demonstration so it needn't be needlessly complex.

This is a crude model of the human mind, and how we make our choices. We are given a set of "possibilities" (well, we think they're possible), that we call "choices" (represented by the choices array). Now we have to make a choice, so in our heads we have a "make_choice()" function that will somehow go through all of those options and pick the best one. We have to determine our choice.

How does this program pick the best one? In this case, it picks the "highest" outcome. To get closer to humans, "highest outcome" typically corresponds to "the outcome you prefer most given your feelings, prejudices, knowledge, etc." The choice_outcome() is a function that returns the outcome of a choice, which in more complicated programs might involve running an isolated version of itself to figure out what happens. As humans, when we consider the outcome of a choice, we use our imagination and may imagine ourselves in the "possible" future.

After we figure out what the outcome is (or is likely to be), the greater-than function ranks it against some other outcome we computed, and if it is more favorable, it assigns the choice-we-will-make to the choice we just figured out. After all this is said and done, a choice is made, and the program prints it out. In this case, it's 91.

Let's run it again. Oh, look, it chose 91 again. Wait...

I'm afraid we have a deterministic program. Now, we can make the input come from the command line, but if we know how the comparison of choices works, how "highest" is selected, we can still determine what the final choice will be from the set of input choices. Even if we don't know exactly how it works, we can still see "91" being returned each time and make guesses. (And test with other inputs, finding "91" is chosen fairly often when it's in the set with a random sampling of other choices.)

Run this program again and again, 91 will be chosen. The other "options" can hardly be said to be options anymore, can they? They're impossible given our deterministic system, and given the program doesn't change.

See how simple free will is? The human brain is much more complicated than this program, but it works in a similar fashion. Our "choice_outcome" function uses our brain's emotional systems and other processing stations, and after we've determined the likely outcome, it feels like we could go there, because we used our feelings to help find out what "there" looks like.

But then we go through the rest of our choices, and find the best one, and choose it. Given the same options and same thoughts / initial conditions (knowledge that you chose X before can indeed alter your next choice given the same choices, but here we have a different set of initial conditions), you will choose the same choice. Every time. You are a deterministic system. All the other choices you didn't make were effectively impossible to make at the time, even if it felt otherwise as you evaluated them before settling on the actual choice.

This is not to say that some mysterious force beyond your control exists to determine you completely. Yes, most of what you do is beyond self-directed action, but you still have some control. (Or else we wouldn't have computers, would we?) This is not to say that people are not responsible for their actions.

What this is saying is that this thing most people call "free will" cannot be anything other than "will", a deterministic set of algorithms that weigh options against one's current belief system and knowledge state, then pick the "best" one, where the "best" one is determined by another set of algorithms (and may or may not be the best one from different points of view).

Just as the program simply doesn't consist of a single line of code saying "I choose option 91", so too do you not know all of the outcomes to your choices. The program must determine the solution, and the part of physics that makes you up must help in some way with the rest of physics to determine your own choice.

You are physics. You are just a high-level manifestation of the low-level physics of the configuration space. Necessarily, all the particles in your body and around you are determined according to those fundamental physics. But the particles in your brain are also determined, and way up on our level they decohere into a set of consistent, deterministic algorithms that observe themselves, and clearly we have ways to model human behavior. It's really hard to blame a person grown up in a real poor ghetto for being more prone to stealing: that's all they could choose in the situation they stole. This fact needs to be considered in policy, because instead of punishing thieves we should instead be trying to fix the underlying problem that determines the thieves to determine choosing to steal bread. That is, poverty. The phrase "he couldn't help it" is not always wrong, and quite often correct. Of these possible choices, at this given time in your life, you can and will only choose one, even if you repeated the situation over and over again. The rest are impossible, and should not be called possibilities in retrospect.


Posted on 2010-04-17 by Jach

Tags: free will, philosophy, programming

Permalink: https://www.thejach.com/view/id/89

Trackback URL: https://www.thejach.com/view/2010/4/a_brief_foray_into_determinism

Back to the top

Back to the first comment

Comment using the form below

(Only if you want to be notified of further responses, never displayed.)

Your Comment:

LaTeX allowed in comments, use $$\$\$...\$\$$$ to wrap inline and $$[math]...[/math]$$ to wrap blocks.