|
Brain State in a Box (BSB & gBSB)
The following function, abcd(L), produces a gray "checkerboard" plot of the given n1-by-n2 matrix L. Unlike the PCOLOR function, ABCD uses the last row and column of the matrix L. This function was last updated on March 31, 2001 by S. H. Żak. MATLAB FUNCTION You may download the Matlab code here. function abcd(L) % ABCD produces a gray "checkerboard" plot of the given n1-by-n2 matrix L. % Unlike the PCOLOR function, ABCD uses the last row and column of % the matrix L. % last updated on March 31, 2001 by S. H. Żak n1=size(L,1); n2=size(L,2); u=ones(n1,1); v=ones(1,n2+1); La=[L u;v]; pcolor(La) colormap(gray) axis('ij') axis('square') axis off The following Matlab script creates the four equilibrium solutions, which are also the four characters that the (g)BSB algorithm attempts to identify. The following script also displays the four characters: "A", "B", "C", amp; "D".
MATLAB SCRIPT
A1=[1 -1 -1 -1 1;-1 1 1 1 -1;-1 -1 -1 -1 -1;-1 1 1 1 -1;-1 1 1 1 -1];
B1=[-1 -1 -1 -1 1;-1 1 1 1 -1;-1 -1 -1 -1 1;-1 1 1 1 -1;-1 -1 -1 -1 1];
C1=[-1 -1 -1 -1 -1;-1 1 1 1 1;-1 1 1 1 1;-1 1 1 1 1;-1 -1 -1 -1 -1];
D1=[-1 -1 -1 1 1;-1 1 1 -1 1;-1 1 1 -1 1;-1 1 1 -1 1;-1 -1 -1 1 1];
% Display equilibrium characters
hold on;
figure(1);
subplot(221);
abcd(A1);
title('Stored A');
subplot(222);
abcd(B1);
title('Stored B');
subplot(223);
abcd(C1);
title('Stored C');
subplot(224);
abcd(D1);
title('Stored D');
The following gBSB Algorithm identifies the four characters shown above from a randomly integer valued 5 X 5 matrix. MATLAB CODE You may download the Matlab code here. RESULTS The four characters "A", "B", "C", & "D" are all correctly identified using the gBSB algorithm. The iterations are shown below. This algorithm does not reach spurious states nearly as much as the BSB. Also, there does not seems to be nearly as many spurious states as the BSB. We were able to find one two spurious states for this gBSB. The BSB algorithm is a special case of the gBSB algorithm when W = V*V' and b = 0. The results, shown below, are not as successful as the gBSB algorithm. MATLAB CODE You may download the Matlab code here. RESULTS Because b = 0, the complements of the equilibrium states are also achievable by the BSB algorithm. The "A" and "B" complements are shown below. Also, because the weight matrix does not eliminate spurious states, not every randomly generated input achieves one of the desired equilibrium states. Shown below are two seperate spurious states, which are linear combinations of the four desired equilibrium states, and one of the spurious state's complements. There are several spurious states for the BSB. There are certianly more spurious states found in the BSB then that gBSB. The gBSB Algorithm is a better identifier of the pattern. However, the BSB Algorithm is computationally much faster than the gBSB algorithm. One thing to note from the above examples is that the input is a random integer (1, -1) matrix and not a noise distorted input of one of the desired states. As a result, the random matrix has a higher probability of achieving one of the spurious states. Therefore, should there only be a small amount of noise, the BSB algorithm would be more than sufficient in identifying the noisy input. Should the input have much greater noise, then the gBSB algorithm may be necessary, despite the greater computational times, in order to identify a desired equilibrium state. |