SD3an.pas

[From Bill Powers (950308.1325 MST)]

Bruce Abbott (950307.19:40 EST)--

Boy, you are one fast programmer! I got the SD3an.pas and it works fine
-- I'm going to stop saying that, because all your programs work fine.
Your display color correction noted.

Low correlations can result from picking the wrong target to start with,
or as you say, from a learning period. I know the secret, of course, so
I start with SDtest3 knowing what to do.

My correlations were about 0.94 for two runs, with an RMS error of about
37. When I looked at the display, I realized that there is a
considerable lag in switching to the new target. So I went into your
program and changed the fitting program to use a delayed version of the
state marker. The altered function is listed at the end.

Here are the results for a series of runs with different delays:

delay k correlation RMS
0 0.0195 0.945 37.37
30 0.0430 0.976 25.0
35 0.0529 0.978 24.35
37 0.0582 0.978 24.04
40 0.0682 0.977 24.24

As you can see, the correlation can be increased and the RMS prediction
error can be decreased substantially by using the delay parameter.

There seems to be over 1/2 second delay (in me) before the SD is
recognized and the move toward the new target is implemented. From the
fit of the model to the data, the switch itself (after the delay) seems
to be essentially instantaneous, so there is about 37/60 second of
processing time and shifting of vision involved here. It is very nice to
know that the control itself is per the usual model, however.

I didn't realize until I looked at the graphic display that there is a
disturbance of the cursor! During the runs I didn't notice it. This is a
very important part of this model and I'm glad you included it. It rules
out any idea that the _motor response_ is what is learned, because the
mouse position varies with the disturbance.

I've starting some thinking about the higher-level systems. We can use a
simple control system perceiving cursor minus target position (c - t) as
one control system. The reference level can be zero, or any other
amount. A second control system would center the image of one of the two
targets in the visual field, and that target position would become the
"t" in the first control system. However, I found myself starting the
move toward the other target as soon as the color changed, and only then
looking at the other target. So there are some alternatives here. We
might want to model the saccadic delay and the successive-approximation
control it involves. On the other hand, there's no sign of the visual
jumps in the data, so perhaps it is simply the attention that is
switched to the new target. Since the controlled variable is target
minums cursor, it shouldn't matter exactly where the center of vision
is.

What remains to be modeled is the higher system that brings the
appropriate target to the center of vision depending on whether the SD
is red or green, and the top level system which keeps the score
increasing (or the beeps occurring). There isn't a lot to go on for
choosing these parts of the model.

To investigate the higher systems in a little more detail, we should
probably use about 5 targets and 5 colors of the cursor. If the
relationship of color to target is randomized at the beginning of a
series of runs, we could see the process by which the person learns
which position goes with which color. There should be enough memory to
store a 5-minute run (that's 36000 bytes per array). You may want to
switch to storing the binary data for such long runs; the ASCII files
would tend to get pretty big.

···

--------------------------------------
Before we get too carried away by this experiment, how are "our" rats
doing? Any problems getting the apparatus set up? Are any of them still
alive?
---------------------------------------------------------------------
General: I'm more or less going to ignore our philosophical threads,
although others may want to carry them on. People are coming up with
good questions, but good answers are coming up too from Bill Leach and
others.

If there are any of you who want to run these programs, I think that
Bruce Abbott can be persuaded to put them on his server and repeat the
instructions for downloading them to a PC. Rick Marken has started
looking into modifications for compiling the programs with his Mac
Pascal, so it may be that our Mac users will soon be able to try the
experiments, too. All comments and observations are useful; you don't
have to be a programmer to notice phenomena that need modeling. No
guarantee that we will figure out ways to model everything, but we'll
try the ones that look possible and interesting.
---------------------------------------------------------------------
Best,

Bill P.

function ModelRun: real;
var
  i,lag: integer;
  handle, newsumsq, error, p, temp,
  ref, ref1, ref2: real;
begin
  ref1 := 1.0*(MaxX div 3 - MaxX div 2);
  ref2 := -ref1;
  newsumsq := 0.0;
  handle := h^[1];
  ref := state^[1];
  lag := 40;
  for i := 1 to NPoints do
  begin
    p := handle + d^[i];
    if i > lag then
     if state^[i - lag] = 1 then ref := ref1 else ref := ref2;
    error := p - ref;
    handle := handle - k*error;
    mh^[i] := round(handle);
    temp := 1.0*h^[i] - handle;
    newsumsq := newsumsq + temp*temp;
  end;
  modelrun := newsumsq;
end;