Home » CEEFAX disks » telesoftware17.adl » 30-07-89/EvoSim

30-07-89/EvoSim

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 » CEEFAX disks » telesoftware17.adl
Filename: 30-07-89/EvoSim
Read OK:
File size: 11A4 bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10 REM Evolution simulation
   20 REM By Mark de Weger
   30 REM (c) The Micro User
   40 :
   50 MODE 7
   60 maxmem=150
   70 DIM bio% maxmem,bio2% maxmem*2,cl%(8)
   80 PROCinit
   90 FOR gen=1 TO max_gens
  100 PRINTTAB(0,1);"Calculating generation ";gen;"..."
  110 IF (mmbrs*2+1)>maxmem PRINT''"Population too large."':END
  120 PROCnext_gen
  130 IF starvation AND gen>die_gens PROCindent_starvation ELSE mmbrs=mmbrs*2+1:PROCindent_nostarvation
  140 IF shuffle PROCshuffle
  150 NEXT
  160 PROCconvert(mmbrs)
  170 PROCanalyse(0,mmbrs)
  180 MODE 130
  190 PROCgraphical
  200 IF FNyes("Another simulation? ") THEN RUN
  210 MODE 7
  220 END
  230 :
  240 DEF PROCinit
  250 REM Asks for options and initialises generation 0
  260 die_gens=0
  270 @%=&904
  280 PRINT'"Evolution simulation"
  290 PRINT"===================="
  300 PRINT'"By Mark de Weger"
  310 INPUT ''"No. of members of generation 0: "mmbrs
  320 IF mmbrs/2<>INT(mmbrs/2) PRINT"Must be even":GOTO 310
  330 mmbrs=mmbrs-1
  340 IF FNyes("Enter gene values? ") FOR L%=0 TO mmbrs:PRINT'"Gene values of no. ";L%;" (0-4)":INPUT" Chromosome 1,2: "a,b:bio%?L%=FNbyte(a)+16*FNbyte(b):NEXT ELSE FOR L%=0 TO mmbrs:bio%?L%=RND(256)-1:NEXT
  350 INPUT '"Number of generations to evaluate: "max_gens
  360 PRINT'"'Shuffle' members of each new";
  370 shuffle=FNyes("generation? ")
  380 starvation=FNyes("Is there rivalry? ")
  390  IF starvation INPUT "After how many generations? "die_gens:strongest=FNyes(CHR$11+"Survival of the fittest? ")
  400 INPUT '"Chance of mutation in percents: "chance
  410 IF chance=0 chance=1E9 ELSE chance=100/chance
  420 VDU 23,210,&1C08;&081C;&7F3E;&5D5D;
  430 VDU 23,211,&5D5D;&145D;&1414;&3614;
  440 man$=CHR$210+CHR$8+CHR$10+CHR$211+CHR$11
  450 CLS
  460 ENDPROC
  470 :
  480 DEF PROCnext_gen
  490 REM Puts members of new generation into array 'bio2%'
  500 FOR L1%=0 TO mmbrs STEP 2
  510 FOR L2%=0 TO 3
  520 bio2%?(L1%*2+L2%)=FNchild(bio%?L1%,bio%?(L1%+1))
  530 NEXT:NEXT:ENDPROC
  560 :
  570 DEF PROCindent_nostarvation
  580 REM Puts members of new generation back into array 'bio%'
  590 FOR L%=0 TO mmbrs
  600 bio%?L%=bio2%?L%:NEXT:ENDPROC
  630 :
  640 DEF PROCindent_starvation
  650 REM Puts half of members of new generation back into array 'bio%
  660 REM The other half 'dies'.
  670 IF NOT strongest PROCindent_nostarvation:ENDPROC
  680 bit=9
  690 bio_cnt=-1
  700 REPEAT
  710 bio2_cnt=-1
  720 bit=bit-1
  730 REPEAT
  740 bio2_cnt=bio2_cnt+1
  750 IF FNbits(bio2%?bio2_cnt)=bit bio_cnt=bio_cnt+1:bio%?bio_cnt=bio2%?bio2_cnt
  760 UNTIL (bio2_cnt=mmbrs*2+1) OR (bio_cnt=mmbrs)
  770 UNTIL bio_cnt=mmbrs
  780 ENDPROC
  790 :
  800 DEF PROCshuffle
  810 REM Randomly shuffles members of population (in array 'bio%') to ensure
  820 REM random 'hit' of father and mother
  830 FOR L%=1 TO 2*mmbrs
  840 rnd1=RND(mmbrs+1)-1
  850 rnd2=RND(mmbrs+1)-1
  860 temp=bio%?rnd1
  870 bio%?rnd1=bio%?rnd2
  880 bio%?rnd2=temp
  890 NEXT
  900 ENDPROC
  910 :
  920 DEF PROCconvert(end)
  930 REM Converts byte values into number of bits set in byte
  940 PRINT''"Converting results...";
  950 FOR L%=0 TO end
  960 bio%?L%=FNbits(bio%?L%)
  970 NEXT
  980 ENDPROC
  990 :
 1000 DEF PROCanalyse(start,end)
 1010 REM Shows results of evolution-simulation
 1020 sum=0
 1030 sum2=0
 1040 PRINT''"Analysing results...";
 1050 FOR L%=0 TO mmbrs
 1060 cl%(bio%?L%)=cl%(bio%?L%)+1
 1070 NEXT
 1080 FOR L%=0 TO 8
 1090 sum=sum+L%*(cl%(L%))
 1100 sum2=sum2+cl%(L%)
 1110 NEXT
 1120 average=sum/(mmbrs-1)
 1130 REM Evt. more statistical calculations
 1140 PRINT''"Average gene value (0-7): ";average
 1150 PRINT'"Print fenotype values of individual";
 1160 indiv=FNyes("members? ")
 1170 IF NOT indiv ENDPROC
 1180 FOR L%=0 TO mmbrs
 1190 PRINTTAB((L% MOD 4)*10),L%;": ";bio%?L%;
 1200 NEXT
 1210 PRINT
 1220 PRINT''"Press space..."
 1230 REPEAT UNTIL GET=32
 1240 ENDPROC
 1250 :
 1260 DEF FNchild(father,mother)
 1270 REM Gives gene values of 'child' born from 'father' and 'mother' by
 1280 REM randomly taking allels on 1st/2nd chromos. from father and from
 1290 REM mother. There is a small chance for a mutation.
 1300 IF RND(1)>.5 child=father AND 15 ELSE child=(father AND 240)/16
 1310 IF RND(1)>.5 child=child+(mother AND 15)*16 ELSE child=child+(mother AND 240)
 1320 IF RND(chance)=1 child=child EOR (RND(256)-1)
 1330 =child
 1340 :
 1350 DEF FNbits(byte)
 1360 REM Returns number of bits set in 'byte'
 1370 bits=0
 1380 FOR bitl=0 TO 7
 1390 IF (byte AND 2^bitl) bits=bits+1
 1400 NEXT
 1410 =bits
 1420 :
 1430 DEF FNbyte(bits)
 1440 REM Returns a number in which 'bits' bits are set
 1450 IF bits=0 =0
 1460 byte=0
 1470 FOR bL%=0 TO (bits-1)
 1480 byte=byte+2^bL%
 1490 NEXT
 1500 =byte
 1510 :
 1520 DEF FNyes(text$)
 1530 REM Returns TRUE if 'Y' pressed
 1540 PRINT'text$;
 1550 get$=GET$
 1560 PRINTget$
 1570 =get$="Y" OR get$="y"
 1580 :
 1590 DEF FNround(value)
 1600 REM Rounds off 'value' to the nearest ten
 1610 =INT(value/10+.5)*10
 1620 :
 1630 DEF PROCgraphical
 1640 REM Gives graphical output of results
 1650 FOR L%=0 TO 8
 1660 cl%(L%)=(cl%(L%)/sum2)*100
 1670 NEXT
 1680 FOR L%=0 TO 8
 1690 READ colour
 1700 PRINT;L%;":";cl%(L%);"%";TAB(7);
 1710 IF FNround(cl%(L%))=0 THEN 1770
 1720 COLOUR colour
 1730 IF L%=7 OR L%=8 COLOUR 135
 1740 FOR men=1 TO INT(FNround(cl%(L%))/10)
 1750 PRINTman$;
 1760 NEXT
 1770 PRINT''
 1780 COLOUR 7
 1790 COLOUR 128
 1800 NEXT
 1810 ENDPROC
 1820 :
 1830 DATA 7,3,6,5,2,1,4,4,0

 � Evolution simulation
 � By Mark de Weger
 � (c) The Micro User
