# Martin's Mystery Function

[Allan Randall (930401.1700 EST)]

Before doing my own experiment to compare H(D) and H(D|P), I've done Martin's
"Mystery function" experiment, since it is the simpler of the two. It is
based on the Primer code of Bill Powers. It is similar to the first example
used in the Primer, except that it runs for 50 iterations, with a
disturbance of 10 introduced over iterations 5 to 14, and a disturbance
of -6 introduced over iterations 26-29. The reference is 20.

Following is the C code and the results. You can see that the function
Mystery() uses only the percept and reference. Note that the mystery
function produces the negative of the output (compare the qo and the qX
columns). On the assumption, which Rick Marken has agreed to, that the
output contains almost 100% of the information about the disturbance, then
the percept must also contain this information.

So, if Rick is going to continue to insist that there is no information
about the disturbance in the percept, he will have to reject his claim that
the output has almost all of this information. These two claims are
logically inconsistent, which can be seen quite clearly in this
simulation.

If Rick Marken and/or Bill Powers agree with this, it may not be
necessary to do my own experiment. But I'll go ahead with it anyway,
unless Rick and Bill tell me its unnecessary. Martin's experiment has
an advantage over mine in being simpler and more intuitive. Mine has the
advantage of being based directly on the mathematics of information theory.
But in both cases, the functions being computed (Mystery() and H(D|P)) are
exact replications of the original closed-loop output. This is why the
claim that disturbance cannot be extracted from the percept, but *can* be
extracted from the output seems *so* contradictory to Martin and me. It
hardly seems like these experiments should be necessary.

Allan Randall, randall@dciem.dciem.dnd.ca
NTT Systems, Inc.
Toronto, ON

···

-----------------------------------------

/* Martin Taylor's Mystery Function */
/* Based on Bill Powers' Primer */
/* Allan Randall, Martin Taylor, Jeff Hunter */

#include <stdio.h>

int max_loop,i; /* number of iterations, loop counter*/
int dist_time; /* iterations between disturbances */

double qi, qo, qd, qX; /* input, output, disturbance, mystery */
double sp, sr, se; /* percept, reference, error */
double ki, ko, kf; /* constants: in, out, feedback */
double dt; /* time step of discrete simulation */

/* The output function */
double Output(e)
double e;
{
return (qo + ko*e*dt);
}

/* The mysterious function that uses r and p *only* to reconstruct d */
double Mystery(r,p)
double r,p;
{
double e;

e = r - p;
return (qX - ko*e*dt);
}

