home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / bit / listserv / csgl / 946 < prev    next >
Encoding:
Text File  |  1992-09-08  |  5.4 KB  |  159 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!wupost!uwm.edu!psuvax1!psuvm!auvm!URC.TUE.NL!ELEMHANS
  3. X-Envelope-to: csg-l@UIUCVMD.BITNET
  4. X-VMS-To: IN%"csg-l@uiucvmd.bitnet"
  5. X-VMS-Cc: ELEMHANS
  6. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  7. Content-transfer-encoding: 7BIT
  8. Mime-Version: 1.0
  9. Message-ID: <01GOIBDDD6XE9AMPT4@URC.TUE.NL>
  10. Newsgroups: bit.listserv.csg-l
  11. Date:         Mon, 7 Sep 1992 15:49:40 +0100
  12. Sender:       "Control Systems Group Network (CSGnet)" <CSG-L@UIUCVMD.BITNET>
  13. From:         HANS BLOM <ELEMHANS@URC.TUE.NL>
  14. Subject:      replies and a demo
  15. Lines: 142
  16.  
  17. [From Hans Blom (920907)]
  18.  
  19. Some replies and remarks. Sorry for the delay. My modem broke down and I had to
  20.     wait
  21. for a new one.
  22.  
  23.  
  24. Avery Andrews 920901.0957
  25.  
  26. >The anesthesia monitoring systems sounds like an instructive integration
  27. >of thought and action - is there a comprehensive writeup anywhere?
  28.  
  29. Expert control of the  arterial blood pressure during surgery.  International Jo
  30.    urnal
  31. of Clinical Monitoring and Computing 8: 25-34, 1991.
  32.  
  33.  
  34. Rick Marken (920831.1100)
  35.  
  36. >Right. "The test for the controlled variable" is how you determine whether
  37. >or not control is involved in any observed behavior.
  38.  
  39. I agree. But... This isn't  always feasable. Please run my coli  simulation (inc
  40.    luded
  41. below). Now 'The  Test', in  my opinion, would  mean to  pick up coli,  put him
  42.     down
  43. somewhere else,  observe its  behavior and  check whether the  change in  positi
  44.    on is
  45. resisted or undone. I  do not see resistance. I do not see behavior that is diff
  46.    erent
  47. from coli's normal behavior. Or is it there, but is the problem that I cannot se
  48.    e it?
  49. As I see it, coli is too primitive to be able to control. At most  it _tries to_
  50.    , but
  51. doesn't quite succeed. Maybe, in its environment, this is optimal?
  52.  
  53. >> Two:  what do  we  mean by 'control'?
  54.  
  55. >Production of consistent results in the face of disturbnce.
  56.  
  57. I  do not  recognize consistency  of results  when there  is so little  regulari
  58.    ty in
  59. behavior in the first place.
  60.  
  61. >By the way. Your description of your e. coli model was somewhat puzzling.
  62. >When, for example, does your e. coli model change to a new direction?
  63.  
  64. At every step, i.e. every new run of the simulation.
  65.  
  66. >What is the criterion for change?
  67.  
  68. There is no criterion for  change. That would require a memory, which  I do not
  69.    think
  70. coli has. Every decision is new, based on the current observation only.
  71.  
  72. >In our models, a "counter" is set after each tumble. The rate at which it
  73. >counts down depends on the currently experienced gradient of attractant.
  74.  
  75. In my model, coli has  neither a counter (memory) nor a sensor  to sense gradien
  76.    ts. I
  77. assume it is too primitive for either.
  78.  
  79. program e_coli;       { simulation of E. coli behavior }
  80. { written in Turbo Pascal for IBM-PC or compatible
  81.  
  82.   simulation ends     1. when a key is pressed
  83.                       2. when coli escapes into infinity
  84.                          (which so far it always did, eventually)
  85. }
  86.  
  87. uses
  88.   crt, graph;
  89.  
  90. const
  91.   scale =  1.4;       {graphics scaling; adjust to zoom in/out}
  92.   rad0 =  50.0;       {initial radius; coli is let go here}
  93.   radx = 100.0;       {influence radius; outside this radius sensor no good}
  94.   radw =  10.0;       {optimum feeding radius}
  95.   rmax = 500.0;       {beyond this radius coli is considered lost}
  96.  
  97. var
  98.   x, y, r:            real;        {current coordinates and radius}
  99.   xm, ym, xxm, yym:   integer;     {screen pixel sizes}
  100.   xs, ys:             real;        {scaling constants}
  101.   c:                  char;        {stop simulation?}
  102.  
  103. procedure grinit; {initialize graphics stuff}
  104. var
  105.   driver, mode: integer;
  106. begin
  107.   detectgraph (driver, mode);
  108.   initgraph (driver, mode, '');
  109.   if graphresult <> grok then
  110.     begin writeln ('cannot find graphics driver'); halt end;
  111.   xm := getmaxx; ym := getmaxy;
  112.   xxm := xm div 2; yym := ym div 2;
  113.   xs := scale * xm / 200.0; ys := scale * ym / 150.0;
  114.   { plot circles of radii 10, 50 and 100 }
  115.   ellipse (xxm, yym, 0, 360, round ( 10.0 * xs), round ( 10.0 * ys));
  116.   ellipse (xxm, yym, 0, 360, round ( 50.0 * xs), round ( 50.0 * ys));
  117.   ellipse (xxm, yym, 0, 360, round (100.0 * xs), round (100.0 * ys))
  118. end;
  119.  
  120. procedure move; {take one step}
  121. var
  122.   s, u, dx, dy : real;
  123.   t: string [12];
  124. begin
  125.   {calculate response strength}
  126.   s := r; if r > radx then s := radx;          {s = 0 .. radx}
  127.   s := 0.2 * abs (s - radw);                   {step size, but ...}
  128.   if s < 0.1 then s := 0.1;                    { ... minimum step size}
  129.  
  130.   {calculate random direction unit vector}
  131.   dx := 2 * random - 1; dy := 2 * random - 1;  {select random direction}
  132.   u := sqrt (dx * dx + dy * dy);
  133.   dx := dx / u; dy := dy / u;                  {random unit vector}
  134.  
  135.   {do one move of length s}
  136.   x := x + s * dx; y := y + s * dy;            {update position}
  137.   r := sqrt (x * x + y * y);                   {compute new radius}
  138.  
  139.   {plot position as a pixel}
  140.   putpixel (xxm + round (xs * x), yym + round (ys * y), white);
  141.  
  142.   {print radius in upper left corner}
  143.   setviewport (1, 10, 60, 20, true); clearviewport;
  144.   str (r:6:0, t); outtext (t);
  145.   setviewport (0, 0, xm, ym, true)
  146. end;
  147.  
  148. begin
  149.   randomize;                                   {initialize random generator}
  150.   grinit;                                      {initialize graphics}
  151.   x := sqrt (0.5 * rad0 * rad0); y := x;       {initialize position}
  152.   r := sqrt (x * x + y * y);
  153.   repeat
  154.     move                                       {take one step }
  155.   until (abs (r - radw) > rmax) or keypressed; {till coli lost or you tired}
  156.   c := readkey;
  157.   closegraph
  158. end.
  159.