( :
2 � 7
< maxmem=150
F( � bio% maxmem,bio2% maxmem*2,cl%(8)
P
 �init
Z � gen=1 � max_gens
d/ �0,1);"Calculating generation ";gen;"..."
n7 � (mmbrs*2+1)>maxmem �''"Population too large."':�
x �next_gen
�Z � starvation � gen>die_gens �indent_starvation � mmbrs=mmbrs*2+1:�indent_nostarvation
� � shuffle �shuffle
� �
� �convert(mmbrs)
� �analyse(0,mmbrs)
�
 � 130
� �graphical
�' � �yes("Another simulation? ") � �
� � 7
� �
� :
� � �init
�4 � Asks for options and initialises generation 0
 die_gens=0
 @%=&904
 �'"Evolution simulation"
" �"===================="
, �'"By Mark de Weger"
60 � ''"No. of members of generation 0: "mmbrs
@1 � mmbrs/2<>�(mmbrs/2) �"Must be even":� �TvA
J mmbrs=mmbrs-1
T� � �yes("Enter gene values? ") � L%=0 � mmbrs:�'"Gene values of no. ";L%;" (0-4)":�" Chromosome 1,2: "a,b:bio%?L%=�byte(a)+16*�byte(b):� � � L%=0 � mmbrs:bio%?L%=�(256)-1:�
^5 � '"Number of generations to evaluate: "max_gens
h' �'"'Shuffle' members of each new";
r! shuffle=�yes("generation? ")
|* starvation=�yes("Is there rivalry? ")
�k  � starvation � "After how many generations? "die_gens:strongest=�yes(�11+"Survival of the fittest? ")
�0 � '"Chance of mutation in percents: "chance
�. � chance=0 chance=1E9 � chance=100/chance
�& � 23,210,&1C08;&081C;&7F3E;&5D5D;
�& � 23,211,&5D5D;&145D;&1414;&3614;
� man$=�210+�8+�10+�211+�11
� �
� �
� :
� � �next_gen
�8 � Puts members of new generation into array 'bio2%'
� � L1%=0 � mmbrs � 2
� � L2%=0 � 3
4 bio2%?(L1%*2+L2%)=�child(bio%?L1%,bio%?(L1%+1))

 �:�:�
0 :
: � �indent_nostarvation
D< � Puts members of new generation back into array 'bio%'
N � L%=0 � mmbrs
X bio%?L%=bio2%?L%:�:�
v :
� � �indent_starvation
�C � Puts half of members of new generation back into array 'bio%
� � The other half 'dies'.
�) � � strongest �indent_nostarvation:�
�
 bit=9
� bio_cnt=-1
� �
� bio2_cnt=-1
� bit=bit-1
� �
� bio2_cnt=bio2_cnt+1
�N � �bits(bio2%?bio2_cnt)=bit bio_cnt=bio_cnt+1:bio%?bio_cnt=bio2%?bio2_cnt
�- � (bio2_cnt=mmbrs*2+1) � (bio_cnt=mmbrs)
 � bio_cnt=mmbrs
 �
 :
  � �shuffle
