Home - under construction

Here I demonstrate an adapted Crowd simulation, whose original version was developed by William T. Powers. The original simulation could be found at his home page and Living Control Systems Publishing. To those who are not familiar with the Crowd simulation, I suggest you download the original program, read related documents, and try it out. Moreover, knowledge about Perceptual Control Theory would help.

This simulation was designed to experiment a hypothesis about attentional modulated reorganization.

How to run the simulation

The adapted Crowd simualtion was programmed in Java and embedded into an applet. The Google Sites, however, by which this page is hosted, does not support embedded applet at this moment. Therefore, I attached the crowd.zip embracing the compressed java applet and a viewer html document. You may download the file in the "Attachments" section at the bottom of this page, unzip it, and open the crowd.html in a browser supporting java applet.

I was intended to put the applet on crowdreorg.googlepages.com where the simulation can be demonstrated online. However, I am not able to visit the googlepages for months.


Here is a screenshot of what you will see after the applet is initiated. Red notes indicate the program layout.

Field view

The scrollable panel at the top presents a view of the field. By default, on the field there are 20 individuals, represented by numbered colored circles, placed randomly. They are transparent to each other; no collision and communication would happen among them. These individuals are put together to short the waiting time for the emergence of functional individuals. 

The field is infinite, but obstacles are distributed in a finite area.

Attention indicators panel

Attentional indicators indicating the derivative and the integral of intrinsic errors will be displayed here as red blocks.

Setup panel

Two groups of text fields lie on this panel. Within the "weights" frame, these values set up connections of an individual's control systems. These text fields show the weights of the current monitored individual indicated by the number on control panel below. From the top left to the bottom right, text fields on "Weights" panel represent

 w11 w12
 w21 w22
 w31 w32
 w41 w42

Text fields on the "Reorganization Gains" panel represent

 g11 g11
 g21 g22
 g31 g32
 g41 g42

They are editable through the simulation. For detailed meaning of each textfields, please refer to the "How it works" section.

After clicking the "start" button, all individuals on the field are initiated with the value in these 16 text fields, say their control systems are identical at the beginning.

Control panel

The checkbox "display trails" toggles the exhibition of trails after individuals.

The only text field on the control panel indicates the index of the individual monitored at this moment. Weights of control systems in the monitored individual will be displayed in the "Weights" frame on the setup panel.  If the checkbox preceding this textfield is checked, the field view will focus on the monitored individual no matter where it is.

Clicking the "Put it elsewhere" button will move the monitored individual to a randomly selected start position.

On the following line, the checkbox "attention on" will toggle the attentional modulation.When it is not checked, you mey have to alter reorganization gains to compensate for losing ampilifiation gains assigned in the attentional modulation.

Clicking the "Reset gains" button will set the reorganization gains back to their default values. They could be evolved using genetic algorithms with fitness function concerned with the stability and the convergence speed of the reorganization.


This is what you will see after clicking the "Start" button. They start with functional weights inherited from the original Crow

Following two sample tests would give you an impression about how this attentional modulated reorganization works. You may try your own settings.

Sample Test 1

Reset weights to their default values (clicking the "Reset Weights" button; this action will stop the running simulation), and bias the w12 to 0.05 (type the number in the text field). The error of proximity to their destination will propagate through this non-zero connection and make individuals turn against their destination.

Sample Test 2

Reset weights to their default values, and bias the w12 to 0.05, the w42 to -0.05. The result of first bias is same with the one in sample 1. The later bias would disable the direction controller in avoidance systems. As a result, the biased individual would run towards obstacles instead of avoiding them.

The diversity


Default reorganization gains are set with my intuition. They give a fine performance with both sample tests above. In living control systems, if these reorganization gains do exist in some forms, they must be encoded in genes hence are evolved. Higher stability and faster convergence of the reorganization will result in greater fitness; gains lead to these qualities would be selected and passed on. Genetic algorithm might be applied in future to find the best set of gains.

These gains are multiplied to a factor which is as tiny as 10-6. Then. the product will be modulated by the result of attentional competition, which you will see in the following section.

How it works

The control system diagram of an individual in the original crowd simulation

another perspective

In default negative feedback settings, Yi = X2i - X2i-1. To decrease is the intrinsic reference for these controllers.

Connection weights from comparators Yi are represented with wij; j denotes its destination actuators as depicted in the diagram above. These weights compose a space where biased random walk search (E-coli reorganization) is applied. gij modulated by the factor 10-6 and the result of attentional competition.

The competition embrace three steps:

  1. Get the attentional indicator for each control system by calculating the derivative and the integral of intrinsic errors respectively.
  2. Apply the softmax rule, so that differences among 4 indicators will get bigger.
  3. Regard the result of competition as probability of amplifying the gain. (Amplification is the way to modulate in this simulation)

Take an individual composed of two control systems for example. Let these two control systems be denoted by A and B. Suppose the attentional indicators to be 2 and 1 for control system A and B respectively. After the second step, they will be e2 and e (the base of the natural logarithm). The resulting probability of amplification for the reorganization related to the controller A will be 73.1% approximately (e2/(e2+e), according to the softmax rule). Its counterpart for controller B will be 26.9% approximately (e/(e2+e), according to the softmax rule).

Two trials will be taken to assign amplification gains to control systems; the number of trials is determined by the total number of control systems. In each trial, an amplification gain, 5 for example, has 73.1% probability to be assigned to the reorganization of controller A or it will be assigned to the reorganization of controller B. Thus, the speed of reorganization is correlated with the performance of intrinsic errors.


contact me: wang.b.frank AT gmail DOT com

Bo Wang,
2008年9月26日 上午2:15