main ()
{
max_loop = 50;
dist_time = 1;

sr = 20.0;

qi = qo = qd = qX = 0;

ki = 1.0;
ko = 8.0;
kf = 1.0;
dt = 0.1;

printf (" qd qi sp se qo
qX\n\n");

/* MAIN LOOP */
for (i=0; i<max_loop; i++) {
/* Disturbance */
if (i > 4 && i < 15) qd = qd + 1;
if (i > 26 && i < 30) qd = qd - 2;

/* Percept */
qi = kf*qo + qd;
sp = ki*qi;

/* Iterate the Mystery Signal */
/* Will it match the disturbance??? */
qX = Mystery(sr,sp);

/* Iterate the Output Signal */
se = sr - sp;
qo = Output(se);

printf ("%4d: qd=%7.3f qi=%7.3f sp=%7.3f se=%7.3f qo=%7.3f qX=%7.3f\n
", i, qd, qi, sp, se, qo, qX);
}
}

-------------------------------------------------
RESULTS:

Reference = 20 (constant)

qd qi sp se qo qX

0: qd= 0.000 qi= 0.000 sp= 0.000 se= 20.000 qo= 16.000 qX=-16.000
1: qd= 0.000 qi= 16.000 sp= 16.000 se= 4.000 qo= 19.200 qX=-19.200
2: qd= 0.000 qi= 19.200 sp= 19.200 se= 0.800 qo= 19.840 qX=-19.840
3: qd= 0.000 qi= 19.840 sp= 19.840 se= 0.160 qo= 19.968 qX=-19.968
4: qd= 0.000 qi= 19.968 sp= 19.968 se= 0.032 qo= 19.994 qX=-19.994
5: qd= 1.000 qi= 20.994 sp= 20.994 se= -0.994 qo= 19.199 qX=-19.199
6: qd= 2.000 qi= 21.199 sp= 21.199 se= -1.199 qo= 18.240 qX=-18.240
7: qd= 3.000 qi= 21.240 sp= 21.240 se= -1.240 qo= 17.248 qX=-17.248
8: qd= 4.000 qi= 21.248 sp= 21.248 se= -1.248 qo= 16.250 qX=-16.250
9: qd= 5.000 qi= 21.250 sp= 21.250 se= -1.250 qo= 15.250 qX=-15.250
10: qd= 6.000 qi= 21.250 sp= 21.250 se= -1.250 qo= 14.250 qX=-14.250
11: qd= 7.000 qi= 21.250 sp= 21.250 se= -1.250 qo= 13.250 qX=-13.250
12: qd= 8.000 qi= 21.250 sp= 21.250 se= -1.250 qo= 12.250 qX=-12.250
13: qd= 9.000 qi= 21.250 sp= 21.250 se= -1.250 qo= 11.250 qX=-11.250
14: qd= 10.000 qi= 21.250 sp= 21.250 se= -1.250 qo= 10.250 qX=-10.250
15: qd= 10.000 qi= 20.250 sp= 20.250 se= -0.250 qo= 10.050 qX=-10.050
16: qd= 10.000 qi= 20.050 sp= 20.050 se= -0.050 qo= 10.010 qX=-10.010
17: qd= 10.000 qi= 20.010 sp= 20.010 se= -0.010 qo= 10.002 qX=-10.002
18: qd= 10.000 qi= 20.002 sp= 20.002 se= -0.002 qo= 10.000 qX=-10.000
19: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
20: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
21: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
22: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
23: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
24: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
25: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
26: qd= 10.000 qi= 20.000 sp= 20.000 se= -0.000 qo= 10.000 qX=-10.000
27: qd= 8.000 qi= 18.000 sp= 18.000 se= 2.000 qo= 11.600 qX=-11.600
28: qd= 6.000 qi= 17.600 sp= 17.600 se= 2.400 qo= 13.520 qX=-13.520
29: qd= 4.000 qi= 17.520 sp= 17.520 se= 2.480 qo= 15.504 qX=-15.504
30: qd= 4.000 qi= 19.504 sp= 19.504 se= 0.496 qo= 15.901 qX=-15.901
31: qd= 4.000 qi= 19.901 sp= 19.901 se= 0.099 qo= 15.980 qX=-15.980
32: qd= 4.000 qi= 19.980 sp= 19.980 se= 0.020 qo= 15.996 qX=-15.996
33: qd= 4.000 qi= 19.996 sp= 19.996 se= 0.004 qo= 15.999 qX=-15.999
34: qd= 4.000 qi= 19.999 sp= 19.999 se= 0.001 qo= 16.000 qX=-16.000
35: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
36: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
37: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
38: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
39: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
40: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
41: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
42: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
43: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
44: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
45: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
46: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
47: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
48: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000
49: qd= 4.000 qi= 20.000 sp= 20.000 se= 0.000 qo= 16.000 qX=-16.000

[From Rick Marken (930401.1800)]

Allan Randall (930401.1700 EST) --

Before doing my own experiment to compare H(D) and H(D|P), I've done Martin's
"Mystery function" experiment, since it is the simpler of the two.

Hooray! Too bad Martin said today that it doesn't test the question
of whether there is information about the disturbance in perception.
But I'll stick with it.

On the assumption, which Rick Marken has agreed to, that the
output contains almost 100% of the information about the disturbance, then
the percept must also contain this information.

If I made that assumption then I was wrong. What I have learned from
running these simulations is that when information is "blocked" by
the closed loop, then it is "blocked"; NO INFORMATION GETS THROUGH
TO THE OUTPUT. That is why there is NO PARADOX involved when we say
that there is no information about the disturbance in the perception;
this is a paradox if you imagine (as, I must admit, I did) that
there is information about d being transferred to o via p. This would
indeed be paradoxical. What I SHOULD have been saying is that there
is no information about the distrubance in p, and, thus, there is also
no information in o about d. The opposition of o to d is not the result
of information being transferred from d to o. It is (as I HAVE said)
a SIDE EFFECT of the operation of the closed loop. The bottom line --
a control system LOCKS INFORMATION OUT THE SYSTEM. No information
gets in via p, no information gets transferred to o. An effective
control system is the enemy of information (maybe that's why control
theorists fight so hard against information theorists).

So, if Rick is going to continue to insist that there is no information
about the disturbance in the percept, he will have to reject his claim that
the output has almost all of this information.

Absolutely right! I am going to continue to insist that there is no
information about the disturbance in controlled perception so I hearby
RECANT and REJECT any claim I ever made that the output has ANY (let alone
most of the) information about the disturbance. The output (like Martin's
mystery function) has NO information about the disturbance. There is
NO signal or variable that is part of the negative feedback loop
of a control system that has ANY information about the distrubance.
Indeed, there is NO information about d INSIDE of a control system --
the control system keeps information OUT. To the extent that a control
system fails to keep information out (as when there is poor control)
then this information can be used by the reorganizing system to improve
the ability of the control system to keep information OUT (as Bill P.
mentioned earlier today -- by tuning up the output function); it cannot be
(and is not) used as part of the operation of the control system itself.

Thanks for doing the simulation and thanks for the data.

Now it's all clear, right?

Best

Rick

[Allan Randall (930402.1000 EST)]

Rick Marken (930401.1800)

> On the assumption, which Rick Marken has agreed to, that the
>output contains almost 100% of the information about the disturbance, then
>the percept must also contain this information.

If I made that assumption then I was wrong. What I have learned from
running these simulations is that when information is "blocked" by
the closed loop, then it is "blocked"; NO INFORMATION GETS THROUGH
TO THE OUTPUT.

Yes! This was exactly the entire point of Ashby's Law. Ashby defined
control as the blockage of disturbance information. This is the
whole idea that I have been pushing from square one. Perhaps we are
in agreement after all? Martin's and my experiments were, in their
current forms, intended to show the contradiction in your previous
position: that there could be information about D in the output but
not in the percept. If you now accept this point, then great, we can
move on from there.

I will still claim there is information about the disturbance in
perception, but I would not consider any counterclaim you might make
to be quite as "obviously contradictory" as I did before.

Absolutely right! I am going to continue to insist that there is no
information about the disturbance in controlled perception so I hearby
RECANT and REJECT any claim I ever made that the output has ANY (let
alone most of the) information about the disturbance.

I've said it many times before, but this is probably an appropriate
time to reiterate, in PCT terms, Ashby's central point about error
control. The purpose of the control system is to block the flow of
information from disturbance to percept. Because the disturbance is
not predictable, it must be countered through the detection of errors.
Thus, while the system may be able to reduce the information flow
from D to P to near zero, it cannot reduce it to exactly zero. The
incomplete information about D that does manage to get through the
almost perfectly blocked channel is *not* useless information. This
is the information from which error is extracted and output
generated, which allows the channel to remain (mostly) blocked.

Your claim that there is no information about disturbance in
CONTROLLED perception is not the claim I have been arguing against.
I think you will need to make it more explicit. As it stands, this
statement could possibly be interpreted as a restating of Ashby's
main argument, but ONLY if you agree that perfect control is not
possible. So I really have no problem with your claim as stated
above. I *would* have a problem with the following claim: "In a
good error-controller, there is NO information about disturbance
in the perceptual signal that is useful for control." Is this a
position you are willing to defend, or are we now in agreement?

Ashby's point was that this information about the disturbance in the
percept is the very information used to achieve control in the
first place. So perfect control is strictly an impossibilty for error
control. It is the (perhaps very small) imperfections in the percept
that allow control against larger errors. The perfect, infinite-gain,
infinite-speed error controller you seem to be imagining could, of
course, block the channel perfectly. But think about what this would
mean. It is the error (signal of an imperfection in control) that
generates a properly opposing output. If the channel were 100%
blocked, due to error control, the system would have to "time travel"
back in time to correct errors before they occur. This is not a
physical possibility. Once error has been generated, it is too late to
correct that error - you can only oppose further error. No system
can react infinitely fast. By arguing against Ashby's Law, you make
Ashby's point quite well.

To the extent that a control
system fails to keep information out (as when there is poor control)
then this information can be used by the reorganizing system to improve
the ability of the control system to keep information OUT (as Bill P.
mentioned earlier today -- by tuning up the output function); it cannot be
(and is not) used as part of the operation of the control system itself.

This sounds like we do still have a disagreement. I would claim that
this information not only *is* used "as part of the operation of the
control system itself," but that this information *is* the essential
information that the system uses for control. Under my view, the whole
idea of the perceptual input function is to gather information about
disturbance in the environment, so that this disturbance may be
controlled against.

Since we are now agreed on Martin's experiment, I assume you also
agree on the outcome of my experiment? Assuming that the disturbance
is 100% represented in the output, then it follows logically that
H(D|P) < H(D), right?

Thanks for doing the simulation and thanks for the data.

Now it's all clear, right?

Not perfectly clear, but I think we're making progress.

···

-----------------------------------------
Allan Randall, randall@dciem.dciem.dnd.ca
NTT Systems, Inc.
Toronto, ON