*J � Randomly shuffles members of population (in array 'bio%') to ensure
4( � random 'hit' of father and mother
> � L%=1 � 2*mmbrs
H rnd1=�(mmbrs+1)-1
R rnd2=�(mmbrs+1)-1
\ temp=bio%?rnd1
f bio%?rnd1=bio%?rnd2
p bio%?rnd2=temp
z �
� �
� :
� � �convert(end)
�; � Converts byte values into number of bits set in byte
�  �''"Converting results...";
� � L%=0 � end
� bio%?L%=�bits(bio%?L%)
� �
� �
� :
� � �analyse(start,end)
�, � Shows results of evolution-simulation
�
 sum=0
 sum2=0
 �''"Analysing results...";
 � L%=0 � mmbrs
$  cl%(bio%?L%)=cl%(bio%?L%)+1
. �
8 � L%=0 � 8
B sum=sum+L%*(cl%(L%))
L sum2=sum2+cl%(L%)
V �
` average=sum/(mmbrs-1)
j) � Evt. more statistical calculations
t, �''"Average gene value (0-7): ";average
~- �'"Print fenotype values of individual";
� indiv=�yes("members? ")
� � � indiv �
� � L%=0 � mmbrs
�$ �(L% � 4)*10),L%;": ";bio%?L%;
� �
� �
� �''"Press space..."
�
 � � �=32
� �
� :
� � �child(father,mother)
�F � Gives gene values of 'child' born from 'father' and 'mother' by
F � randomly taking allels on 1st/2nd chromos. from father and from

6 � mother. There is a small chance for a mutation.
: � �(1)>.5 child=father � 15 � child=(father � 240)/16
H � �(1)>.5 child=child+(mother � 15)*16 � child=child+(mother � 240)
(+ � �(chance)=1 child=child � (�(256)-1)
2 =child
< :
F � �bits(byte)
P+ � Returns number of bits set in 'byte'
Z bits=0
d � bitl=0 � 7
n" � (byte � 2^bitl) bits=bits+1
x �
�
 =bits
� :
� � �byte(bits)
�4 � Returns a number in which 'bits' bits are set
� � bits=0 =0
� byte=0
� � bL%=0 � (bits-1)
� byte=byte+2^bL%
� �
�
 =byte
� :
� � �yes(text$)
�" � Returns TRUE if 'Y' pressed

 �'text$;
 get$=�

 �get$
" =get$="Y" � get$="y"
, :
6 � �round(value)
@, � Rounds off 'value' to the nearest ten
J =�(value/10+.5)*10
T :
^ � �graphical
h( � Gives graphical output of results
r � L%=0 � 8
| cl%(L%)=(cl%(L%)/sum2)*100
� �
� � L%=0 � 8
�
 � colour
� �;L%;":";cl%(L%);"%";�7);
� � �round(cl%(L%))=0 � �djF
�
 � colour
� � L%=7 � L%=8 � 135
�$ � men=1 � �(�round(cl%(L%))/10)
� �man$;
� �
� �''
� � 7
�
 � 128
 �
 �
 :
& � 7,3,6,5,2,1,4,4,0
�
00000000  0d 00 0a 1b 20 f4 20 45  76 6f 6c 75 74 69 6f 6e  |.... . Evolution|
00000010  20 73 69 6d 75 6c 61 74  69 6f 6e 0d 00 14 17 20  | simulation.... |
00000020  f4 20 42 79 20 4d 61 72  6b 20 64 65 20 57 65 67  |. By Mark de Weg|
00000030  65 72 0d 00 1e 19 20 f4  20 28 63 29 20 54 68 65  |er.... . (c) The|
00000040  20 4d 69 63 72 6f 20 55  73 65 72 0d 00 28 06 20  | Micro User..(. |
00000050  3a 0d 00 32 08 20 eb 20  37 0d 00 3c 0f 20 6d 61  |:..2. . 7..<. ma|
00000060  78 6d 65 6d 3d 31 35 30  0d 00 46 28 20 de 20 62  |xmem=150..F( . b|
00000070  69 6f 25 20 6d 61 78 6d  65 6d 2c 62 69 6f 32 25  |io% maxmem,bio2%|
00000080  20 6d 61 78 6d 65 6d 2a  32 2c 63 6c 25 28 38 29  | maxmem*2,cl%(8)|
00000090  0d 00 50 0a 20 f2 69 6e  69 74 0d 00 5a 17 20 e3  |..P. .init..Z. .|
000000a0  20 67 65 6e 3d 31 20 b8  20 6d 61 78 5f 67 65 6e  | gen=1 . max_gen|
000000b0  73 0d 00 64 2f 20 f1 8a  30 2c 31 29 3b 22 43 61  |s..d/ ..0,1);"Ca|
000000c0  6c 63 75 6c 61 74 69 6e  67 20 67 65 6e 65 72 61  |lculating genera|
000000d0  74 69 6f 6e 20 22 3b 67  65 6e 3b 22 2e 2e 2e 22  |tion ";gen;"..."|
000000e0  0d 00 6e 37 20 e7 20 28  6d 6d 62 72 73 2a 32 2b  |..n7 . (mmbrs*2+|
000000f0  31 29 3e 6d 61 78 6d 65  6d 20 f1 27 27 22 50 6f  |1)>maxmem .''"Po|
00000100  70 75 6c 61 74 69 6f 6e  20 74 6f 6f 20 6c 61 72  |pulation too lar|
00000110  67 65 2e 22 27 3a e0 0d  00 78 0e 20 f2 6e 65 78  |ge."':...x. .nex|
00000120  74 5f 67 65 6e 0d 00 82  5a 20 e7 20 73 74 61 72  |t_gen...Z . star|
00000130  76 61 74 69 6f 6e 20 80  20 67 65 6e 3e 64 69 65  |vation . gen>die|
00000140  5f 67 65 6e 73 20 f2 69  6e 64 65 6e 74 5f 73 74  |_gens .indent_st|
00000150  61 72 76 61 74 69 6f 6e  20 8b 20 6d 6d 62 72 73  |arvation . mmbrs|
00000160  3d 6d 6d 62 72 73 2a 32  2b 31 3a f2 69 6e 64 65  |=mmbrs*2+1:.inde|
00000170  6e 74 5f 6e 6f 73 74 61  72 76 61 74 69 6f 6e 0d  |nt_nostarvation.|
00000180  00 8c 17 20 e7 20 73 68  75 66 66 6c 65 20 f2 73  |... . shuffle .s|
00000190  68 75 66 66 6c 65 0d 00  96 06 20 ed 0d 00 a0 14  |huffle.... .....|
000001a0  20 f2 63 6f 6e 76 65 72  74 28 6d 6d 62 72 73 29  | .convert(mmbrs)|
000001b0  0d 00 aa 16 20 f2 61 6e  61 6c 79 73 65 28 30 2c  |.... .analyse(0,|
000001c0  6d 6d 62 72 73 29 0d 00  b4 0a 20 eb 20 31 33 30  |mmbrs).... . 130|
000001d0  0d 00 be 0f 20 f2 67 72  61 70 68 69 63 61 6c 0d  |.... .graphical.|
000001e0  00 c8 27 20 e7 20 a4 79  65 73 28 22 41 6e 6f 74  |..' . .yes("Anot|
000001f0  68 65 72 20 73 69 6d 75  6c 61 74 69 6f 6e 3f 20  |her simulation? |
00000200  22 29 20 8c 20 f9 0d 00  d2 08 20 eb 20 37 0d 00  |") . ..... . 7..|
00000210  dc 06 20 e0 0d 00 e6 06  20 3a 0d 00 f0 0c 20 dd  |.. ..... :.... .|
00000220  20 f2 69 6e 69 74 0d 00  fa 34 20 f4 20 41 73 6b  | .init...4 . Ask|
00000230  73 20 66 6f 72 20 6f 70  74 69 6f 6e 73 20 61 6e  |s for options an|
00000240  64 20 69 6e 69 74 69 61  6c 69 73 65 73 20 67 65  |d initialises ge|
00000250  6e 65 72 61 74 69 6f 6e  20 30 0d 01 04 0f 20 64  |neration 0.... d|
00000260  69 65 5f 67 65 6e 73 3d  30 0d 01 0e 0c 20 40 25  |ie_gens=0.... @%|
00000270  3d 26 39 30 34 0d 01 18  1d 20 f1 27 22 45 76 6f  |=&904.... .'"Evo|
00000280  6c 75 74 69 6f 6e 20 73  69 6d 75 6c 61 74 69 6f  |lution simulatio|
00000290  6e 22 0d 01 22 1c 20 f1  22 3d 3d 3d 3d 3d 3d 3d  |n"..". ."=======|
000002a0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 22 0d 01  |============="..|
000002b0  2c 19 20 f1 27 22 42 79  20 4d 61 72 6b 20 64 65  |,. .'"By Mark de|
000002c0  20 57 65 67 65 72 22 0d  01 36 30 20 e8 20 27 27  | Weger"..60 . ''|
000002d0  22 4e 6f 2e 20 6f 66 20  6d 65 6d 62 65 72 73 20  |"No. of members |
000002e0  6f 66 20 67 65 6e 65 72  61 74 69 6f 6e 20 30 3a  |of generation 0:|
000002f0  20 22 6d 6d 62 72 73 0d  01 40 31 20 e7 20 6d 6d  | "mmbrs..@1 . mm|
00000300  62 72 73 2f 32 3c 3e a8  28 6d 6d 62 72 73 2f 32  |brs/2<>.(mmbrs/2|
00000310  29 20 f1 22 4d 75 73 74  20 62 65 20 65 76 65 6e  |) ."Must be even|
00000320  22 3a e5 20 8d 54 76 41  0d 01 4a 12 20 6d 6d 62  |":. .TvA..J. mmb|
00000330  72 73 3d 6d 6d 62 72 73  2d 31 0d 01 54 b0 20 e7  |rs=mmbrs-1..T. .|
00000340  20 a4 79 65 73 28 22 45  6e 74 65 72 20 67 65 6e  | .yes("Enter gen|
00000350  65 20 76 61 6c 75 65 73  3f 20 22 29 20 e3 20 4c  |e values? ") . L|
00000360  25 3d 30 20 b8 20 6d 6d  62 72 73 3a f1 27 22 47  |%=0 . mmbrs:.'"G|
00000370  65 6e 65 20 76 61 6c 75  65 73 20 6f 66 20 6e 6f  |ene values of no|
00000380  2e 20 22 3b 4c 25 3b 22  20 28 30 2d 34 29 22 3a  |. ";L%;" (0-4)":|
00000390  e8 22 20 43 68 72 6f 6d  6f 73 6f 6d 65 20 31 2c  |." Chromosome 1,|
000003a0  32 3a 20 22 61 2c 62 3a  62 69 6f 25 3f 4c 25 3d  |2: "a,b:bio%?L%=|
000003b0  a4 62 79 74 65 28 61 29  2b 31 36 2a a4 62 79 74  |.byte(a)+16*.byt|
000003c0  65 28 62 29 3a ed 20 8b  20 e3 20 4c 25 3d 30 20  |e(b):. . . L%=0 |
000003d0  b8 20 6d 6d 62 72 73 3a  62 69 6f 25 3f 4c 25 3d  |. mmbrs:bio%?L%=|
000003e0  b3 28 32 35 36 29 2d 31  3a ed 0d 01 5e 35 20 e8  |.(256)-1:...^5 .|
000003f0  20 27 22 4e 75 6d 62 65  72 20 6f 66 20 67 65 6e  | '"Number of gen|
00000400  65 72 61 74 69 6f 6e 73  20 74 6f 20 65 76 61 6c  |erations to eval|
00000410  75 61 74 65 3a 20 22 6d  61 78 5f 67 65 6e 73 0d  |uate: "max_gens.|
00000420  01 68 27 20 f1 27 22 27  53 68 75 66 66 6c 65 27  |.h' .'"'Shuffle'|
00000430  20 6d 65 6d 62 65 72 73  20 6f 66 20 65 61 63 68  | members of each|
00000440  20 6e 65 77 22 3b 0d 01  72 21 20 73 68 75 66 66  | new";..r! shuff|
00000450  6c 65 3d a4 79 65 73 28  22 67 65 6e 65 72 61 74  |le=.yes("generat|
00000460  69 6f 6e 3f 20 22 29 0d  01 7c 2a 20 73 74 61 72  |ion? ")..|* star|
00000470  76 61 74 69 6f 6e 3d a4  79 65 73 28 22 49 73 20  |vation=.yes("Is |
00000480  74 68 65 72 65 20 72 69  76 61 6c 72 79 3f 20 22  |there rivalry? "|
00000490  29 0d 01 86 6b 20 20 e7  20 73 74 61 72 76 61 74  |)...k  . starvat|
000004a0  69 6f 6e 20 e8 20 22 41  66 74 65 72 20 68 6f 77  |ion . "After how|
000004b0  20 6d 61 6e 79 20 67 65  6e 65 72 61 74 69 6f 6e  | many generation|
000004c0  73 3f 20 22 64 69 65 5f  67 65 6e 73 3a 73 74 72  |s? "die_gens:str|
000004d0  6f 6e 67 65 73 74 3d a4  79 65 73 28 bd 31 31 2b  |ongest=.yes(.11+|
000004e0  22 53 75 72 76 69 76 61  6c 20 6f 66 20 74 68 65  |"Survival of the|
000004f0  20 66 69 74 74 65 73 74  3f 20 22 29 0d 01 90 30  | fittest? ")...0|
00000500  20 e8 20 27 22 43 68 61  6e 63 65 20 6f 66 20 6d  | . '"Chance of m|
00000510  75 74 61 74 69 6f 6e 20  69 6e 20 70 65 72 63 65  |utation in perce|
00000520  6e 74 73 3a 20 22 63 68  61 6e 63 65 0d 01 9a 2e  |nts: "chance....|
00000530  20 e7 20 63 68 61 6e 63  65 3d 30 20 63 68 61 6e  | . chance=0 chan|
00000540  63 65 3d 31 45 39 20 8b  20 63 68 61 6e 63 65 3d  |ce=1E9 . chance=|
00000550  31 30 30 2f 63 68 61 6e  63 65 0d 01 a4 26 20 ef  |100/chance...& .|
00000560  20 32 33 2c 32 31 30 2c  26 31 43 30 38 3b 26 30  | 23,210,&1C08;&0|
00000570  38 31 43 3b 26 37 46 33  45 3b 26 35 44 35 44 3b  |81C;&7F3E;&5D5D;|
00000580  0d 01 ae 26 20 ef 20 32  33 2c 32 31 31 2c 26 35  |...& . 23,211,&5|
00000590  44 35 44 3b 26 31 34 35  44 3b 26 31 34 31 34 3b  |D5D;&145D;&1414;|
000005a0  26 33 36 31 34 3b 0d 01  b8 1e 20 6d 61 6e 24 3d  |&3614;.... man$=|
000005b0  bd 32 31 30 2b bd 38 2b  bd 31 30 2b bd 32 31 31  |.210+.8+.10+.211|
000005c0  2b bd 31 31 0d 01 c2 06  20 db 0d 01 cc 06 20 e1  |+.11.... ..... .|
000005d0  0d 01 d6 06 20 3a 0d 01  e0 10 20 dd 20 f2 6e 65  |.... :.... . .ne|
000005e0  78 74 5f 67 65 6e 0d 01  ea 38 20 f4 20 50 75 74  |xt_gen...8 . Put|
000005f0  73 20 6d 65 6d 62 65 72  73 20 6f 66 20 6e 65 77  |s members of new|
00000600  20 67 65 6e 65 72 61 74  69 6f 6e 20 69 6e 74 6f  | generation into|
00000610  20 61 72 72 61 79 20 27  62 69 6f 32 25 27 0d 01  | array 'bio2%'..|
00000620  f4 18 20 e3 20 4c 31 25  3d 30 20 b8 20 6d 6d 62  |.. . L1%=0 . mmb|
00000630  72 73 20 88 20 32 0d 01  fe 10 20 e3 20 4c 32 25  |rs . 2.... . L2%|
00000640  3d 30 20 b8 20 33 0d 02  08 34 20 62 69 6f 32 25  |=0 . 3...4 bio2%|
00000650  3f 28 4c 31 25 2a 32 2b  4c 32 25 29 3d a4 63 68  |?(L1%*2+L2%)=.ch|
00000660  69 6c 64 28 62 69 6f 25  3f 4c 31 25 2c 62 69 6f  |ild(bio%?L1%,bio|
00000670  25 3f 28 4c 31 25 2b 31  29 29 0d 02 12 0a 20 ed  |%?(L1%+1)).... .|
00000680  3a ed 3a e1 0d 02 30 06  20 3a 0d 02 3a 1b 20 dd  |:.:...0. :..:. .|
00000690  20 f2 69 6e 64 65 6e 74  5f 6e 6f 73 74 61 72 76  | .indent_nostarv|
000006a0  61 74 69 6f 6e 0d 02 44  3c 20 f4 20 50 75 74 73  |ation..D< . Puts|
000006b0  20 6d 65 6d 62 65 72 73  20 6f 66 20 6e 65 77 20  | members of new |
000006c0  67 65 6e 65 72 61 74 69  6f 6e 20 62 61 63 6b 20  |generation back |
000006d0  69 6e 74 6f 20 61 72 72  61 79 20 27 62 69 6f 25  |into array 'bio%|
000006e0  27 0d 02 4e 13 20 e3 20  4c 25 3d 30 20 b8 20 6d  |'..N. . L%=0 . m|
000006f0  6d 62 72 73 0d 02 58 19  20 62 69 6f 25 3f 4c 25  |mbrs..X. bio%?L%|
00000700  3d 62 69 6f 32 25 3f 4c  25 3a ed 3a e1 0d 02 76  |=bio2%?L%:.:...v|
00000710  06 20 3a 0d 02 80 19 20  dd 20 f2 69 6e 64 65 6e  |. :.... . .inden|
00000720  74 5f 73 74 61 72 76 61  74 69 6f 6e 0d 02 8a 43  |t_starvation...C|
00000730  20 f4 20 50 75 74 73 20  68 61 6c 66 20 6f 66 20  | . Puts half of |
00000740  6d 65 6d 62 65 72 73 20  6f 66 20 6e 65 77 20 67  |members of new g|
00000750  65 6e 65 72 61 74 69 6f  6e 20 62 61 63 6b 20 69  |eneration back i|
00000760  6e 74 6f 20 61 72 72 61  79 20 27 62 69 6f 25 0d  |nto array 'bio%.|
00000770  02 94 1d 20 f4 20 54 68  65 20 6f 74 68 65 72 20  |... . The other |
00000780  68 61 6c 66 20 27 64 69  65 73 27 2e 0d 02 9e 29  |half 'dies'....)|
00000790  20 e7 20 ac 20 73 74 72  6f 6e 67 65 73 74 20 f2  | . . strongest .|
000007a0  69 6e 64 65 6e 74 5f 6e  6f 73 74 61 72 76 61 74  |indent_nostarvat|
000007b0  69 6f 6e 3a e1 0d 02 a8  0a 20 62 69 74 3d 39 0d  |ion:..... bit=9.|
000007c0  02 b2 0f 20 62 69 6f 5f  63 6e 74 3d 2d 31 0d 02  |... bio_cnt=-1..|
000007d0  bc 06 20 f5 0d 02 c6 10  20 62 69 6f 32 5f 63 6e  |.. ..... bio2_cn|
000007e0  74 3d 2d 31 0d 02 d0 0e  20 62 69 74 3d 62 69 74  |t=-1.... bit=bit|
000007f0  2d 31 0d 02 da 06 20 f5  0d 02 e4 18 20 62 69 6f  |-1.... ..... bio|
00000800  32 5f 63 6e 74 3d 62 69  6f 32 5f 63 6e 74 2b 31  |2_cnt=bio2_cnt+1|
00000810  0d 02 ee 4e 20 e7 20 a4  62 69 74 73 28 62 69 6f  |...N . .bits(bio|
00000820  32 25 3f 62 69 6f 32 5f  63 6e 74 29 3d 62 69 74  |2%?bio2_cnt)=bit|
00000830  20 62 69 6f 5f 63 6e 74  3d 62 69 6f 5f 63 6e 74  | bio_cnt=bio_cnt|
00000840  2b 31 3a 62 69 6f 25 3f  62 69 6f 5f 63 6e 74 3d  |+1:bio%?bio_cnt=|
00000850  62 69 6f 32 25 3f 62 69  6f 32 5f 63 6e 74 0d 02  |bio2%?bio2_cnt..|
00000860  f8 2d 20 fd 20 28 62 69  6f 32 5f 63 6e 74 3d 6d  |.- . (bio2_cnt=m|
00000870  6d 62 72 73 2a 32 2b 31  29 20 84 20 28 62 69 6f  |mbrs*2+1) . (bio|
00000880  5f 63 6e 74 3d 6d 6d 62  72 73 29 0d 03 02 14 20  |_cnt=mmbrs).... |
00000890  fd 20 62 69 6f 5f 63 6e  74 3d 6d 6d 62 72 73 0d  |. bio_cnt=mmbrs.|
000008a0  03 0c 06 20 e1 0d 03 16  06 20 3a 0d 03 20 0f 20  |... ..... :.. . |
000008b0  dd 20 f2 73 68 75 66 66  6c 65 0d 03 2a 4a 20 f4  |. .shuffle..*J .|
000008c0  20 52 61 6e 64 6f 6d 6c  79 20 73 68 75 66 66 6c  | Randomly shuffl|
000008d0  65 73 20 6d 65 6d 62 65  72 73 20 6f 66 20 70 6f  |es members of po|
000008e0  70 75 6c 61 74 69 6f 6e  20 28 69 6e 20 61 72 72  |pulation (in arr|
000008f0  61 79 20 27 62 69 6f 25  27 29 20 74 6f 20 65 6e  |ay 'bio%') to en|
00000900  73 75 72 65 0d 03 34 28  20 f4 20 72 61 6e 64 6f  |sure..4( . rando|
00000910  6d 20 27 68 69 74 27 20  6f 66 20 66 61 74 68 65  |m 'hit' of fathe|
00000920  72 20 61 6e 64 20 6d 6f  74 68 65 72 0d 03 3e 15  |r and mother..>.|
00000930  20 e3 20 4c 25 3d 31 20  b8 20 32 2a 6d 6d 62 72  | . L%=1 . 2*mmbr|
00000940  73 0d 03 48 16 20 72 6e  64 31 3d b3 28 6d 6d 62  |s..H. rnd1=.(mmb|
00000950  72 73 2b 31 29 2d 31 0d  03 52 16 20 72 6e 64 32  |rs+1)-1..R. rnd2|
00000960  3d b3 28 6d 6d 62 72 73  2b 31 29 2d 31 0d 03 5c  |=.(mmbrs+1)-1..\|
00000970  13 20 74 65 6d 70 3d 62  69 6f 25 3f 72 6e 64 31  |. temp=bio%?rnd1|
00000980  0d 03 66 18 20 62 69 6f  25 3f 72 6e 64 31 3d 62  |..f. bio%?rnd1=b|
00000990  69 6f 25 3f 72 6e 64 32  0d 03 70 13 20 62 69 6f  |io%?rnd2..p. bio|
000009a0  25 3f 72 6e 64 32 3d 74  65 6d 70 0d 03 7a 06 20  |%?rnd2=temp..z. |
000009b0  ed 0d 03 84 06 20 e1 0d  03 8e 06 20 3a 0d 03 98  |..... ..... :...|
000009c0  14 20 dd 20 f2 63 6f 6e  76 65 72 74 28 65 6e 64  |. . .convert(end|
000009d0  29 0d 03 a2 3b 20 f4 20  43 6f 6e 76 65 72 74 73  |)...; . Converts|
000009e0  20 62 79 74 65 20 76 61  6c 75 65 73 20 69 6e 74  | byte values int|
000009f0  6f 20 6e 75 6d 62 65 72  20 6f 66 20 62 69 74 73  |o number of bits|
00000a00  20 73 65 74 20 69 6e 20  62 79 74 65 0d 03 ac 20  | set in byte... |
00000a10  20 f1 27 27 22 43 6f 6e  76 65 72 74 69 6e 67 20  | .''"Converting |
00000a20  72 65 73 75 6c 74 73 2e  2e 2e 22 3b 0d 03 b6 11  |results...";....|
00000a30  20 e3 20 4c 25 3d 30 20  b8 20 65 6e 64 0d 03 c0  | . L%=0 . end...|
00000a40  1b 20 62 69 6f 25 3f 4c  25 3d a4 62 69 74 73 28  |. bio%?L%=.bits(|
00000a50  62 69 6f 25 3f 4c 25 29  0d 03 ca 06 20 ed 0d 03  |bio%?L%).... ...|
00000a60  d4 06 20 e1 0d 03 de 06  20 3a 0d 03 e8 1a 20 dd  |.. ..... :.... .|
00000a70  20 f2 61 6e 61 6c 79 73  65 28 73 74 61 72 74 2c  | .analyse(start,|
00000a80  65 6e 64 29 0d 03 f2 2c  20 f4 20 53 68 6f 77 73  |end)..., . Shows|
00000a90  20 72 65 73 75 6c 74 73  20 6f 66 20 65 76 6f 6c  | results of evol|
00000aa0  75 74 69 6f 6e 2d 73 69  6d 75 6c 61 74 69 6f 6e  |ution-simulation|
00000ab0  0d 03 fc 0a 20 73 75 6d  3d 30 0d 04 06 0b 20 73  |.... sum=0.... s|
00000ac0  75 6d 32 3d 30 0d 04 10  1f 20 f1 27 27 22 41 6e  |um2=0.... .''"An|
00000ad0  61 6c 79 73 69 6e 67 20  72 65 73 75 6c 74 73 2e  |alysing results.|
00000ae0  2e 2e 22 3b 0d 04 1a 13  20 e3 20 4c 25 3d 30 20  |..";.... . L%=0 |
00000af0  b8 20 6d 6d 62 72 73 0d  04 24 20 20 63 6c 25 28  |. mmbrs..$  cl%(|
00000b00  62 69 6f 25 3f 4c 25 29  3d 63 6c 25 28 62 69 6f  |bio%?L%)=cl%(bio|
00000b10  25 3f 4c 25 29 2b 31 0d  04 2e 06 20 ed 0d 04 38  |%?L%)+1.... ...8|
00000b20  0f 20 e3 20 4c 25 3d 30  20 b8 20 38 0d 04 42 19  |. . L%=0 . 8..B.|
00000b30  20 73 75 6d 3d 73 75 6d  2b 4c 25 2a 28 63 6c 25  | sum=sum+L%*(cl%|
00000b40  28 4c 25 29 29 0d 04 4c  16 20 73 75 6d 32 3d 73  |(L%))..L. sum2=s|
00000b50  75 6d 32 2b 63 6c 25 28  4c 25 29 0d 04 56 06 20  |um2+cl%(L%)..V. |
00000b60  ed 0d 04 60 1a 20 61 76  65 72 61 67 65 3d 73 75  |...`. average=su|
00000b70  6d 2f 28 6d 6d 62 72 73  2d 31 29 0d 04 6a 29 20  |m/(mmbrs-1)..j) |
00000b80  f4 20 45 76 74 2e 20 6d  6f 72 65 20 73 74 61 74  |. Evt. more stat|
00000b90  69 73 74 69 63 61 6c 20  63 61 6c 63 75 6c 61 74  |istical calculat|
00000ba0  69 6f 6e 73 0d 04 74 2c  20 f1 27 27 22 41 76 65  |ions..t, .''"Ave|
00000bb0  72 61 67 65 20 67 65 6e  65 20 76 61 6c 75 65 20  |rage gene value |
00000bc0  28 30 2d 37 29 3a 20 22  3b 61 76 65 72 61 67 65  |(0-7): ";average|
00000bd0  0d 04 7e 2d 20 f1 27 22  50 72 69 6e 74 20 66 65  |..~- .'"Print fe|
00000be0  6e 6f 74 79 70 65 20 76  61 6c 75 65 73 20 6f 66  |notype values of|
00000bf0  20 69 6e 64 69 76 69 64  75 61 6c 22 3b 0d 04 88  | individual";...|
00000c00  1c 20 69 6e 64 69 76 3d  a4 79 65 73 28 22 6d 65  |. indiv=.yes("me|
00000c10  6d 62 65 72 73 3f 20 22  29 0d 04 92 10 20 e7 20  |mbers? ").... . |
00000c20  ac 20 69 6e 64 69 76 20  e1 0d 04 9c 13 20 e3 20  |. indiv ..... . |
00000c30  4c 25 3d 30 20 b8 20 6d  6d 62 72 73 0d 04 a6 24  |L%=0 . mmbrs...$|
00000c40  20 f1 8a 28 4c 25 20 83  20 34 29 2a 31 30 29 2c  | ..(L% . 4)*10),|
00000c50  4c 25 3b 22 3a 20 22 3b  62 69 6f 25 3f 4c 25 3b  |L%;": ";bio%?L%;|
00000c60  0d 04 b0 06 20 ed 0d 04  ba 06 20 f1 0d 04 c4 18  |.... ..... .....|
00000c70  20 f1 27 27 22 50 72 65  73 73 20 73 70 61 63 65  | .''"Press space|
00000c80  2e 2e 2e 22 0d 04 ce 0d  20 f5 20 fd 20 a5 3d 33  |...".... . . .=3|
00000c90  32 0d 04 d8 06 20 e1 0d  04 e2 06 20 3a 0d 04 ec  |2.... ..... :...|
00000ca0  1c 20 dd 20 a4 63 68 69  6c 64 28 66 61 74 68 65  |. . .child(fathe|
00000cb0  72 2c 6d 6f 74 68 65 72  29 0d 04 f6 46 20 f4 20  |r,mother)...F . |
00000cc0  47 69 76 65 73 20 67 65  6e 65 20 76 61 6c 75 65  |Gives gene value|
00000cd0  73 20 6f 66 20 27 63 68  69 6c 64 27 20 62 6f 72  |s of 'child' bor|
00000ce0  6e 20 66 72 6f 6d 20 27  66 61 74 68 65 72 27 20  |n from 'father' |
00000cf0  61 6e 64 20 27 6d 6f 74  68 65 72 27 20 62 79 0d  |and 'mother' by.|
00000d00  05 00 46 20 f4 20 72 61  6e 64 6f 6d 6c 79 20 74  |..F . randomly t|
00000d10  61 6b 69 6e 67 20 61 6c  6c 65 6c 73 20 6f 6e 20  |aking allels on |
00000d20  31 73 74 2f 32 6e 64 20  63 68 72 6f 6d 6f 73 2e  |1st/2nd chromos.|
00000d30  20 66 72 6f 6d 20 66 61  74 68 65 72 20 61 6e 64  | from father and|
00000d40  20 66 72 6f 6d 0d 05 0a  36 20 f4 20 6d 6f 74 68  | from...6 . moth|
00000d50  65 72 2e 20 54 68 65 72  65 20 69 73 20 61 20 73  |er. There is a s|
00000d60  6d 61 6c 6c 20 63 68 61  6e 63 65 20 66 6f 72 20  |mall chance for |
00000d70  61 20 6d 75 74 61 74 69  6f 6e 2e 0d 05 14 3a 20  |a mutation....: |
00000d80  e7 20 b3 28 31 29 3e 2e  35 20 63 68 69 6c 64 3d  |. .(1)>.5 child=|
00000d90  66 61 74 68 65 72 20 80  20 31 35 20 8b 20 63 68  |father . 15 . ch|
00000da0  69 6c 64 3d 28 66 61 74  68 65 72 20 80 20 32 34  |ild=(father . 24|
00000db0  30 29 2f 31 36 0d 05 1e  48 20 e7 20 b3 28 31 29  |0)/16...H . .(1)|
00000dc0  3e 2e 35 20 63 68 69 6c  64 3d 63 68 69 6c 64 2b  |>.5 child=child+|
00000dd0  28 6d 6f 74 68 65 72 20  80 20 31 35 29 2a 31 36  |(mother . 15)*16|
00000de0  20 8b 20 63 68 69 6c 64  3d 63 68 69 6c 64 2b 28  | . child=child+(|
00000df0  6d 6f 74 68 65 72 20 80  20 32 34 30 29 0d 05 28  |mother . 240)..(|
00000e00  2b 20 e7 20 b3 28 63 68  61 6e 63 65 29 3d 31 20  |+ . .(chance)=1 |
00000e10  63 68 69 6c 64 3d 63 68  69 6c 64 20 82 20 28 b3  |child=child . (.|
00000e20  28 32 35 36 29 2d 31 29  0d 05 32 0b 20 3d 63 68  |(256)-1)..2. =ch|
00000e30  69 6c 64 0d 05 3c 06 20  3a 0d 05 46 12 20 dd 20  |ild..<. :..F. . |
00000e40  a4 62 69 74 73 28 62 79  74 65 29 0d 05 50 2b 20  |.bits(byte)..P+ |
00000e50  f4 20 52 65 74 75 72 6e  73 20 6e 75 6d 62 65 72  |. Returns number|
00000e60  20 6f 66 20 62 69 74 73  20 73 65 74 20 69 6e 20  | of bits set in |
00000e70  27 62 79 74 65 27 0d 05  5a 0b 20 62 69 74 73 3d  |'byte'..Z. bits=|
00000e80  30 0d 05 64 11 20 e3 20  62 69 74 6c 3d 30 20 b8  |0..d. . bitl=0 .|
00000e90  20 37 0d 05 6e 22 20 e7  20 28 62 79 74 65 20 80  | 7..n" . (byte .|
00000ea0  20 32 5e 62 69 74 6c 29  20 62 69 74 73 3d 62 69  | 2^bitl) bits=bi|
00000eb0  74 73 2b 31 0d 05 78 06  20 ed 0d 05 82 0a 20 3d  |ts+1..x. ..... =|
00000ec0  62 69 74 73 0d 05 8c 06  20 3a 0d 05 96 12 20 dd  |bits.... :.... .|
00000ed0  20 a4 62 79 74 65 28 62  69 74 73 29 0d 05 a0 34  | .byte(bits)...4|
00000ee0  20 f4 20 52 65 74 75 72  6e 73 20 61 20 6e 75 6d  | . Returns a num|
00000ef0  62 65 72 20 69 6e 20 77  68 69 63 68 20 27 62 69  |ber in which 'bi|
00000f00  74 73 27 20 62 69 74 73  20 61 72 65 20 73 65 74  |ts' bits are set|
00000f10  0d 05 aa 10 20 e7 20 62  69 74 73 3d 30 20 3d 30  |.... . bits=0 =0|
00000f20  0d 05 b4 0b 20 62 79 74  65 3d 30 0d 05 be 17 20  |.... byte=0.... |
00000f30  e3 20 62 4c 25 3d 30 20  b8 20 28 62 69 74 73 2d  |. bL%=0 . (bits-|
00000f40  31 29 0d 05 c8 14 20 62  79 74 65 3d 62 79 74 65  |1).... byte=byte|
00000f50  2b 32 5e 62 4c 25 0d 05  d2 06 20 ed 0d 05 dc 0a  |+2^bL%.... .....|
00000f60  20 3d 62 79 74 65 0d 05  e6 06 20 3a 0d 05 f0 12  | =byte.... :....|
00000f70  20 dd 20 a4 79 65 73 28  74 65 78 74 24 29 0d 05  | . .yes(text$)..|
00000f80  fa 22 20 f4 20 52 65 74  75 72 6e 73 20 54 52 55  |." . Returns TRU|
00000f90  45 20 69 66 20 27 59 27  20 70 72 65 73 73 65 64  |E if 'Y' pressed|
00000fa0  0d 06 04 0d 20 f1 27 74  65 78 74 24 3b 0d 06 0e  |.... .'text$;...|
00000fb0  0b 20 67 65 74 24 3d be  0d 06 18 0a 20 f1 67 65  |. get$=..... .ge|
00000fc0  74 24 0d 06 22 19 20 3d  67 65 74 24 3d 22 59 22  |t$..". =get$="Y"|
00000fd0  20 84 20 67 65 74 24 3d  22 79 22 0d 06 2c 06 20  | . get$="y"..,. |
00000fe0  3a 0d 06 36 14 20 dd 20  a4 72 6f 75 6e 64 28 76  |:..6. . .round(v|
00000ff0  61 6c 75 65 29 0d 06 40  2c 20 f4 20 52 6f 75 6e  |alue)..@, . Roun|
00001000  64 73 20 6f 66 66 20 27  76 61 6c 75 65 27 20 74  |ds off 'value' t|
00001010  6f 20 74 68 65 20 6e 65  61 72 65 73 74 20 74 65  |o the nearest te|
00001020  6e 0d 06 4a 17 20 3d a8  28 76 61 6c 75 65 2f 31  |n..J. =.(value/1|
00001030  30 2b 2e 35 29 2a 31 30  0d 06 54 06 20 3a 0d 06  |0+.5)*10..T. :..|
00001040  5e 11 20 dd 20 f2 67 72  61 70 68 69 63 61 6c 0d  |^. . .graphical.|
00001050  06 68 28 20 f4 20 47 69  76 65 73 20 67 72 61 70  |.h( . Gives grap|
00001060  68 69 63 61 6c 20 6f 75  74 70 75 74 20 6f 66 20  |hical output of |
00001070  72 65 73 75 6c 74 73 0d  06 72 0f 20 e3 20 4c 25  |results..r. . L%|
00001080  3d 30 20 b8 20 38 0d 06  7c 1f 20 63 6c 25 28 4c  |=0 . 8..|. cl%(L|
00001090  25 29 3d 28 63 6c 25 28  4c 25 29 2f 73 75 6d 32  |%)=(cl%(L%)/sum2|
000010a0  29 2a 31 30 30 0d 06 86  06 20 ed 0d 06 90 0f 20  |)*100.... ..... |
000010b0  e3 20 4c 25 3d 30 20 b8  20 38 0d 06 9a 0d 20 f3  |. L%=0 . 8.... .|
000010c0  20 63 6f 6c 6f 75 72 0d  06 a4 1e 20 f1 3b 4c 25  | colour.... .;L%|
000010d0  3b 22 3a 22 3b 63 6c 25  28 4c 25 29 3b 22 25 22  |;":";cl%(L%);"%"|
000010e0  3b 8a 37 29 3b 0d 06 ae  1f 20 e7 20 a4 72 6f 75  |;.7);.... . .rou|
000010f0  6e 64 28 63 6c 25 28 4c  25 29 29 3d 30 20 8c 20  |nd(cl%(L%))=0 . |
00001100  8d 64 6a 46 0d 06 b8 0d  20 fb 20 63 6f 6c 6f 75  |.djF.... . colou|
00001110  72 0d 06 c2 18 20 e7 20  4c 25 3d 37 20 84 20 4c  |r.... . L%=7 . L|
00001120  25 3d 38 20 fb 20 31 33  35 0d 06 cc 24 20 e3 20  |%=8 . 135...$ . |
00001130  6d 65 6e 3d 31 20 b8 20  a8 28 a4 72 6f 75 6e 64  |men=1 . .(.round|
00001140  28 63 6c 25 28 4c 25 29  29 2f 31 30 29 0d 06 d6  |(cl%(L%))/10)...|
00001150  0b 20 f1 6d 61 6e 24 3b  0d 06 e0 06 20 ed 0d 06  |. .man$;.... ...|
00001160  ea 08 20 f1 27 27 0d 06  f4 08 20 fb 20 37 0d 06  |.. .''.... . 7..|
00001170  fe 0a 20 fb 20 31 32 38  0d 07 08 06 20 ed 0d 07  |.. . 128.... ...|
00001180  12 06 20 e1 0d 07 1c 06  20 3a 0d 07 26 18 20 dc  |.. ..... :..&. .|
00001190  20 37 2c 33 2c 36 2c 35  2c 32 2c 31 2c 34 2c 34  | 7,3,6,5,2,1,4,4|
000011a0  2c 30 0d ff                                       |,0..|
000011a4
30-07-89/EvoSim.m0
30-07-89/EvoSim.m1
30-07-89/EvoSim.m2
30-07-89/EvoSim.m4
30-07-89/EvoSim.m5