# Reorganization

**URL:** http://discourse.iapct.org/t/reorganization/9763
**Category:** CSG2010
**Created:** [January 28, 2010, 10:21pm UTC](http://discourse.iapct.org/t/reorganization/9763 "2010-01-28T22:21:10Z")
**Posts on this page:** 1
**Showing post:** 27

<div class="post-metadata">

### Author: ![William\_T\_Powers2](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/w/c67d28/32.png) [@William\_T\_Powers2](http://discourse.iapct.org/u/William_T_Powers2)
#### Post date: [July 11, 1992, 7:59pm UTC](http://discourse.iapct.org/t/reorganization/9763/27 "1992-07-11T19:59:18Z")

</div>

[From Bill Powers (920711.0800)]

Martin Taylor (920710.1530) --

What I like about your proposal is the idea that there's a random-  
output reorganizing process operating in the (potential) CNS  
hierarchy, gradually being replaced by (or paralleled by) systematic  
control. This reorganizing process could monitor certain built-in  
aspects of potential control systems in the CNS, such as the signals  
being emitted by comparators (which are so simple that we can assume  
them to be part of the initial complement of parts). Also, the brain  
is physically organized so that sensory computers tend to be lumped  
together, as do motor output computers. There may be aspects of these  
more or less localized networks that permit monitoring for invariance,  
negative feedback relations between motor and sensory signals, and so  
on -- without an implication that the reorganizing process knows in  
advance what perceptions or actions will be appropriate for the  
current environment.

One bit of confusion was caused by my using "sensing" in an ambiguous  
way. I agree, of course, that all control requires sensing. When I  
said that intrinsic variables were outside the sensory interface, I  
meant that they are outside the CNS sensory interface. I don't think  
that chemical sensors and comparators can be counted as part of the  
CNS hierarchy. If some biochemical states of the organism become parts  
of experience (as in emotions), they must affect neural sensors  
connected to the CNS. Under my concept of the reorganizing process, if  
biochemical states are to become a basis for reorganizing, they would  
be sensed in some other way, probably by chemical or autonomic  
sensors. To the CNS, sensed internal states are no different from  
sensed external states; they are simple data about the current state  
of affairs in the world outside the CNS. They have no value or any  
built-in reference states as far as the CNS is concerned.

> Let's say that the photon-based reaction affected the concentration  
> of CO2 in the organism. Then if the wiggle-motor became more  
> specifically sensitive to deviations in the CO2 level, both above and  
> below optimum, then the organism would begin to control for light  
> level.

You're making the photon reaction itself produce the CO2. What I'm  
interested in is the case in which the photons arise from some object,  
the presence of which implies some OTHER effect on CO2 in the body.  
The photons might come from a warning light that indicates a leak in a  
CO2 container. Now the organism has to learn to get out of there when  
the warning light (whistle, vibration) is sensed, even though the  
light itself is not the cause of the elevated CO2 tension in the  
bloodstream, and position in space, not CO2 tension, is the variable  
that becomes controlled. So the organism must learn to control for a  
specific level of one perception as a way of controlling another  
variable inside itself that has no necessary connection to the  
controlled perception, save for happenstance properties of the  
external world.

The pigeon has to be able to learn to walk in a figure eight (itself a  
control process) as a means of making food appear. Walking has no  
effect on improving nutritional state, save for the mad scientist in  
the environment. Something has to make the learning of one control  
process depend on an indirect and arbitrary effect of that control  
process on the environment, and by that indirect route on the internal  
state of the organism. This is the kind of thing that my reorganizing  
system is meant to accomplish. I don't think that any localized  
reorganizing principle could do it.

> **···**
>
> ------------------------------------------------------------------  
> I think that before we get any further into complicated arguments and  
> misunderstandings, we should do some work on simulating  
> reorganization. I'm going step by step on this, and am not ready to  
> show a whole indirect reorganizing process yet. At the moment, what I  
> have is a method of solving simultaneous equations by reorganization.  
> This is not meant to imitate any particular organismic process; that  
> comes a few steps further on. What it does is illustrate some  
> principles.
> 
> The basic setup is this:
> 
> There are 10 perceptual functions, each producting a linear function  
> of 10 environmental variables. The form of the linear functions is  
> generated by 10 weights for each of 10 perceptual functions, so that
> 
> p[i] = a[i,j]\*v[j], where 0 \<= i \< 9, 0 \<= j \< 9
> 
> The weights a[i,j] are generated at random in the range between -1 and  
> 1 and are fixed. The initial values of v[i] are zero.
> 
> There are also 10 fixed reference signals r[i], generated at random in  
> the range -50 to 50. Thus we can compute 10 error signals e[i] = r[i]  
> - p[i].
> 
> The reorganizing system computes the square root of the sum of squares  
> of all error signals, which is the distance in 10-dimensional  
> hyperspace between the point p[i] and the point r[i]. On each  
> iteration, the distance is compared with the distance on the previous  
> iteration, to provide a measure of velocity toward or away from the  
> point r[i].
> 
> If the velocity is positive on any iteration, a reorganization takes  
> place. For all negative velocities, the direction of movement  
> resulting from the last reorgnization is applied over and over.
> 
> Reorganization is a two-step process.
> 
> First, a 10-element vector delta[j] is filled with random numbers  
> between -1 and 1. It is normalized by dividing each entry by the  
> square root of the sum of the squares of all entries; this makes the  
> entries into direction cosines in a 10-dimensional space.  
> Reorganization thus changes the direction of this vector randomly in  
> 10-space. This normalization is not essential, but seems to make  
> convergence faster.
> 
> Second, the 10 elements of delta[j] are added to the 10 current values  
> of the environmental variables v[j] after multiplication by  
> "stepsize." This causes the complex environmental variable to move a  
> distance "stepsize" in hyperspace.
> 
> The loop is now closed, because that movement in hyperspace results in  
> a change in perceptions p[i] and therefore in the errors e[i].
> 
> The variable stepsize can be a small constant, or (for faster  
> convergence) can be proportional to the remaining hyperspace distance.  
> I have used the latter method.
> 
> Here is part of a run arbitrarily cut off at 5000 iterations:
> 
> Iteration Error left, # consecutive # consecutive  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fraction of max steps reorgs
> 
> n= 1 e/emax= 0.996 steps= 1 reorgs= 1  
> n= 14 e/emax= 0.978 steps= 12 reorgs= 1  
> n= 17 e/emax= 0.977 steps= 2 reorgs= 1  
> n= 24 e/emax= 0.975 steps= 5 reorgs= 2  
> n= 29 e/emax= 0.974 steps= 3 reorgs= 2  
> ...  
> n= 4968 e/emax= 0.011 steps= 8 reorgs= 1  
> n= 4974 e/emax= 0.011 steps= 3 reorgs= 3  
> n= 4984 e/emax= 0.011 steps= 8 reorgs= 2  
> n= 4990 e/emax= 0.011 steps= 1 reorgs= 5  
> n= 4994 e/emax= 0.011 steps= 3 reorgs= 1  
> -----------------------------------------------------------------
> 
> DATA SUMMARY after run:
> 
> Environmental variables (target of reorganization):
> 
> 49.84 13.35 -24.48 -3.29 25.79 14.76 -0.48 -9.68 67.15 -0.92
> 
> Perceptual coefficients (picked at random, normalized to 1.0):
> 
> -0.890 -0.460 -0.750 0.370 -0.850 0.840 0.610 0.630 -0.360 0.440  
> -0.850 0.060 -0.950 -0.950 0.530 -0.910 -0.150 0.370 0.400 0.200  
> -0.690 0.870 0.790 0.140 -0.570 0.100 -0.740 -0.390 -0.430 0.540  
> -0.390 -0.760 -0.400 0.720 -0.450 -0.760 0.340 -0.930 -0.560 0.130  
> -0.460 0.700 0.170 0.190 -0.360 0.550 0.990 -0.090 0.390 -0.800  
> 0.030 -0.810 -0.040 0.220 -0.440 -0.490 0.110 -0.280 0.560 -0.280  
> 0.640 -0.650 0.310 0.670 -0.970 0.050 -0.220 0.310 0.730 0.930  
> 0.650 -0.050 -0.240 -0.460 0.300 0.820 -0.750 -0.570 -0.430 -0.820  
> 0.030 -0.140 0.840 -0.910 0.200 0.140 0.310 0.200 0.790 -0.910  
> 0.750 0.870 -0.780 -0.360 0.470 -0.940 0.640 0.230 0.620 0.650
> 
> Perceptual signals:  
> -20.93 -30.02 930 10.08 33.01 -20.97 -0.87 15.00 36.93 -1.97
> 
> Reference signals (picked at random):  
> -21.00 -30.00 10.00 10.00 33.00 -21.00 -1.00 15.00 37.00 -2.00
> 
> Error signals:  
> -0.07 0.02 0.70 -0.08 -0.01 -0.03 -0.13 -0.00 0.07 -0.03
> 
> Count = 5001, RMS Err/max = 0.0106  
> ---------------------------------------------------------------------  
> What's interesting about this control system is that it is  
> independently controlling 10 perceptual variables with respect to 10  
> arbitrarily-selected reference signals, by means of randomly altering  
> 10 environmental variables on which all the perceptual variables  
> depend in different ways. The control employs only the total error,  
> not the error in each channel by itself.
> 
> As I mentioned in a previous post, I have also made this work by  
> reorganizing the coefficient matrix a[i,j], with the environmental  
> variables fixed at random settings. So we have proof of principle for  
> two major ways of reorganizing: reorganizing the input function, and  
> reorganizing the feedback link (the present case). There's no reason  
> why both modes of reorganization can't be going on at the same time.  
> All that matters is whether those two points in hyperspace are getting  
> closer together or farther apart.
> 
> The basic random process occurs between the total error signal and the  
> set of environmental variables. This set of variables could represent  
> whole control systems, with the random adjustments being made on the  
> forms of their input functions, the signs of output connections, and  
> the various factors influencing loop gain. This arrangement would look  
> like the one you're suggesting, where the CNS is reorganizing itself.
> 
> Here's the C function that does the actual reorganizing. Most of the  
> variables are globals. The init() routine and the routine that  
> calculates error signals are also included:
> 
> /\*below is called once per iteration \*/
> 
> void reorg(float \*e, /\* pointer to list of error signals \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int nerr, /\* number of error signals \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float \*delta, /\* pointer to motion array \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float \*var, /\* pointer to controlled variable array \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int nvar) /\* number of entries, delta & var array \*/  
> {  
> float temp;  
> static int numsteps = 0;  
> static int numreorg = 0;  
> static int newstate = 0; /\* state=0 means not reorganizing \*/  
> static int oldstate = 0;  
> lastesq = esq;  
> esq = 0.0;  
> for(m=0;m\<nerr;++m)  
> &nbsp;&nbsp;&nbsp;esq += e[m]\*e[m];  
> distance = sqrt(esq);  
> rate = distance - lastdistance;  
> lastdistance = distance;  
> stepsize = 0.7 \* distance/maxdistance;  
> if(rate \> 0.0)  
> &nbsp;&nbsp;{ /\* reorganize delta array \*/  
> &nbsp;&nbsp;&nbsp;newstate = -1;  
> &nbsp;&nbsp;&nbsp;++numreorg;  
> &nbsp;&nbsp;&nbsp;&nbsp;for(m=0;m\<nvar;++m) /\* pick all new deltas at random \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delta[m] = (rand() - 0.5\*RAND\_MAX)/(0.5\*RAND\_MAX);  
> &nbsp;&nbsp;&nbsp;&nbsp;temp = 0.0;  
> &nbsp;&nbsp;&nbsp;&nbsp;for(m=0;m\<nvar;++m) /\* normalize to 1.0 \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temp += delta[m]\*delta[m];  
> &nbsp;&nbsp;&nbsp;&nbsp;temp = sqrt(temp);  
> &nbsp;&nbsp;&nbsp;&nbsp;for(m=0;m\<nvar;++m)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delta[m] /= temp;  
> &nbsp;&nbsp;&nbsp;/\* delta now is a set of direction cosines \*/  
> &nbsp;&nbsp;&nbsp;}  
> &nbsp;&nbsp;&nbsp;else {++numsteps; newstate = 0;}
> 
> &nbsp;&nbsp;if(newstate != oldstate) /\* print consecutive # steps, # reorgs \*/  
> &nbsp;&nbsp;&nbsp;{  
> &nbsp;&nbsp;&nbsp;&nbsp;if(newstate == 0)  
> &nbsp;&nbsp;&nbsp;&nbsp;{  
> printf("\x0d\x0an= %6d e/emax= %7.3f steps= %3d reorgs= %2d",  
> &nbsp;&nbsp;count,distance/maxdistance,numsteps,numreorg);  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;numsteps = 0; numreorg = 0;  
> &nbsp;&nbsp;&nbsp;&nbsp;}  
> &nbsp;&nbsp;&nbsp;&nbsp;oldstate = newstate;  
> &nbsp;&nbsp;&nbsp;}
> 
> &nbsp;&nbsp;&nbsp;for(m=0;m\<nvar;++m) /\* move contr var in hyperspace \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var[m] += stepsize\*delta[m];  
> }  
> void calcerr() /\* compute all error signals \*/  
> {  
> &nbsp;&nbsp;&nbsp;for(m=0;m\<numvars;++m)  
> &nbsp;&nbsp;&nbsp;{  
> &nbsp;&nbsp;&nbsp;&nbsp;p[m] = 0;  
> &nbsp;&nbsp;&nbsp;&nbsp;for(n=0;n\<numvars;++n)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p[m] += v[m]\*a[m][n]; /\* compute perceptual variables \*/  
> &nbsp;&nbsp;&nbsp;&nbsp;e[m] = r[m] - p[m]; /\* compute error signals \*/  
> &nbsp;&nbsp;&nbsp;}  
> }
> 
> void init()  
> {  
> for(m=0;m\<numvars;++m)  
> &nbsp;&nbsp;{  
> &nbsp;&nbsp;&nbsp;r[m] = random(100) - 50;  
> &nbsp;&nbsp;&nbsp;delta[m] = 0;  
> &nbsp;&nbsp;&nbsp;for(n=0;n\<numvars;++n)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a[m][n] = 0.01\*(random(200) - 100);  
> &nbsp;&nbsp;}  
> &nbsp;&nbsp;count = 0;  
> &nbsp;&nbsp;maxdistance = 0.0;  
> &nbsp;&nbsp;for(m=0;m\<numvars;++m)  
> &nbsp;&nbsp;&nbsp;maxdistance += r[m]\*r[m];  
> &nbsp;&nbsp;maxdistance = sqrt(maxdistance);  
> }
> 
> Feel free to use, modify, etc.  
> ---------------------------------------------------------------------  
> Best
> 
> Bill P.

---

_[View the full topic](http://discourse.iapct.org/t/reorganization/9763)._
