Home » Personal collection » Acorn ADFS disks » Archimedes » Files.ADF » BioBot/BBReal

BioBot/BBReal

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Archimedes » Files.ADF
Filename: BioBot/BBReal
Read OK:
File size: 1C09 bytes
Load address: FFFFFB45
Exec address: BC76B8B9
File contents
   10 REM BallBot V2.0
   20 REM Real-Time Version
   30 REM (C) Dominic Ford 1997
   40 :
   42 REM Welcome screen
   44 MODE6:PRINT" BallBot Artificial Intelligence Module"'"Simulation Tester V2.0 Real Time Version"''"Programmed and Designed by Dominic Ford"''SPC(16);"(C) 1997"
   45 PRINT'''"Press <SPACE>"
   48 REPEAT UNTIL INKEY(-99)
   49 :
   50 REM Setup variables
   60 VOICE 1,"StringLib-Soft":*STEREO 1 0
   70 VOICE 2,"StringLib-Soft":*STEREO 2 -127
   80 VOICE 3,"StringLib-Soft":*STEREO 3 127
   90 current=0:DIMball(4,1):bbx=640:bby=950:dir=270:PROCsetupbb
  100 MODE15:MOUSE ON:PROCdrawfull
  110 :
  120 REM Start main loop
  130 REPEAT:T=TIME
  140 PROCuser
  150 IF idle THEN UNTIL FALSE
  160 PROCsense
  170 mov=FNai(freqa,freqb,freqc)
  180 fwd=(mov AND 1)<>0
  190 reverse=(mov AND 2)<>0
  200 left=(mov AND 4)<>0
  210 right=(mov AND 8)<>0
  215 turbo=(mov AND 16)<>0
  220 PROCmoveit
  230 REPEAT UNTIL TIME>(T+15)
  240 UNTIL FALSE
  250 :
  260 REM Graphic interface
  270 DEFPROCdrawfull
  275 REM Set up constants
  280 LOCALsx,sy,width
  290 sx=1:sy=2:width=5
  295 REM Draw green court area
  300 CLS:GCOL0,%001100:RECTANGLE FILL 0,0,1279,1023
  305 REM Mark out white lines onto court
  310 GCOL0,%111111:RECTANGLE FILL sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:RECTANGLE FILL sx/(23.77+2*sx)*1280,(1.37+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
  320 RECTANGLE FILL sx/(23.77+2*sx)*1280,(9.6+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:RECTANGLE FILL sx/(23.77+2*sx)*1280,(10.97+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
  330 RECTANGLE FILL (sx+5.47)/(23.77+2*sx)*1280,(sy+5.49)/(10.97+2*sy)*1024,12.8/(23.77+2*sx)*1280,width
  340 RECTANGLE FILL sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024:RECTANGLE FILL (sx+23.77)/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024+width
  350 RECTANGLE FILL (sx+5.47)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024:RECTANGLE FILL (sx+18.3)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024
  360 :
  370 REM Draw net
  380 GCOL0,0:FORl=100TO924STEP10:MOVE 640,l:DRAW 680,l+50:NEXT:FORl=0TO40STEP10:MOVE 640+l,100+l:DRAW640+l,924+l:NEXT:FORl=0TO5:MOVE637+l,100:DRAW677+l,150:MOVE637+l,924:DRAW677+l,974:NEXT
  385 GCOL0,%111111:MOVE 682,142:DRAW682,966
  390 PROCdrawmini
  400 ENDPROC
  410 :
  420 REM Draw ballbot and balls
  430 DEFPROCdrawmini
  440 GCOL3,1:FORb=0TO4
  450 IF ball(b,0)<>0 OR ball(b,1)<>0 THEN RECTANGLE FILL ball(b,0),ball(b,1),5,5
  460 NEXT
  470 GCOL3,%110000:RECTANGLE FILL bbx,bby,5,5
  480 ENDPROC
  490 :
  500 REM Reset to test a new biobot
  510 DEFPROCrestart
  520 stage=0:bbx=640:bby=950:dir=270
  530 FORr=0TO4:REPEAT:ball(r,0)=100+RND(1000):ball(r,1)=100+RND(800)
  540 IF ball(r,0)<670 AND ball(r,1)>620 THEN UNTIL FALSE
  550 UNTIL TRUE:NEXT
  560 PROCdrawfull
  570 ENDPROC
  580 :
  590 REM User interface (putting balls down)
  600 DEFPROCuser
  610 MOUSE x,y,c
  620 IF c=0 THEN ENDPROC
  630 IF (c AND 4)<>0 THEN PROCdrawmini:ball(current,0)=x:ball(current,1)=y:current=(current+1)MOD5:PROCdrawmini
  640 IF (c AND 2)<>0 THEN idle=FALSE:stage=0:start=TIME
  650 REPEAT
  660 MOUSE x,y,c
  670 UNTIL c=0
  680 ENDPROC
  690 :
  700 REM Calculate ballbot's new position
  710 DEFPROCmoveit
  720 IF (left AND fwd) OR (right AND reverse) THEN dir=dir-2.5
  730 IF (right AND fwd) OR (left AND reverse) THEN dir=dir+2.5
  740 :
  750 REM Get direction in range 0<theta<360
  760 REPEAT IF dir<0 THEN dir=dir+360
  770 IF dir>=360 THEN dir=dir-360
  780 UNTIL dir>=0 AND dir<360
  790 :
  800 fr=0:IF fwd THEN fr=fr+0.25
  810 IF reverse THEN fr=fr-0.25
  815 IF turbo THEN fr=fr*4
  820 PROCdrawmini:bbx=bbx+16*SIN(PI*dir/180)*fr
  830 bby=bby+16*COS(PI*dir/180)*fr
  840 FORball=0TO4:IF ABS(bbx-ball(ball,0))<10 AND ABS(bby-ball(ball,1))<10 THEN ball(ball,0)=0
  850 NEXT:PROCdrawmini
  860 ENDPROC
  870 :
  880 REM Calculate ballbot's background echo reading (-balls)
  890 DEFFNback(x,y,freq)
  900 REM Calculate Angle of net as seen by Ballbot
  910 LOCAL freqa
  920 netlow=(FNangle(640,923,x,y)-dir) MOD 360
  930 IF netlow<0 THEN netlow=netlow+360
  940 IF netlow>180 THEN netlow=netlow-360
  950 nethi=(FNangle(640,100,x,y)-dir) MOD 360
  960 IF nethi<0 THEN nethi=nethi+360
  970 IF nethi>180 THEN nethi=nethi-360
  980 :
  990 REM Calculate reading
 1000 freqa=freq+RND(6)-3
 1010 IF ABS(SIN(PI*dir/180))>0.01 THEN IF ((netlow<0 AND nethi>0) OR (nethi<0 AND netlow>0)) AND (640-x)/SIN(PI*dir/180)>0 THEN freqa=(640-x)/SIN(PI*dir/180)
 1020 =freqa
 1030 :
 1040 REM Calculate Ballbot's readings (MAIN ROUTINE)
 1050 :
 1060 DEFPROCsense
 1070 REM Get background readings from FNback
 1080 freq=RND(250)+1500:fa$="U":fb$=fa$:fc$=fa$
 1090 freqa=FNback(bbx,bby,freq)
 1100 dir=dir-5:freqb=FNback(bbx,bby,freq)
 1110 dir=dir+10:freqc=FNback(bbx,bby,freq):dir=dir-5
 1120 :
 1130 REM Add any relevant balls to readings (using hairy trigonometry)
 1140 :
 1150 FORball=0TO4
 1160 d%=SQR((ball(ball,0)-bbx)^2+(ball(ball,1)-bby)^2)
 1170 IF ball(ball,0)=0 THEN d%=9999
 1180 a=FNangle(ball(ball,0),ball(ball,1),bbx,bby)-dir
 1190 IF ABS(a)<15 AND freqa>d% THEN freqa=d%:fa$="B"
 1200 IF a>-46 AND a<=-15 AND freqb>d% THEN freqb=d%:fb$="B"
 1210 IF a>=15 AND a<46 AND freqc>d% THEN freqc=d%:fc$="B"
 1230 NEXT
 1240 :
 1250 REM Update user displays
 1260 :
 1265 PRINTTAB(0,0)INT((TIME-start)/6000);":";(INT((TIME-start)/100)MOD60)
 1270 PRINTTAB(0,31)fb$,fa$,fc$,stage,INT(searching),left,right;
 1280 SOUND 1,-1,freqa/4,5:SOUND 2,-1,freqb/4,5:SOUND 3,-1,freqc/4,5
 1290 ENDPROC
 1300:
 1310 REM Calculate bearing of B from A
 1320 DEFFNangle(x1,y1,x2,y2)
 1330 IF y2=y1 THEN ang=90 ELSE ang=180*ATN((x2-x1)/(y2-y1))/PI
 1340 IF (y2>y1) THEN ang=ang+180
 1345 IF ang<0 THEN ang=ang+360
 1350 =ang MOD 360
 1360 :
 1370 REM BALLBOT ROBOTIC INTELLIGENCE MODULE
 1380 :
 1390 DEFFNai(freqa,freqb,freqc)
 1400 REM Artificial intelligence routines (ie. What Next??)
 1410 LOCALfwd,reverse,left,right,turbo
 1420 fwd=TRUE:reverse=FALSE:left=FALSE:right=FALSE:turbo=FALSE
 1430 :
 1440 REM What stage are we in? Hunt for balls or move to new area?
 1450 :
 1460 IF near<>0 AND stage<8 THEN PROCdonearstuff
 1470 IF near=0 AND (stage=0 OR stage=2 OR stage=4 OR stage=6) THEN PROChunt
 1480 IF near=0 AND (stage=1 OR stage=5) THEN PROCwaitmove
 1490 IF near=0 AND (stage=3 OR stage=7) THEN PROCmoveout
 1500 IF stage=8 THEN PROCreleaseb
 1510 feed=0:IF fwd THEN feed=feed+1
 1515 IF reving THEN turbo=TRUE
 1520 IF reverse THEN feed=feed+2
 1530 IF left THEN feed=feed+4
 1540 IF right THEN feed=feed+8
 1545 IF turbo THEN feed=feed+16
 1550 =feed
 1560 :
 1570 REM Perform a sweep to find any balls
 1580 DEFPROChunt
 1590 IF (freqa<20 AND freqb<20 AND freqc<20) OR (reving AND freqa<100 AND freqb<100 AND freqc<100) THEN searching=0:reving=TRUE:reverse=TRUE:fwd=FALSE:left=FALSE:right=FALSE:ENDPROC
 1600 REM IF (freqa<freqb AND freqa<freqc) OR (freqa>freqb AND freqa>freqc) THEN d=TRUE ELSE d=FALSE
 1610 reving=FALSE
 1620 IF fa$="B" THEN searching=searching/2:turbo=freqa>100:ENDPROC
 1630 IF fb$="B" THEN left=TRUE:ENDPROC
 1640 IF fc$="B" THEN right=TRUE:ENDPROC
 1650 searching=searching+1:IF searching<5 THEN right=TRUE ELSE left=TRUE
 1660 IF searching>150 THEN stage=stage+1
 1670 ENDPROC
 1680 :
 1690 REM Move to next hunt
 1700 DEFPROCwaitmove
 1710 searching=searching+1:IFsearching>159 THEN stage=stage+1:searching=0
 1720 IF freqa>40 THEN forward=TRUE ELSE stage=stage+1:searching=0
 1730 ENDPROC
 1740 :
 1750 REM Find edge of net and aim for it to move to other side
 1760 DEFPROCmoveout
 1770 IF (freqa<30 OR freqb<30 OR freqc<30) OR (reving AND (freqa<125 OR freqb<125 OR freqc<125)) THEN searching=searching/2:reving=TRUE:reverse=TRUE:fwd=FALSE:left=FALSE:right=FALSE:ENDPROC
 1780 reving=FALSE
 1790 IF freqb<40 AND freqa>250 THEN right=TRUE:near=1:ENDPROC
 1800 IF freqa<200 AND freqb<200 AND freqc<200 THEN right=TRUE:ENDPROC
 1810 IF (freqb*1.5)<freqc AND (freqa*1.5)<freqc THEN right=TRUE:ENDPROC
 1820 IF (freqb*1.5)>freqc THEN left=TRUE:ENDPROC
 1825 IF freqb>100 THEN turbo=TRUE
 1830 ENDPROC
 1840 :
 1850 REM Nearly there... Just need a little nudge in the right direction.
 1860 DEFPROCdonearstuff
 1870 near=near+1
 1880 IF near<8 THEN right=TRUE:ENDPROC
 1890 left=TRUE
 1900 IF near>16 THEN near=0:stage=stage+1:searching=0
 1910 ENDPROC
 1920 :
 1930 DEFPROCsetupbb
 1940 reving=FALSE:left=FALSE:right=FALSE:fwd=FALSE:reverse=FALSE:searching=0:idle=TRUE
 1950 near=FALSE
 1960 ENDPROC
 1970 :
 1980 DEFPROCreleaseb
 1990 REM Got all the balls, now just dump them!
 2000 near=near+1:reverse=TRUE:fwd=FALSE
 2010 IF near>9 THEN idle=TRUE:near=FALSE
 2020 ENDPROC
 2030 REPEAT:FORX=1TO12:OSCLI"CHANNELVOICE 1 "+STR$X:SOUND1,-10,52,100:FORR=0TO10000:NEXT,:UNTIL FALSE

 � BallBot V2.0
 � Real-Time Version
 � (C) Dominic Ford 1997
( :
* � Welcome screen
,� �6:�" BallBot Artificial Intelligence Module"'"Simulation Tester V2.0 Real Time Version"''"Programmed and Designed by Dominic Ford"''�(16);"(C) 1997"
- �'''"Press <SPACE>"
0 � � �(-99)
1 :
2 � Setup variables
<& ȡ 1,"StringLib-Soft":*STEREO 1 0
F) ȡ 2,"StringLib-Soft":*STEREO 2 -127
P( ȡ 3,"StringLib-Soft":*STEREO 3 127
Z: current=0:�ball(4,1):bbx=640:bby=950:dir=270:�setupbb
d �15:ȗ �:�drawfull
n :
x � Start main loop
�
 �:T=�
�
 �user
� � idle � � �
� �sense
� mov=�ai(freqa,freqb,freqc)
� fwd=(mov � 1)<>0
� reverse=(mov � 2)<>0
� left=(mov � 4)<>0
� right=(mov � 8)<>0
� turbo=(mov � 16)<>0
� �moveit
� � � �>(T+15)
� � �
� :
 � Graphic interface
 ��drawfull
 � Set up constants
 �sx,sy,width
" sx=1:sy=2:width=5
' � Draw green court area
,% �:�0,%001100:ȓ Ȑ 0,0,1279,1023
1& � Mark out white lines onto court
6� �0,%111111:ȓ Ȑ sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:ȓ Ȑ sx/(23.77+2*sx)*1280,(1.37+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
@� ȓ Ȑ sx/(23.77+2*sx)*1280,(9.6+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:ȓ Ȑ sx/(23.77+2*sx)*1280,(10.97+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
J_ ȓ Ȑ (sx+5.47)/(23.77+2*sx)*1280,(sy+5.49)/(10.97+2*sy)*1024,12.8/(23.77+2*sx)*1280,width
T� ȓ Ȑ sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024:ȓ Ȑ (sx+23.77)/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024+width
^� ȓ Ȑ (sx+5.47)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024:ȓ Ȑ (sx+18.3)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024
h :
r � Draw net
|� �0,0:�l=100�924�10:� 640,l:� 680,l+50:�:�l=0�40�10:� 640+l,100+l:�640+l,924+l:�:�l=0�5:�637+l,100:�677+l,150:�637+l,924:�677+l,974:�
�" �0,%111111:� 682,142:�682,966
� �drawmini
� �
� :
� � Draw ballbot and balls
� ��drawmini
� �3,1:�b=0�4
�B � ball(b,0)<>0 � ball(b,1)<>0 � ȓ Ȑ ball(b,0),ball(b,1),5,5
� �
�! �3,%110000:ȓ Ȑ bbx,bby,5,5
� �
� :
�! � Reset to test a new biobot
� ��restart
$ stage=0:bbx=640:bby=950:dir=270
8 �r=0�4:�:ball(r,0)=100+�(1000):ball(r,1)=100+�(800)
* � ball(r,0)<670 � ball(r,1)>620 � � �
&
 � �:�
0 �drawfull
: �
D :
N* � User interface (putting balls down)
X ��user
b
 ȗ x,y,c
l � c=0 � �
va � (c � 4)<>0 � �drawmini:ball(current,0)=x:ball(current,1)=y:current=(current+1)�5:�drawmini
�* � (c � 2)<>0 � idle=�:stage=0:start=�
� �
�
 ȗ x,y,c
�
 � c=0
� �
� :
�' � Calculate ballbot's new position
�
 ��moveit
�5 � (left � fwd) � (right � reverse) � dir=dir-2.5
�5 � (right � fwd) � (left � reverse) � dir=dir+2.5
� :
�) � Get direction in range 0<theta<360
� � � dir<0 � dir=dir+360
 � dir>=360 � dir=dir-360
 � dir>=0 � dir<360
 :
  fr=0:� fwd � fr=fr+0.25
* � reverse � fr=fr-0.25
/ � turbo � fr=fr*4
4) �drawmini:bbx=bbx+16*�(�*dir/180)*fr
> bby=bby+16*�(�*dir/180)*fr
HQ �ball=0�4:� �(bbx-ball(ball,0))<10 � �(bby-ball(ball,1))<10 � ball(ball,0)=0
R �:�drawmini
\ �
f :
p; � Calculate ballbot's background echo reading (-balls)
z ݤback(x,y,freq)
�0 � Calculate Angle of net as seen by Ballbot
� � freqa
�+ netlow=(�angle(640,923,x,y)-dir) � 360
�# � netlow<0 � netlow=netlow+360
�% � netlow>180 � netlow=netlow-360
�* nethi=(�angle(640,100,x,y)-dir) � 360
�  � nethi<0 � nethi=nethi+360
�" � nethi>180 � nethi=nethi-360
� :
� � Calculate reading
� freqa=freq+�(6)-3
� � �(�(�*dir/180))>0.01 � � ((netlow<0 � nethi>0) � (nethi<0 � netlow>0)) � (640-x)/�(�*dir/180)>0 � freqa=(640-x)/�(�*dir/180)
� =freqa
 :
2 � Calculate Ballbot's readings (MAIN ROUTINE)
 :
$ ��sense
.* � Get background readings from FNback
8- freq=�(250)+1500:fa$="U":fb$=fa$:fc$=fa$
B freqa=�back(bbx,bby,freq)
L( dir=dir-5:freqb=�back(bbx,bby,freq)
V3 dir=dir+10:freqc=�back(bbx,bby,freq):dir=dir-5
` :
jD � Add any relevant balls to readings (using hairy trigonometry)
t :
~ �ball=0�4
�4 d%=�((ball(ball,0)-bbx)^2+(ball(ball,1)-bby)^2)
� � ball(ball,0)=0 � d%=9999
�4 a=�angle(ball(ball,0),ball(ball,1),bbx,bby)-dir
�, � �(a)<15 � freqa>d% � freqa=d%:fa$="B"
�3 � a>-46 � a<=-15 � freqb>d% � freqb=d%:fb$="B"
�1 � a>=15 � a<46 � freqc>d% � freqc=d%:fc$="B"
� �
� :
� � Update user displays
� :
�6 �0,0)�((�-start)/6000);":";(�((�-start)/100)�60)
�6 �0,31)fb$,fa$,fc$,stage,�(searching),left,right;
7 � 1,-1,freqa/4,5:� 2,-1,freqb/4,5:� 3,-1,freqc/4,5

 �
:
$ � Calculate bearing of B from A
( ݤangle(x1,y1,x2,y2)
24 � y2=y1 � ang=90 � ang=180*�((x2-x1)/(y2-y1))/�
< � (y2>y1) � ang=ang+180
A � ang<0 � ang=ang+360
F =ang � 360
P :
Z* � BALLBOT ROBOTIC INTELLIGENCE MODULE
d :
n ݤai(freqa,freqb,freqc)
x9 � Artificial intelligence routines (ie. What Next??)
�" �fwd,reverse,left,right,turbo
�+ fwd=�:reverse=�:left=�:right=�:turbo=�
� :
�@ � What stage are we in? Hunt for balls or move to new area?
� :
�' � near<>0 � stage<8 � �donearstuff
�? � near=0 � (stage=0 � stage=2 � stage=4 � stage=6) � �hunt
�/ � near=0 � (stage=1 � stage=5) � �waitmove
�. � near=0 � (stage=3 � stage=7) � �moveout
� � stage=8 � �releaseb
� feed=0:� fwd � feed=feed+1
� � reving � turbo=�
� � reverse � feed=feed+2
� � left � feed=feed+4
 � right � feed=feed+8
	 � turbo � feed=feed+16

 =feed
 :
"( � Perform a sweep to find any balls
, ��hunt
6� � (freqa<20 � freqb<20 � freqc<20) � (reving � freqa<100 � freqb<100 � freqc<100) � searching=0:reving=�:reverse=�:fwd=�:left=�:right=�:�
@a � IF (freqa<freqb AND freqa<freqc) OR (freqa>freqb AND freqa>freqc) THEN d=TRUE ELSE d=FALSE
J
 reving=�
T8 � fa$="B" � searching=searching/2:turbo=freqa>100:�
^ � fb$="B" � left=�:�
h � fc$="B" � right=�:�
r; searching=searching+1:� searching<5 � right=� � left=�
|$ � searching>150 � stage=stage+1
� �
� :
� � Move to next hunt
� ��waitmove
�E searching=searching+1:�searching>159 � stage=stage+1:searching=0
�7 � freqa>40 � forward=� � stage=stage+1:searching=0
� �
� :
�< � Find edge of net and aim for it to move to other side
� ��moveout
� � (freqa<30 � freqb<30 � freqc<30) � (reving � (freqa<125 � freqb<125 � freqc<125)) � searching=searching/2:reving=�:reverse=�:fwd=�:left=�:right=�:�
�
 reving=�
�. � freqb<40 � freqa>250 � right=�:near=1:�
4 � freqa<200 � freqb<200 � freqc<200 � right=�:�
8 � (freqb*1.5)<freqc � (freqa*1.5)<freqc � right=�:�
# � (freqb*1.5)>freqc � left=�:�
! � freqb>100 � turbo=�
& �
0 :
:G � Nearly there... Just need a little nudge in the right direction.
D ��donearstuff
N near=near+1
X � near<8 � right=�:�
b left=�
l1 � near>16 � near=0:stage=stage+1:searching=0
v �
� :
� ��setupbb
�? reving=�:left=�:right=�:fwd=�:reverse=�:searching=0:idle=�
� near=�
� �
� :
� ��releaseb
�- � Got all the balls, now just dump them!
�  near=near+1:reverse=�:fwd=�
� � near>9 � idle=�:near=�
� �
�D �:�X=1�12:�"CHANNELVOICE 1 "+�X:�1,-10,52,100:�R=0�10000:�,:� �
�
00000000  0d 00 0a 13 20 f4 20 42  61 6c 6c 42 6f 74 20 56  |.... . BallBot V|
00000010  32 2e 30 0d 00 14 18 20  f4 20 52 65 61 6c 2d 54  |2.0.... . Real-T|
00000020  69 6d 65 20 56 65 72 73  69 6f 6e 0d 00 1e 1c 20  |ime Version.... |
00000030  f4 20 28 43 29 20 44 6f  6d 69 6e 69 63 20 46 6f  |. (C) Dominic Fo|
00000040  72 64 20 31 39 39 37 0d  00 28 06 20 3a 0d 00 2a  |rd 1997..(. :..*|
00000050  15 20 f4 20 57 65 6c 63  6f 6d 65 20 73 63 72 65  |. . Welcome scre|
00000060  65 6e 0d 00 2c 9a 20 eb  36 3a f1 22 20 42 61 6c  |en..,. .6:." Bal|
00000070  6c 42 6f 74 20 41 72 74  69 66 69 63 69 61 6c 20  |lBot Artificial |
00000080  49 6e 74 65 6c 6c 69 67  65 6e 63 65 20 4d 6f 64  |Intelligence Mod|
00000090  75 6c 65 22 27 22 53 69  6d 75 6c 61 74 69 6f 6e  |ule"'"Simulation|
000000a0  20 54 65 73 74 65 72 20  56 32 2e 30 20 52 65 61  | Tester V2.0 Rea|
000000b0  6c 20 54 69 6d 65 20 56  65 72 73 69 6f 6e 22 27  |l Time Version"'|
000000c0  27 22 50 72 6f 67 72 61  6d 6d 65 64 20 61 6e 64  |'"Programmed and|
000000d0  20 44 65 73 69 67 6e 65  64 20 62 79 20 44 6f 6d  | Designed by Dom|
000000e0  69 6e 69 63 20 46 6f 72  64 22 27 27 89 28 31 36  |inic Ford"''.(16|
000000f0  29 3b 22 28 43 29 20 31  39 39 37 22 0d 00 2d 18  |);"(C) 1997"..-.|
00000100  20 f1 27 27 27 22 50 72  65 73 73 20 3c 53 50 41  | .'''"Press <SPA|
00000110  43 45 3e 22 0d 00 30 0f  20 f5 20 fd 20 a6 28 2d  |CE>"..0. . . .(-|
00000120  39 39 29 0d 00 31 06 20  3a 0d 00 32 16 20 f4 20  |99)..1. :..2. . |
00000130  53 65 74 75 70 20 76 61  72 69 61 62 6c 65 73 0d  |Setup variables.|
00000140  00 3c 26 20 c8 a1 20 31  2c 22 53 74 72 69 6e 67  |.<& .. 1,"String|
00000150  4c 69 62 2d 53 6f 66 74  22 3a 2a 53 54 45 52 45  |Lib-Soft":*STERE|
00000160  4f 20 31 20 30 0d 00 46  29 20 c8 a1 20 32 2c 22  |O 1 0..F) .. 2,"|
00000170  53 74 72 69 6e 67 4c 69  62 2d 53 6f 66 74 22 3a  |StringLib-Soft":|
00000180  2a 53 54 45 52 45 4f 20  32 20 2d 31 32 37 0d 00  |*STEREO 2 -127..|
00000190  50 28 20 c8 a1 20 33 2c  22 53 74 72 69 6e 67 4c  |P( .. 3,"StringL|
000001a0  69 62 2d 53 6f 66 74 22  3a 2a 53 54 45 52 45 4f  |ib-Soft":*STEREO|
000001b0  20 33 20 31 32 37 0d 00  5a 3a 20 63 75 72 72 65  | 3 127..Z: curre|
000001c0  6e 74 3d 30 3a de 62 61  6c 6c 28 34 2c 31 29 3a  |nt=0:.ball(4,1):|
000001d0  62 62 78 3d 36 34 30 3a  62 62 79 3d 39 35 30 3a  |bbx=640:bby=950:|
000001e0  64 69 72 3d 32 37 30 3a  f2 73 65 74 75 70 62 62  |dir=270:.setupbb|
000001f0  0d 00 64 17 20 eb 31 35  3a c8 97 20 ee 3a f2 64  |..d. .15:.. .:.d|
00000200  72 61 77 66 75 6c 6c 0d  00 6e 06 20 3a 0d 00 78  |rawfull..n. :..x|
00000210  16 20 f4 20 53 74 61 72  74 20 6d 61 69 6e 20 6c  |. . Start main l|
00000220  6f 6f 70 0d 00 82 0a 20  f5 3a 54 3d 91 0d 00 8c  |oop.... .:T=....|
00000230  0a 20 f2 75 73 65 72 0d  00 96 11 20 e7 20 69 64  |. .user.... . id|
00000240  6c 65 20 8c 20 fd 20 a3  0d 00 a0 0b 20 f2 73 65  |le . . ..... .se|
00000250  6e 73 65 0d 00 aa 1f 20  6d 6f 76 3d a4 61 69 28  |nse.... mov=.ai(|
00000260  66 72 65 71 61 2c 66 72  65 71 62 2c 66 72 65 71  |freqa,freqb,freq|
00000270  63 29 0d 00 b4 15 20 66  77 64 3d 28 6d 6f 76 20  |c).... fwd=(mov |
00000280  80 20 31 29 3c 3e 30 0d  00 be 19 20 72 65 76 65  |. 1)<>0.... reve|
00000290  72 73 65 3d 28 6d 6f 76  20 80 20 32 29 3c 3e 30  |rse=(mov . 2)<>0|
000002a0  0d 00 c8 16 20 6c 65 66  74 3d 28 6d 6f 76 20 80  |.... left=(mov .|
000002b0  20 34 29 3c 3e 30 0d 00  d2 17 20 72 69 67 68 74  | 4)<>0.... right|
000002c0  3d 28 6d 6f 76 20 80 20  38 29 3c 3e 30 0d 00 d7  |=(mov . 8)<>0...|
000002d0  18 20 74 75 72 62 6f 3d  28 6d 6f 76 20 80 20 31  |. turbo=(mov . 1|
000002e0  36 29 3c 3e 30 0d 00 dc  0c 20 f2 6d 6f 76 65 69  |6)<>0.... .movei|
000002f0  74 0d 00 e6 11 20 f5 20  fd 20 91 3e 28 54 2b 31  |t.... . . .>(T+1|
00000300  35 29 0d 00 f0 08 20 fd  20 a3 0d 00 fa 06 20 3a  |5).... . ..... :|
00000310  0d 01 04 18 20 f4 20 47  72 61 70 68 69 63 20 69  |.... . Graphic i|
00000320  6e 74 65 72 66 61 63 65  0d 01 0e 0f 20 dd f2 64  |nterface.... ..d|
00000330  72 61 77 66 75 6c 6c 0d  01 13 17 20 f4 20 53 65  |rawfull.... . Se|
00000340  74 20 75 70 20 63 6f 6e  73 74 61 6e 74 73 0d 01  |t up constants..|
00000350  18 11 20 ea 73 78 2c 73  79 2c 77 69 64 74 68 0d  |.. .sx,sy,width.|
00000360  01 22 16 20 73 78 3d 31  3a 73 79 3d 32 3a 77 69  |.". sx=1:sy=2:wi|
00000370  64 74 68 3d 35 0d 01 27  1c 20 f4 20 44 72 61 77  |dth=5..'. . Draw|
00000380  20 67 72 65 65 6e 20 63  6f 75 72 74 20 61 72 65  | green court are|
00000390  61 0d 01 2c 25 20 db 3a  e6 30 2c 25 30 30 31 31  |a..,% .:.0,%0011|
000003a0  30 30 3a c8 93 20 c8 90  20 30 2c 30 2c 31 32 37  |00:.. .. 0,0,127|
000003b0  39 2c 31 30 32 33 0d 01  31 26 20 f4 20 4d 61 72  |9,1023..1& . Mar|
000003c0  6b 20 6f 75 74 20 77 68  69 74 65 20 6c 69 6e 65  |k out white line|
000003d0  73 20 6f 6e 74 6f 20 63  6f 75 72 74 0d 01 36 b2  |s onto court..6.|
000003e0  20 e6 30 2c 25 31 31 31  31 31 31 3a c8 93 20 c8  | .0,%111111:.. .|
000003f0  90 20 73 78 2f 28 32 33  2e 37 37 2b 32 2a 73 78  |. sx/(23.77+2*sx|
00000400  29 2a 31 32 38 30 2c 73  79 2f 28 31 30 2e 39 37  |)*1280,sy/(10.97|
00000410  2b 32 2a 73 79 29 2a 31  30 32 34 2c 32 33 2e 37  |+2*sy)*1024,23.7|
00000420  37 2f 28 32 33 2e 37 37  2b 32 2a 73 78 29 2a 31  |7/(23.77+2*sx)*1|
00000430  32 38 30 2c 77 69 64 74  68 3a c8 93 20 c8 90 20  |280,width:.. .. |
00000440  73 78 2f 28 32 33 2e 37  37 2b 32 2a 73 78 29 2a  |sx/(23.77+2*sx)*|
00000450  31 32 38 30 2c 28 31 2e  33 37 2b 73 79 29 2f 28  |1280,(1.37+sy)/(|
00000460  31 30 2e 39 37 2b 32 2a  73 79 29 2a 31 30 32 34  |10.97+2*sy)*1024|
00000470  2c 32 33 2e 37 37 2f 28  32 33 2e 37 37 2b 32 2a  |,23.77/(23.77+2*|
00000480  73 78 29 2a 31 32 38 30  2c 77 69 64 74 68 0d 01  |sx)*1280,width..|
00000490  40 ae 20 c8 93 20 c8 90  20 73 78 2f 28 32 33 2e  |@. .. .. sx/(23.|
000004a0  37 37 2b 32 2a 73 78 29  2a 31 32 38 30 2c 28 39  |77+2*sx)*1280,(9|
000004b0  2e 36 2b 73 79 29 2f 28  31 30 2e 39 37 2b 32 2a  |.6+sy)/(10.97+2*|
000004c0  73 79 29 2a 31 30 32 34  2c 32 33 2e 37 37 2f 28  |sy)*1024,23.77/(|
000004d0  32 33 2e 37 37 2b 32 2a  73 78 29 2a 31 32 38 30  |23.77+2*sx)*1280|
000004e0  2c 77 69 64 74 68 3a c8  93 20 c8 90 20 73 78 2f  |,width:.. .. sx/|
000004f0  28 32 33 2e 37 37 2b 32  2a 73 78 29 2a 31 32 38  |(23.77+2*sx)*128|
00000500  30 2c 28 31 30 2e 39 37  2b 73 79 29 2f 28 31 30  |0,(10.97+sy)/(10|
00000510  2e 39 37 2b 32 2a 73 79  29 2a 31 30 32 34 2c 32  |.97+2*sy)*1024,2|
00000520  33 2e 37 37 2f 28 32 33  2e 37 37 2b 32 2a 73 78  |3.77/(23.77+2*sx|
00000530  29 2a 31 32 38 30 2c 77  69 64 74 68 0d 01 4a 5f  |)*1280,width..J_|
00000540  20 c8 93 20 c8 90 20 28  73 78 2b 35 2e 34 37 29  | .. .. (sx+5.47)|
00000550  2f 28 32 33 2e 37 37 2b  32 2a 73 78 29 2a 31 32  |/(23.77+2*sx)*12|
00000560  38 30 2c 28 73 79 2b 35  2e 34 39 29 2f 28 31 30  |80,(sy+5.49)/(10|
00000570  2e 39 37 2b 32 2a 73 79  29 2a 31 30 32 34 2c 31  |.97+2*sy)*1024,1|
00000580  32 2e 38 2f 28 32 33 2e  37 37 2b 32 2a 73 78 29  |2.8/(23.77+2*sx)|
00000590  2a 31 32 38 30 2c 77 69  64 74 68 0d 01 54 ae 20  |*1280,width..T. |
000005a0  c8 93 20 c8 90 20 73 78  2f 28 32 33 2e 37 37 2b  |.. .. sx/(23.77+|
000005b0  32 2a 73 78 29 2a 31 32  38 30 2c 73 79 2f 28 31  |2*sx)*1280,sy/(1|
000005c0  30 2e 39 37 2b 32 2a 73  79 29 2a 31 30 32 34 2c  |0.97+2*sy)*1024,|
000005d0  77 69 64 74 68 2c 31 30  2e 39 37 2f 28 31 30 2e  |width,10.97/(10.|
000005e0  39 37 2b 32 2a 73 79 29  2a 31 30 32 34 3a c8 93  |97+2*sy)*1024:..|
000005f0  20 c8 90 20 28 73 78 2b  32 33 2e 37 37 29 2f 28  | .. (sx+23.77)/(|
00000600  32 33 2e 37 37 2b 32 2a  73 78 29 2a 31 32 38 30  |23.77+2*sx)*1280|
00000610  2c 73 79 2f 28 31 30 2e  39 37 2b 32 2a 73 79 29  |,sy/(10.97+2*sy)|
00000620  2a 31 30 32 34 2c 77 69  64 74 68 2c 31 30 2e 39  |*1024,width,10.9|
00000630  37 2f 28 31 30 2e 39 37  2b 32 2a 73 79 29 2a 31  |7/(10.97+2*sy)*1|
00000640  30 32 34 2b 77 69 64 74  68 0d 01 5e ba 20 c8 93  |024+width..^. ..|
00000650  20 c8 90 20 28 73 78 2b  35 2e 34 37 29 2f 28 32  | .. (sx+5.47)/(2|
00000660  33 2e 37 37 2b 32 2a 73  78 29 2a 31 32 38 30 2c  |3.77+2*sx)*1280,|
00000670  28 73 79 2b 31 2e 33 37  29 2f 28 31 30 2e 39 37  |(sy+1.37)/(10.97|
00000680  2b 32 2a 73 79 29 2a 31  30 32 34 2c 77 69 64 74  |+2*sy)*1024,widt|
00000690  68 2c 38 2e 32 33 2f 28  31 30 2e 39 37 2b 32 2a  |h,8.23/(10.97+2*|
000006a0  73 79 29 2a 31 30 32 34  3a c8 93 20 c8 90 20 28  |sy)*1024:.. .. (|
000006b0  73 78 2b 31 38 2e 33 29  2f 28 32 33 2e 37 37 2b  |sx+18.3)/(23.77+|
000006c0  32 2a 73 78 29 2a 31 32  38 30 2c 28 73 79 2b 31  |2*sx)*1280,(sy+1|
000006d0  2e 33 37 29 2f 28 31 30  2e 39 37 2b 32 2a 73 79  |.37)/(10.97+2*sy|
000006e0  29 2a 31 30 32 34 2c 77  69 64 74 68 2c 38 2e 32  |)*1024,width,8.2|
000006f0  33 2f 28 31 30 2e 39 37  2b 32 2a 73 79 29 2a 31  |3/(10.97+2*sy)*1|
00000700  30 32 34 0d 01 68 06 20  3a 0d 01 72 0f 20 f4 20  |024..h. :..r. . |
00000710  44 72 61 77 20 6e 65 74  0d 01 7c 89 20 e6 30 2c  |Draw net..|. .0,|
00000720  30 3a e3 6c 3d 31 30 30  b8 39 32 34 88 31 30 3a  |0:.l=100.924.10:|
00000730  ec 20 36 34 30 2c 6c 3a  df 20 36 38 30 2c 6c 2b  |. 640,l:. 680,l+|
00000740  35 30 3a ed 3a e3 6c 3d  30 b8 34 30 88 31 30 3a  |50:.:.l=0.40.10:|
00000750  ec 20 36 34 30 2b 6c 2c  31 30 30 2b 6c 3a df 36  |. 640+l,100+l:.6|
00000760  34 30 2b 6c 2c 39 32 34  2b 6c 3a ed 3a e3 6c 3d  |40+l,924+l:.:.l=|
00000770  30 b8 35 3a ec 36 33 37  2b 6c 2c 31 30 30 3a df  |0.5:.637+l,100:.|
00000780  36 37 37 2b 6c 2c 31 35  30 3a ec 36 33 37 2b 6c  |677+l,150:.637+l|
00000790  2c 39 32 34 3a df 36 37  37 2b 6c 2c 39 37 34 3a  |,924:.677+l,974:|
000007a0  ed 0d 01 81 22 20 e6 30  2c 25 31 31 31 31 31 31  |...." .0,%111111|
000007b0  3a ec 20 36 38 32 2c 31  34 32 3a df 36 38 32 2c  |:. 682,142:.682,|
000007c0  39 36 36 0d 01 86 0e 20  f2 64 72 61 77 6d 69 6e  |966.... .drawmin|
000007d0  69 0d 01 90 06 20 e1 0d  01 9a 06 20 3a 0d 01 a4  |i.... ..... :...|
000007e0  1d 20 f4 20 44 72 61 77  20 62 61 6c 6c 62 6f 74  |. . Draw ballbot|
000007f0  20 61 6e 64 20 62 61 6c  6c 73 0d 01 ae 0f 20 dd  | and balls.... .|
00000800  f2 64 72 61 77 6d 69 6e  69 0d 01 b8 10 20 e6 33  |.drawmini.... .3|
00000810  2c 31 3a e3 62 3d 30 b8  34 0d 01 c2 42 20 e7 20  |,1:.b=0.4...B . |
00000820  62 61 6c 6c 28 62 2c 30  29 3c 3e 30 20 84 20 62  |ball(b,0)<>0 . b|
00000830  61 6c 6c 28 62 2c 31 29  3c 3e 30 20 8c 20 c8 93  |all(b,1)<>0 . ..|
00000840  20 c8 90 20 62 61 6c 6c  28 62 2c 30 29 2c 62 61  | .. ball(b,0),ba|
00000850  6c 6c 28 62 2c 31 29 2c  35 2c 35 0d 01 cc 06 20  |ll(b,1),5,5.... |
00000860  ed 0d 01 d6 21 20 e6 33  2c 25 31 31 30 30 30 30  |....! .3,%110000|
00000870  3a c8 93 20 c8 90 20 62  62 78 2c 62 62 79 2c 35  |:.. .. bbx,bby,5|
00000880  2c 35 0d 01 e0 06 20 e1  0d 01 ea 06 20 3a 0d 01  |,5.... ..... :..|
00000890  f4 21 20 f4 20 52 65 73  65 74 20 74 6f 20 74 65  |.! . Reset to te|
000008a0  73 74 20 61 20 6e 65 77  20 62 69 6f 62 6f 74 0d  |st a new biobot.|
000008b0  01 fe 0e 20 dd f2 72 65  73 74 61 72 74 0d 02 08  |... ..restart...|
000008c0  24 20 73 74 61 67 65 3d  30 3a 62 62 78 3d 36 34  |$ stage=0:bbx=64|
000008d0  30 3a 62 62 79 3d 39 35  30 3a 64 69 72 3d 32 37  |0:bby=950:dir=27|
000008e0  30 0d 02 12 38 20 e3 72  3d 30 b8 34 3a f5 3a 62  |0...8 .r=0.4:.:b|
000008f0  61 6c 6c 28 72 2c 30 29  3d 31 30 30 2b b3 28 31  |all(r,0)=100+.(1|
00000900  30 30 30 29 3a 62 61 6c  6c 28 72 2c 31 29 3d 31  |000):ball(r,1)=1|
00000910  30 30 2b b3 28 38 30 30  29 0d 02 1c 2a 20 e7 20  |00+.(800)...* . |
00000920  62 61 6c 6c 28 72 2c 30  29 3c 36 37 30 20 80 20  |ball(r,0)<670 . |
00000930  62 61 6c 6c 28 72 2c 31  29 3e 36 32 30 20 8c 20  |ball(r,1)>620 . |
00000940  fd 20 a3 0d 02 26 0a 20  fd 20 b9 3a ed 0d 02 30  |. ...&. . .:...0|
00000950  0e 20 f2 64 72 61 77 66  75 6c 6c 0d 02 3a 06 20  |. .drawfull..:. |
00000960  e1 0d 02 44 06 20 3a 0d  02 4e 2a 20 f4 20 55 73  |...D. :..N* . Us|
00000970  65 72 20 69 6e 74 65 72  66 61 63 65 20 28 70 75  |er interface (pu|
00000980  74 74 69 6e 67 20 62 61  6c 6c 73 20 64 6f 77 6e  |tting balls down|
00000990  29 0d 02 58 0b 20 dd f2  75 73 65 72 0d 02 62 0d  |)..X. ..user..b.|
000009a0  20 c8 97 20 78 2c 79 2c  63 0d 02 6c 0e 20 e7 20  | .. x,y,c..l. . |
000009b0  63 3d 30 20 8c 20 e1 0d  02 76 61 20 e7 20 28 63  |c=0 . ...va . (c|
000009c0  20 80 20 34 29 3c 3e 30  20 8c 20 f2 64 72 61 77  | . 4)<>0 . .draw|
000009d0  6d 69 6e 69 3a 62 61 6c  6c 28 63 75 72 72 65 6e  |mini:ball(curren|
000009e0  74 2c 30 29 3d 78 3a 62  61 6c 6c 28 63 75 72 72  |t,0)=x:ball(curr|
000009f0  65 6e 74 2c 31 29 3d 79  3a 63 75 72 72 65 6e 74  |ent,1)=y:current|
00000a00  3d 28 63 75 72 72 65 6e  74 2b 31 29 83 35 3a f2  |=(current+1).5:.|
00000a10  64 72 61 77 6d 69 6e 69  0d 02 80 2a 20 e7 20 28  |drawmini...* . (|
00000a20  63 20 80 20 32 29 3c 3e  30 20 8c 20 69 64 6c 65  |c . 2)<>0 . idle|
00000a30  3d a3 3a 73 74 61 67 65  3d 30 3a 73 74 61 72 74  |=.:stage=0:start|
00000a40  3d 91 0d 02 8a 06 20 f5  0d 02 94 0d 20 c8 97 20  |=..... ..... .. |
00000a50  78 2c 79 2c 63 0d 02 9e  0a 20 fd 20 63 3d 30 0d  |x,y,c.... . c=0.|
00000a60  02 a8 06 20 e1 0d 02 b2  06 20 3a 0d 02 bc 27 20  |... ..... :...' |
00000a70  f4 20 43 61 6c 63 75 6c  61 74 65 20 62 61 6c 6c  |. Calculate ball|
00000a80  62 6f 74 27 73 20 6e 65  77 20 70 6f 73 69 74 69  |bot's new positi|
00000a90  6f 6e 0d 02 c6 0d 20 dd  f2 6d 6f 76 65 69 74 0d  |on.... ..moveit.|
00000aa0  02 d0 35 20 e7 20 28 6c  65 66 74 20 80 20 66 77  |..5 . (left . fw|
00000ab0  64 29 20 84 20 28 72 69  67 68 74 20 80 20 72 65  |d) . (right . re|
00000ac0  76 65 72 73 65 29 20 8c  20 64 69 72 3d 64 69 72  |verse) . dir=dir|
00000ad0  2d 32 2e 35 0d 02 da 35  20 e7 20 28 72 69 67 68  |-2.5...5 . (righ|
00000ae0  74 20 80 20 66 77 64 29  20 84 20 28 6c 65 66 74  |t . fwd) . (left|
00000af0  20 80 20 72 65 76 65 72  73 65 29 20 8c 20 64 69  | . reverse) . di|
00000b00  72 3d 64 69 72 2b 32 2e  35 0d 02 e4 06 20 3a 0d  |r=dir+2.5.... :.|
00000b10  02 ee 29 20 f4 20 47 65  74 20 64 69 72 65 63 74  |..) . Get direct|
00000b20  69 6f 6e 20 69 6e 20 72  61 6e 67 65 20 30 3c 74  |ion in range 0<t|
00000b30  68 65 74 61 3c 33 36 30  0d 02 f8 1c 20 f5 20 e7  |heta<360.... . .|
00000b40  20 64 69 72 3c 30 20 8c  20 64 69 72 3d 64 69 72  | dir<0 . dir=dir|
00000b50  2b 33 36 30 0d 03 02 1d  20 e7 20 64 69 72 3e 3d  |+360.... . dir>=|
00000b60  33 36 30 20 8c 20 64 69  72 3d 64 69 72 2d 33 36  |360 . dir=dir-36|
00000b70  30 0d 03 0c 17 20 fd 20  64 69 72 3e 3d 30 20 80  |0.... . dir>=0 .|
00000b80  20 64 69 72 3c 33 36 30  0d 03 16 06 20 3a 0d 03  | dir<360.... :..|
00000b90  20 1c 20 66 72 3d 30 3a  e7 20 66 77 64 20 8c 20  | . fr=0:. fwd . |
00000ba0  66 72 3d 66 72 2b 30 2e  32 35 0d 03 2a 1b 20 e7  |fr=fr+0.25..*. .|
00000bb0  20 72 65 76 65 72 73 65  20 8c 20 66 72 3d 66 72  | reverse . fr=fr|
00000bc0  2d 30 2e 32 35 0d 03 2f  16 20 e7 20 74 75 72 62  |-0.25../. . turb|
00000bd0  6f 20 8c 20 66 72 3d 66  72 2a 34 0d 03 34 29 20  |o . fr=fr*4..4) |
00000be0  f2 64 72 61 77 6d 69 6e  69 3a 62 62 78 3d 62 62  |.drawmini:bbx=bb|
00000bf0  78 2b 31 36 2a b5 28 af  2a 64 69 72 2f 31 38 30  |x+16*.(.*dir/180|
00000c00  29 2a 66 72 0d 03 3e 1f  20 62 62 79 3d 62 62 79  |)*fr..>. bby=bby|
00000c10  2b 31 36 2a 9b 28 af 2a  64 69 72 2f 31 38 30 29  |+16*.(.*dir/180)|
00000c20  2a 66 72 0d 03 48 51 20  e3 62 61 6c 6c 3d 30 b8  |*fr..HQ .ball=0.|
00000c30  34 3a e7 20 94 28 62 62  78 2d 62 61 6c 6c 28 62  |4:. .(bbx-ball(b|
00000c40  61 6c 6c 2c 30 29 29 3c  31 30 20 80 20 94 28 62  |all,0))<10 . .(b|
00000c50  62 79 2d 62 61 6c 6c 28  62 61 6c 6c 2c 31 29 29  |by-ball(ball,1))|
00000c60  3c 31 30 20 8c 20 62 61  6c 6c 28 62 61 6c 6c 2c  |<10 . ball(ball,|
00000c70  30 29 3d 30 0d 03 52 10  20 ed 3a f2 64 72 61 77  |0)=0..R. .:.draw|
00000c80  6d 69 6e 69 0d 03 5c 06  20 e1 0d 03 66 06 20 3a  |mini..\. ...f. :|
00000c90  0d 03 70 3b 20 f4 20 43  61 6c 63 75 6c 61 74 65  |..p; . Calculate|
00000ca0  20 62 61 6c 6c 62 6f 74  27 73 20 62 61 63 6b 67  | ballbot's backg|
00000cb0  72 6f 75 6e 64 20 65 63  68 6f 20 72 65 61 64 69  |round echo readi|
00000cc0  6e 67 20 28 2d 62 61 6c  6c 73 29 0d 03 7a 15 20  |ng (-balls)..z. |
00000cd0  dd a4 62 61 63 6b 28 78  2c 79 2c 66 72 65 71 29  |..back(x,y,freq)|
00000ce0  0d 03 84 30 20 f4 20 43  61 6c 63 75 6c 61 74 65  |...0 . Calculate|
00000cf0  20 41 6e 67 6c 65 20 6f  66 20 6e 65 74 20 61 73  | Angle of net as|
00000d00  20 73 65 65 6e 20 62 79  20 42 61 6c 6c 62 6f 74  | seen by Ballbot|
00000d10  0d 03 8e 0c 20 ea 20 66  72 65 71 61 0d 03 98 2b  |.... . freqa...+|
00000d20  20 6e 65 74 6c 6f 77 3d  28 a4 61 6e 67 6c 65 28  | netlow=(.angle(|
00000d30  36 34 30 2c 39 32 33 2c  78 2c 79 29 2d 64 69 72  |640,923,x,y)-dir|
00000d40  29 20 83 20 33 36 30 0d  03 a2 23 20 e7 20 6e 65  |) . 360...# . ne|
00000d50  74 6c 6f 77 3c 30 20 8c  20 6e 65 74 6c 6f 77 3d  |tlow<0 . netlow=|
00000d60  6e 65 74 6c 6f 77 2b 33  36 30 0d 03 ac 25 20 e7  |netlow+360...% .|
00000d70  20 6e 65 74 6c 6f 77 3e  31 38 30 20 8c 20 6e 65  | netlow>180 . ne|
00000d80  74 6c 6f 77 3d 6e 65 74  6c 6f 77 2d 33 36 30 0d  |tlow=netlow-360.|
00000d90  03 b6 2a 20 6e 65 74 68  69 3d 28 a4 61 6e 67 6c  |..* nethi=(.angl|
00000da0  65 28 36 34 30 2c 31 30  30 2c 78 2c 79 29 2d 64  |e(640,100,x,y)-d|
00000db0  69 72 29 20 83 20 33 36  30 0d 03 c0 20 20 e7 20  |ir) . 360...  . |
00000dc0  6e 65 74 68 69 3c 30 20  8c 20 6e 65 74 68 69 3d  |nethi<0 . nethi=|
00000dd0  6e 65 74 68 69 2b 33 36  30 0d 03 ca 22 20 e7 20  |nethi+360..." . |
00000de0  6e 65 74 68 69 3e 31 38  30 20 8c 20 6e 65 74 68  |nethi>180 . neth|
00000df0  69 3d 6e 65 74 68 69 2d  33 36 30 0d 03 d4 06 20  |i=nethi-360.... |
00000e00  3a 0d 03 de 18 20 f4 20  43 61 6c 63 75 6c 61 74  |:.... . Calculat|
00000e10  65 20 72 65 61 64 69 6e  67 0d 03 e8 16 20 66 72  |e reading.... fr|
00000e20  65 71 61 3d 66 72 65 71  2b b3 28 36 29 2d 33 0d  |eqa=freq+.(6)-3.|
00000e30  03 f2 83 20 e7 20 94 28  b5 28 af 2a 64 69 72 2f  |... . .(.(.*dir/|
00000e40  31 38 30 29 29 3e 30 2e  30 31 20 8c 20 e7 20 28  |180))>0.01 . . (|
00000e50  28 6e 65 74 6c 6f 77 3c  30 20 80 20 6e 65 74 68  |(netlow<0 . neth|
00000e60  69 3e 30 29 20 84 20 28  6e 65 74 68 69 3c 30 20  |i>0) . (nethi<0 |
00000e70  80 20 6e 65 74 6c 6f 77  3e 30 29 29 20 80 20 28  |. netlow>0)) . (|
00000e80  36 34 30 2d 78 29 2f b5  28 af 2a 64 69 72 2f 31  |640-x)/.(.*dir/1|
00000e90  38 30 29 3e 30 20 8c 20  66 72 65 71 61 3d 28 36  |80)>0 . freqa=(6|
00000ea0  34 30 2d 78 29 2f b5 28  af 2a 64 69 72 2f 31 38  |40-x)/.(.*dir/18|
00000eb0  30 29 0d 03 fc 0b 20 3d  66 72 65 71 61 0d 04 06  |0).... =freqa...|
00000ec0  06 20 3a 0d 04 10 32 20  f4 20 43 61 6c 63 75 6c  |. :...2 . Calcul|
00000ed0  61 74 65 20 42 61 6c 6c  62 6f 74 27 73 20 72 65  |ate Ballbot's re|
00000ee0  61 64 69 6e 67 73 20 28  4d 41 49 4e 20 52 4f 55  |adings (MAIN ROU|
00000ef0  54 49 4e 45 29 0d 04 1a  06 20 3a 0d 04 24 0c 20  |TINE).... :..$. |
00000f00  dd f2 73 65 6e 73 65 0d  04 2e 2a 20 f4 20 47 65  |..sense...* . Ge|
00000f10  74 20 62 61 63 6b 67 72  6f 75 6e 64 20 72 65 61  |t background rea|
00000f20  64 69 6e 67 73 20 66 72  6f 6d 20 46 4e 62 61 63  |dings from FNbac|
00000f30  6b 0d 04 38 2d 20 66 72  65 71 3d b3 28 32 35 30  |k..8- freq=.(250|
00000f40  29 2b 31 35 30 30 3a 66  61 24 3d 22 55 22 3a 66  |)+1500:fa$="U":f|
00000f50  62 24 3d 66 61 24 3a 66  63 24 3d 66 61 24 0d 04  |b$=fa$:fc$=fa$..|
00000f60  42 1e 20 66 72 65 71 61  3d a4 62 61 63 6b 28 62  |B. freqa=.back(b|
00000f70  62 78 2c 62 62 79 2c 66  72 65 71 29 0d 04 4c 28  |bx,bby,freq)..L(|
00000f80  20 64 69 72 3d 64 69 72  2d 35 3a 66 72 65 71 62  | dir=dir-5:freqb|
00000f90  3d a4 62 61 63 6b 28 62  62 78 2c 62 62 79 2c 66  |=.back(bbx,bby,f|
00000fa0  72 65 71 29 0d 04 56 33  20 64 69 72 3d 64 69 72  |req)..V3 dir=dir|
00000fb0  2b 31 30 3a 66 72 65 71  63 3d a4 62 61 63 6b 28  |+10:freqc=.back(|
00000fc0  62 62 78 2c 62 62 79 2c  66 72 65 71 29 3a 64 69  |bbx,bby,freq):di|
00000fd0  72 3d 64 69 72 2d 35 0d  04 60 06 20 3a 0d 04 6a  |r=dir-5..`. :..j|
00000fe0  44 20 f4 20 41 64 64 20  61 6e 79 20 72 65 6c 65  |D . Add any rele|
00000ff0  76 61 6e 74 20 62 61 6c  6c 73 20 74 6f 20 72 65  |vant balls to re|
00001000  61 64 69 6e 67 73 20 28  75 73 69 6e 67 20 68 61  |adings (using ha|
00001010  69 72 79 20 74 72 69 67  6f 6e 6f 6d 65 74 72 79  |iry trigonometry|
00001020  29 0d 04 74 06 20 3a 0d  04 7e 0e 20 e3 62 61 6c  |)..t. :..~. .bal|
00001030  6c 3d 30 b8 34 0d 04 88  34 20 64 25 3d b6 28 28  |l=0.4...4 d%=.((|
00001040  62 61 6c 6c 28 62 61 6c  6c 2c 30 29 2d 62 62 78  |ball(ball,0)-bbx|
00001050  29 5e 32 2b 28 62 61 6c  6c 28 62 61 6c 6c 2c 31  |)^2+(ball(ball,1|
00001060  29 2d 62 62 79 29 5e 32  29 0d 04 92 1f 20 e7 20  |)-bby)^2).... . |
00001070  62 61 6c 6c 28 62 61 6c  6c 2c 30 29 3d 30 20 8c  |ball(ball,0)=0 .|
00001080  20 64 25 3d 39 39 39 39  0d 04 9c 34 20 61 3d a4  | d%=9999...4 a=.|
00001090  61 6e 67 6c 65 28 62 61  6c 6c 28 62 61 6c 6c 2c  |angle(ball(ball,|
000010a0  30 29 2c 62 61 6c 6c 28  62 61 6c 6c 2c 31 29 2c  |0),ball(ball,1),|
000010b0  62 62 78 2c 62 62 79 29  2d 64 69 72 0d 04 a6 2c  |bbx,bby)-dir...,|
000010c0  20 e7 20 94 28 61 29 3c  31 35 20 80 20 66 72 65  | . .(a)<15 . fre|
000010d0  71 61 3e 64 25 20 8c 20  66 72 65 71 61 3d 64 25  |qa>d% . freqa=d%|
000010e0  3a 66 61 24 3d 22 42 22  0d 04 b0 33 20 e7 20 61  |:fa$="B"...3 . a|
000010f0  3e 2d 34 36 20 80 20 61  3c 3d 2d 31 35 20 80 20  |>-46 . a<=-15 . |
00001100  66 72 65 71 62 3e 64 25  20 8c 20 66 72 65 71 62  |freqb>d% . freqb|
00001110  3d 64 25 3a 66 62 24 3d  22 42 22 0d 04 ba 31 20  |=d%:fb$="B"...1 |
00001120  e7 20 61 3e 3d 31 35 20  80 20 61 3c 34 36 20 80  |. a>=15 . a<46 .|
00001130  20 66 72 65 71 63 3e 64  25 20 8c 20 66 72 65 71  | freqc>d% . freq|
00001140  63 3d 64 25 3a 66 63 24  3d 22 42 22 0d 04 ce 06  |c=d%:fc$="B"....|
00001150  20 ed 0d 04 d8 06 20 3a  0d 04 e2 1b 20 f4 20 55  | ..... :.... . U|
00001160  70 64 61 74 65 20 75 73  65 72 20 64 69 73 70 6c  |pdate user displ|
00001170  61 79 73 0d 04 ec 06 20  3a 0d 04 f1 36 20 f1 8a  |ays.... :...6 ..|
00001180  30 2c 30 29 a8 28 28 91  2d 73 74 61 72 74 29 2f  |0,0).((.-start)/|
00001190  36 30 30 30 29 3b 22 3a  22 3b 28 a8 28 28 91 2d  |6000);":";(.((.-|
000011a0  73 74 61 72 74 29 2f 31  30 30 29 83 36 30 29 0d  |start)/100).60).|
000011b0  04 f6 36 20 f1 8a 30 2c  33 31 29 66 62 24 2c 66  |..6 ..0,31)fb$,f|
000011c0  61 24 2c 66 63 24 2c 73  74 61 67 65 2c a8 28 73  |a$,fc$,stage,.(s|
000011d0  65 61 72 63 68 69 6e 67  29 2c 6c 65 66 74 2c 72  |earching),left,r|
000011e0  69 67 68 74 3b 0d 05 00  37 20 d4 20 31 2c 2d 31  |ight;...7 . 1,-1|
000011f0  2c 66 72 65 71 61 2f 34  2c 35 3a d4 20 32 2c 2d  |,freqa/4,5:. 2,-|
00001200  31 2c 66 72 65 71 62 2f  34 2c 35 3a d4 20 33 2c  |1,freqb/4,5:. 3,|
00001210  2d 31 2c 66 72 65 71 63  2f 34 2c 35 0d 05 0a 06  |-1,freqc/4,5....|
00001220  20 e1 0d 05 14 05 3a 0d  05 1e 24 20 f4 20 43 61  | .....:...$ . Ca|
00001230  6c 63 75 6c 61 74 65 20  62 65 61 72 69 6e 67 20  |lculate bearing |
00001240  6f 66 20 42 20 66 72 6f  6d 20 41 0d 05 28 19 20  |of B from A..(. |
00001250  dd a4 61 6e 67 6c 65 28  78 31 2c 79 31 2c 78 32  |..angle(x1,y1,x2|
00001260  2c 79 32 29 0d 05 32 34  20 e7 20 79 32 3d 79 31  |,y2)..24 . y2=y1|
00001270  20 8c 20 61 6e 67 3d 39  30 20 8b 20 61 6e 67 3d  | . ang=90 . ang=|
00001280  31 38 30 2a 99 28 28 78  32 2d 78 31 29 2f 28 79  |180*.((x2-x1)/(y|
00001290  32 2d 79 31 29 29 2f af  0d 05 3c 1c 20 e7 20 28  |2-y1))/...<. . (|
000012a0  79 32 3e 79 31 29 20 8c  20 61 6e 67 3d 61 6e 67  |y2>y1) . ang=ang|
000012b0  2b 31 38 30 0d 05 41 1a  20 e7 20 61 6e 67 3c 30  |+180..A. . ang<0|
000012c0  20 8c 20 61 6e 67 3d 61  6e 67 2b 33 36 30 0d 05  | . ang=ang+360..|
000012d0  46 0f 20 3d 61 6e 67 20  83 20 33 36 30 0d 05 50  |F. =ang . 360..P|
000012e0  06 20 3a 0d 05 5a 2a 20  f4 20 42 41 4c 4c 42 4f  |. :..Z* . BALLBO|
000012f0  54 20 52 4f 42 4f 54 49  43 20 49 4e 54 45 4c 4c  |T ROBOTIC INTELL|
00001300  49 47 45 4e 43 45 20 4d  4f 44 55 4c 45 0d 05 64  |IGENCE MODULE..d|
00001310  06 20 3a 0d 05 6e 1c 20  dd a4 61 69 28 66 72 65  |. :..n. ..ai(fre|
00001320  71 61 2c 66 72 65 71 62  2c 66 72 65 71 63 29 0d  |qa,freqb,freqc).|
00001330  05 78 39 20 f4 20 41 72  74 69 66 69 63 69 61 6c  |.x9 . Artificial|
00001340  20 69 6e 74 65 6c 6c 69  67 65 6e 63 65 20 72 6f  | intelligence ro|
00001350  75 74 69 6e 65 73 20 28  69 65 2e 20 57 68 61 74  |utines (ie. What|
00001360  20 4e 65 78 74 3f 3f 29  0d 05 82 22 20 ea 66 77  | Next??)..." .fw|
00001370  64 2c 72 65 76 65 72 73  65 2c 6c 65 66 74 2c 72  |d,reverse,left,r|
00001380  69 67 68 74 2c 74 75 72  62 6f 0d 05 8c 2b 20 66  |ight,turbo...+ f|
00001390  77 64 3d b9 3a 72 65 76  65 72 73 65 3d a3 3a 6c  |wd=.:reverse=.:l|
000013a0  65 66 74 3d a3 3a 72 69  67 68 74 3d a3 3a 74 75  |eft=.:right=.:tu|
000013b0  72 62 6f 3d a3 0d 05 96  06 20 3a 0d 05 a0 40 20  |rbo=..... :...@ |
000013c0  f4 20 57 68 61 74 20 73  74 61 67 65 20 61 72 65  |. What stage are|
000013d0  20 77 65 20 69 6e 3f 20  48 75 6e 74 20 66 6f 72  | we in? Hunt for|
000013e0  20 62 61 6c 6c 73 20 6f  72 20 6d 6f 76 65 20 74  | balls or move t|
000013f0  6f 20 6e 65 77 20 61 72  65 61 3f 0d 05 aa 06 20  |o new area?.... |
00001400  3a 0d 05 b4 27 20 e7 20  6e 65 61 72 3c 3e 30 20  |:...' . near<>0 |
00001410  80 20 73 74 61 67 65 3c  38 20 8c 20 f2 64 6f 6e  |. stage<8 . .don|
00001420  65 61 72 73 74 75 66 66  0d 05 be 3f 20 e7 20 6e  |earstuff...? . n|
00001430  65 61 72 3d 30 20 80 20  28 73 74 61 67 65 3d 30  |ear=0 . (stage=0|
00001440  20 84 20 73 74 61 67 65  3d 32 20 84 20 73 74 61  | . stage=2 . sta|
00001450  67 65 3d 34 20 84 20 73  74 61 67 65 3d 36 29 20  |ge=4 . stage=6) |
00001460  8c 20 f2 68 75 6e 74 0d  05 c8 2f 20 e7 20 6e 65  |. .hunt.../ . ne|
00001470  61 72 3d 30 20 80 20 28  73 74 61 67 65 3d 31 20  |ar=0 . (stage=1 |
00001480  84 20 73 74 61 67 65 3d  35 29 20 8c 20 f2 77 61  |. stage=5) . .wa|
00001490  69 74 6d 6f 76 65 0d 05  d2 2e 20 e7 20 6e 65 61  |itmove.... . nea|
000014a0  72 3d 30 20 80 20 28 73  74 61 67 65 3d 33 20 84  |r=0 . (stage=3 .|
000014b0  20 73 74 61 67 65 3d 37  29 20 8c 20 f2 6d 6f 76  | stage=7) . .mov|
000014c0  65 6f 75 74 0d 05 dc 1a  20 e7 20 73 74 61 67 65  |eout.... . stage|
000014d0  3d 38 20 8c 20 f2 72 65  6c 65 61 73 65 62 0d 05  |=8 . .releaseb..|
000014e0  e6 1f 20 66 65 65 64 3d  30 3a e7 20 66 77 64 20  |.. feed=0:. fwd |
000014f0  8c 20 66 65 65 64 3d 66  65 65 64 2b 31 0d 05 eb  |. feed=feed+1...|
00001500  17 20 e7 20 72 65 76 69  6e 67 20 8c 20 74 75 72  |. . reving . tur|
00001510  62 6f 3d b9 0d 05 f0 1c  20 e7 20 72 65 76 65 72  |bo=..... . rever|
00001520  73 65 20 8c 20 66 65 65  64 3d 66 65 65 64 2b 32  |se . feed=feed+2|
00001530  0d 05 fa 19 20 e7 20 6c  65 66 74 20 8c 20 66 65  |.... . left . fe|
00001540  65 64 3d 66 65 65 64 2b  34 0d 06 04 1a 20 e7 20  |ed=feed+4.... . |
00001550  72 69 67 68 74 20 8c 20  66 65 65 64 3d 66 65 65  |right . feed=fee|
00001560  64 2b 38 0d 06 09 1b 20  e7 20 74 75 72 62 6f 20  |d+8.... . turbo |
00001570  8c 20 66 65 65 64 3d 66  65 65 64 2b 31 36 0d 06  |. feed=feed+16..|
00001580  0e 0a 20 3d 66 65 65 64  0d 06 18 06 20 3a 0d 06  |.. =feed.... :..|
00001590  22 28 20 f4 20 50 65 72  66 6f 72 6d 20 61 20 73  |"( . Perform a s|
000015a0  77 65 65 70 20 74 6f 20  66 69 6e 64 20 61 6e 79  |weep to find any|
000015b0  20 62 61 6c 6c 73 0d 06  2c 0b 20 dd f2 68 75 6e  | balls..,. ..hun|
000015c0  74 0d 06 36 8e 20 e7 20  28 66 72 65 71 61 3c 32  |t..6. . (freqa<2|
000015d0  30 20 80 20 66 72 65 71  62 3c 32 30 20 80 20 66  |0 . freqb<20 . f|
000015e0  72 65 71 63 3c 32 30 29  20 84 20 28 72 65 76 69  |reqc<20) . (revi|
000015f0  6e 67 20 80 20 66 72 65  71 61 3c 31 30 30 20 80  |ng . freqa<100 .|
00001600  20 66 72 65 71 62 3c 31  30 30 20 80 20 66 72 65  | freqb<100 . fre|
00001610  71 63 3c 31 30 30 29 20  8c 20 73 65 61 72 63 68  |qc<100) . search|
00001620  69 6e 67 3d 30 3a 72 65  76 69 6e 67 3d b9 3a 72  |ing=0:reving=.:r|
00001630  65 76 65 72 73 65 3d b9  3a 66 77 64 3d a3 3a 6c  |everse=.:fwd=.:l|
00001640  65 66 74 3d a3 3a 72 69  67 68 74 3d a3 3a e1 0d  |eft=.:right=.:..|
00001650  06 40 61 20 f4 20 49 46  20 28 66 72 65 71 61 3c  |.@a . IF (freqa<|
00001660  66 72 65 71 62 20 41 4e  44 20 66 72 65 71 61 3c  |freqb AND freqa<|
00001670  66 72 65 71 63 29 20 4f  52 20 28 66 72 65 71 61  |freqc) OR (freqa|
00001680  3e 66 72 65 71 62 20 41  4e 44 20 66 72 65 71 61  |>freqb AND freqa|
00001690  3e 66 72 65 71 63 29 20  54 48 45 4e 20 64 3d 54  |>freqc) THEN d=T|
000016a0  52 55 45 20 45 4c 53 45  20 64 3d 46 41 4c 53 45  |RUE ELSE d=FALSE|
000016b0  0d 06 4a 0d 20 72 65 76  69 6e 67 3d a3 0d 06 54  |..J. reving=...T|
000016c0  38 20 e7 20 66 61 24 3d  22 42 22 20 8c 20 73 65  |8 . fa$="B" . se|
000016d0  61 72 63 68 69 6e 67 3d  73 65 61 72 63 68 69 6e  |arching=searchin|
000016e0  67 2f 32 3a 74 75 72 62  6f 3d 66 72 65 71 61 3e  |g/2:turbo=freqa>|
000016f0  31 30 30 3a e1 0d 06 5e  19 20 e7 20 66 62 24 3d  |100:...^. . fb$=|
00001700  22 42 22 20 8c 20 6c 65  66 74 3d b9 3a e1 0d 06  |"B" . left=.:...|
00001710  68 1a 20 e7 20 66 63 24  3d 22 42 22 20 8c 20 72  |h. . fc$="B" . r|
00001720  69 67 68 74 3d b9 3a e1  0d 06 72 3b 20 73 65 61  |ight=.:...r; sea|
00001730  72 63 68 69 6e 67 3d 73  65 61 72 63 68 69 6e 67  |rching=searching|
00001740  2b 31 3a e7 20 73 65 61  72 63 68 69 6e 67 3c 35  |+1:. searching<5|
00001750  20 8c 20 72 69 67 68 74  3d b9 20 8b 20 6c 65 66  | . right=. . lef|
00001760  74 3d b9 0d 06 7c 24 20  e7 20 73 65 61 72 63 68  |t=...|$ . search|
00001770  69 6e 67 3e 31 35 30 20  8c 20 73 74 61 67 65 3d  |ing>150 . stage=|
00001780  73 74 61 67 65 2b 31 0d  06 86 06 20 e1 0d 06 90  |stage+1.... ....|
00001790  06 20 3a 0d 06 9a 18 20  f4 20 4d 6f 76 65 20 74  |. :.... . Move t|
000017a0  6f 20 6e 65 78 74 20 68  75 6e 74 0d 06 a4 0f 20  |o next hunt.... |
000017b0  dd f2 77 61 69 74 6d 6f  76 65 0d 06 ae 45 20 73  |..waitmove...E s|
000017c0  65 61 72 63 68 69 6e 67  3d 73 65 61 72 63 68 69  |earching=searchi|
000017d0  6e 67 2b 31 3a e7 73 65  61 72 63 68 69 6e 67 3e  |ng+1:.searching>|
000017e0  31 35 39 20 8c 20 73 74  61 67 65 3d 73 74 61 67  |159 . stage=stag|
000017f0  65 2b 31 3a 73 65 61 72  63 68 69 6e 67 3d 30 0d  |e+1:searching=0.|
00001800  06 b8 37 20 e7 20 66 72  65 71 61 3e 34 30 20 8c  |..7 . freqa>40 .|
00001810  20 66 6f 72 77 61 72 64  3d b9 20 8b 20 73 74 61  | forward=. . sta|
00001820  67 65 3d 73 74 61 67 65  2b 31 3a 73 65 61 72 63  |ge=stage+1:searc|
00001830  68 69 6e 67 3d 30 0d 06  c2 06 20 e1 0d 06 cc 06  |hing=0.... .....|
00001840  20 3a 0d 06 d6 3c 20 f4  20 46 69 6e 64 20 65 64  | :...< . Find ed|
00001850  67 65 20 6f 66 20 6e 65  74 20 61 6e 64 20 61 69  |ge of net and ai|
00001860  6d 20 66 6f 72 20 69 74  20 74 6f 20 6d 6f 76 65  |m for it to move|
00001870  20 74 6f 20 6f 74 68 65  72 20 73 69 64 65 0d 06  | to other side..|
00001880  e0 0e 20 dd f2 6d 6f 76  65 6f 75 74 0d 06 ea 9a  |.. ..moveout....|
00001890  20 e7 20 28 66 72 65 71  61 3c 33 30 20 84 20 66  | . (freqa<30 . f|
000018a0  72 65 71 62 3c 33 30 20  84 20 66 72 65 71 63 3c  |reqb<30 . freqc<|
000018b0  33 30 29 20 84 20 28 72  65 76 69 6e 67 20 80 20  |30) . (reving . |
000018c0  28 66 72 65 71 61 3c 31  32 35 20 84 20 66 72 65  |(freqa<125 . fre|
000018d0  71 62 3c 31 32 35 20 84  20 66 72 65 71 63 3c 31  |qb<125 . freqc<1|
000018e0  32 35 29 29 20 8c 20 73  65 61 72 63 68 69 6e 67  |25)) . searching|
000018f0  3d 73 65 61 72 63 68 69  6e 67 2f 32 3a 72 65 76  |=searching/2:rev|
00001900  69 6e 67 3d b9 3a 72 65  76 65 72 73 65 3d b9 3a  |ing=.:reverse=.:|
00001910  66 77 64 3d a3 3a 6c 65  66 74 3d a3 3a 72 69 67  |fwd=.:left=.:rig|
00001920  68 74 3d a3 3a e1 0d 06  f4 0d 20 72 65 76 69 6e  |ht=.:..... revin|
00001930  67 3d a3 0d 06 fe 2e 20  e7 20 66 72 65 71 62 3c  |g=..... . freqb<|
00001940  34 30 20 80 20 66 72 65  71 61 3e 32 35 30 20 8c  |40 . freqa>250 .|
00001950  20 72 69 67 68 74 3d b9  3a 6e 65 61 72 3d 31 3a  | right=.:near=1:|
00001960  e1 0d 07 08 34 20 e7 20  66 72 65 71 61 3c 32 30  |....4 . freqa<20|
00001970  30 20 80 20 66 72 65 71  62 3c 32 30 30 20 80 20  |0 . freqb<200 . |
00001980  66 72 65 71 63 3c 32 30  30 20 8c 20 72 69 67 68  |freqc<200 . righ|
00001990  74 3d b9 3a e1 0d 07 12  38 20 e7 20 28 66 72 65  |t=.:....8 . (fre|
000019a0  71 62 2a 31 2e 35 29 3c  66 72 65 71 63 20 80 20  |qb*1.5)<freqc . |
000019b0  28 66 72 65 71 61 2a 31  2e 35 29 3c 66 72 65 71  |(freqa*1.5)<freq|
000019c0  63 20 8c 20 72 69 67 68  74 3d b9 3a e1 0d 07 1c  |c . right=.:....|
000019d0  23 20 e7 20 28 66 72 65  71 62 2a 31 2e 35 29 3e  |# . (freqb*1.5)>|
000019e0  66 72 65 71 63 20 8c 20  6c 65 66 74 3d b9 3a e1  |freqc . left=.:.|
000019f0  0d 07 21 1a 20 e7 20 66  72 65 71 62 3e 31 30 30  |..!. . freqb>100|
00001a00  20 8c 20 74 75 72 62 6f  3d b9 0d 07 26 06 20 e1  | . turbo=...&. .|
00001a10  0d 07 30 06 20 3a 0d 07  3a 47 20 f4 20 4e 65 61  |..0. :..:G . Nea|
00001a20  72 6c 79 20 74 68 65 72  65 2e 2e 2e 20 4a 75 73  |rly there... Jus|
00001a30  74 20 6e 65 65 64 20 61  20 6c 69 74 74 6c 65 20  |t need a little |
00001a40  6e 75 64 67 65 20 69 6e  20 74 68 65 20 72 69 67  |nudge in the rig|
00001a50  68 74 20 64 69 72 65 63  74 69 6f 6e 2e 0d 07 44  |ht direction...D|
00001a60  12 20 dd f2 64 6f 6e 65  61 72 73 74 75 66 66 0d  |. ..donearstuff.|
00001a70  07 4e 10 20 6e 65 61 72  3d 6e 65 61 72 2b 31 0d  |.N. near=near+1.|
00001a80  07 58 19 20 e7 20 6e 65  61 72 3c 38 20 8c 20 72  |.X. . near<8 . r|
00001a90  69 67 68 74 3d b9 3a e1  0d 07 62 0b 20 6c 65 66  |ight=.:...b. lef|
00001aa0  74 3d b9 0d 07 6c 31 20  e7 20 6e 65 61 72 3e 31  |t=...l1 . near>1|
00001ab0  36 20 8c 20 6e 65 61 72  3d 30 3a 73 74 61 67 65  |6 . near=0:stage|
00001ac0  3d 73 74 61 67 65 2b 31  3a 73 65 61 72 63 68 69  |=stage+1:searchi|
00001ad0  6e 67 3d 30 0d 07 76 06  20 e1 0d 07 80 06 20 3a  |ng=0..v. ..... :|
00001ae0  0d 07 8a 0e 20 dd f2 73  65 74 75 70 62 62 0d 07  |.... ..setupbb..|
00001af0  94 3f 20 72 65 76 69 6e  67 3d a3 3a 6c 65 66 74  |.? reving=.:left|
00001b00  3d a3 3a 72 69 67 68 74  3d a3 3a 66 77 64 3d a3  |=.:right=.:fwd=.|
00001b10  3a 72 65 76 65 72 73 65  3d a3 3a 73 65 61 72 63  |:reverse=.:searc|
00001b20  68 69 6e 67 3d 30 3a 69  64 6c 65 3d b9 0d 07 9e  |hing=0:idle=....|
00001b30  0b 20 6e 65 61 72 3d a3  0d 07 a8 06 20 e1 0d 07  |. near=..... ...|
00001b40  b2 06 20 3a 0d 07 bc 0f  20 dd f2 72 65 6c 65 61  |.. :.... ..relea|
00001b50  73 65 62 0d 07 c6 2d 20  f4 20 47 6f 74 20 61 6c  |seb...- . Got al|
00001b60  6c 20 74 68 65 20 62 61  6c 6c 73 2c 20 6e 6f 77  |l the balls, now|
00001b70  20 6a 75 73 74 20 64 75  6d 70 20 74 68 65 6d 21  | just dump them!|
00001b80  0d 07 d0 20 20 6e 65 61  72 3d 6e 65 61 72 2b 31  |...  near=near+1|
00001b90  3a 72 65 76 65 72 73 65  3d b9 3a 66 77 64 3d a3  |:reverse=.:fwd=.|
00001ba0  0d 07 da 1d 20 e7 20 6e  65 61 72 3e 39 20 8c 20  |.... . near>9 . |
00001bb0  69 64 6c 65 3d b9 3a 6e  65 61 72 3d a3 0d 07 e4  |idle=.:near=....|
00001bc0  06 20 e1 0d 07 ee 44 20  f5 3a e3 58 3d 31 b8 31  |. ....D .:.X=1.1|
00001bd0  32 3a ff 22 43 48 41 4e  4e 45 4c 56 4f 49 43 45  |2:."CHANNELVOICE|
00001be0  20 31 20 22 2b c3 58 3a  d4 31 2c 2d 31 30 2c 35  | 1 "+.X:.1,-10,5|
00001bf0  32 2c 31 30 30 3a e3 52  3d 30 b8 31 30 30 30 30  |2,100:.R=0.10000|
00001c00  3a ed 2c 3a fd 20 a3 0d  ff                       |:.,:. ...|
00001c09
BioBot/BBReal.m0
BioBot/BBReal.m1
BioBot/BBReal.m2
BioBot/BBReal.m4
BioBot/BBReal.m5