start tok64 d64-jJo3Qv 1000 ********************************** 1010 * * 1020 * l iii ffff eeee * 1030 * l i f e * 1040 * l i fff eee * 1050 * l i f e * 1060 * llll iii f eeee * 1070 * * 1080 ********************************** 1090 * a simulatiON of lIFe! * 1100 ********************************** 1110 the game of lIFe was first present 1120 ed by john cONway, a mathematician 1130 at cambridge university, in the 1140 ocTOber, 1970 issue of scientIFic 1150 american. some of the following 1160 is copied from that article. 1170 * * 1180 the basic idea is TO start with a 1190 small group of "cells" in a simple 1200 pattern, AND THEN observe how that 1210 pattern changes as you apply the 1220 genetic laws developed by cONway. 1230 the rules follow three desiderata: 1240 a) there should be no initial pat- 1250 . tern FOR which there's a simple 1260 . proof that the populatiON can 1270 . grow without limit. 1280 b) there should be initial patt- 1290 . erns that apparently do grow 1300 . without limit. 1310 c) there should be simple initial 1320 . patterns which grow AND change 1330 . FOR a cONsiderable period of 1340 . time beFORe coming TO an END 1350 . in ONe of 3 POSsible ways: 1360 . 1) fade away from overcrowding 1370 . OR from becoming TOo sparse; 1380 . 2) settle INTo a stable cON- 1390 . figuratiON; 1400 . 3) OR enter an oscillating 1410 . phase which repeats FORever. 1420 in brief, the rules should be such 1430 as TO make the behaviour of the 1440 populatiob unpredictable. 1450 * * 1460 the rules which result from these 1470 desiderata are very simple. first 1480 NOTe that any square in a checker- 1490 board (assuming ONe that is infin- 1500 ite in both directiONs) has eight 1510 other squares around it, OR eight 1520 neighbours. the rules are: 1530 surviVALs: every cell with 2 OR 3 1540 . neighbours survives TO the NEXT 1550 . generatiON. 1560 deaths: each cell with 4 OR mORe 1570 . neighbours dies from overcrowd- 1580 . ing. each cell with 1 OR less 1590 . neighbours dies from isolatiON. 1600 births: any empty locatiON which 1610 . has exactly 3 neighbouring loc- 1620 . atiONs CONTaining cells will 1630 . have a cell in it in the NEXT 1640 . generatiON. 1650 * * 1660 it's impORTANt TO NOTe that births 1670 AND deaths occur simulTANeously in 1680 the development of the NEXT gener- 1690 atiON. ORiginally, this process 1700 was dONe uSINg 2 colours of check- 1710 ers ON a checkerboard. now, due 1720 TO the marvel of the commodORe 64, 1730 we can perFORm a tedious job in a 1740 few secONds without making any 1750 errORs at all. 1760 * * 1770 the hisTOry of many of the simple 1780 initial patterns OR colONies have 1790 been charted AND are shown below. 1800 as well, some of the mORe commON 1810 stable patterns are also shown. 1820 * * 1830 *********the 5 tripLETs*********** 1840 * * 1850 * gen #0 gen#1 gen#2 * 1860 ---------------------------------- 1870 "{space*3}Q 1880 "{space*3}Q{space*11}QQ{space*7}dies 1890 "{space*4}Q 1900 ---------------------------------- 1910 "{space*3}Q{space*11}Q{space*8}dies 1920 "{space*2}Q Q{space*10}Q 1930 ---------------------------------- 1940 "{space*4}Q 1950 "{space*3}Q{space*11}Q{space*8}dies 1960 "{space*2}Q 1970 ---------------------------------- 1980 "{space*3}QQ{space*10}QQ{space*7}the block 1990 "{space*3}Q{space*11}QQ{space*7}(stable) 2000 ---------------------------------- 2010 "{space*15}Q 2020 "{space*2}{Q*3}{space*10}Q{space*8}blinker 2030 "{space*15}Q{space*8}(cylcle=2 2040 ---------------------------------- 2050 * * 2060 ******the five tetrominoes******** 2070 * * 2080 * gen #0 gen#1 gen#2 * 2090 ---------------------------------- 2100 "{space*3}QQ{space*10}QQ{space*7}the block 2110 "{space*3}QQ{space*10}QQ{space*7}(stable) 2120 ---------------------------------- 2130 "{space*15}QQ{space*10}QQ 2140 "{space*2}{Q*4}{space*9}QQ{space*9}Q{space*2}Q 2150 "{space*15}QQ{space*10}QQ 2160 "{space*17}beehive (stable) 2170 ---------------------------------- 2180 "{space*3}Q{space*11}QQ{space*10}QQ 2190 "{space*3}QQ{space*10}QQ{space*9}Q{space*2}Q 2200 "{space*4}Q{space*10}QQ{space*10}QQ 2210 "{space*17}beehive (stable) 2220 ---------------------------------- 2230 "{space*2}Q{space*12}Q{space*11}QQ 2240 "{space*2}{Q*3}{space*10}QQ{space*10}QQ 2250 "{space*16}Q{space*10}QQ 2260 "{space*18}same as above 2270 ---------------------------------- 2280 "{space*3}Q{space*10}{Q*3}{space*10}Q 2290 "{space*2}{Q*3}{space*9}{Q*3}{space*9}Q Q 2300 "{space*15}Q 2310 "{space*26}{Q*3} 2320 "{space*19}continues to a 2330 "{space*19}pattern called 2340 "{space*19}streetlights. 2350 ---------------------------------- 2360 * * 2370 *********stable FORms************* 2380 * * 2390 ---------------------------------- 2400 "{space*4}Q{space*8}QQ{space*8}QQ 2410 "{space*3}Q Q{space*6}Q{space*2}Q{space*6}Q{space*2}Q 2420 "{space*3}Q Q{space*7}Q Q{space*6}Q{space*2}Q 2430 "{space*4}Q{space*9}Q{space*8}QQ 2440 " beehive{space*4}loaf{space*6}pond 2450 ---------------------------------- 2460 "{space*4}Q{space*8}QQ{space*7}Q{sh space}QQ 2470 "{space*3}Q Q{space*7}QQ{space*7}QQ Q 2480 "{space*4}Q 2490 "{space*3}tub{space*6}block{space*5}snake 2500 ---------------------------------- 2510 "{space*4}Q{space*8}Q{space*8}QQ 2520 "{space*3}Q Q{space*6}Q Q{space*7}Q Q 2530 "{space*4}Q Q{space*6}QQ{space*8}QQ 2540 "{space*5}Q 2550 "{space*3}barge{space*4}boat{space*6}ship 2560 ---------------------------------- 2570 "{space*4}Q{space*8}Q{space*8}QQ 2580 "{space*3}Q Q{space*6}Q Q{space*7}Q Q 2590 "{space*4}Q Q{space*6}Q Q{space*7}Q Q 2600 "{space*5}Q Q{space*6}QQ{space*8}QQ 2610 "{space*6}Q 2620 "long barge long boat long ship 2630 ---------------------------------- 2640 * * 2650 *****INTeresting patterns********* 2655 * try starting with these * 2660 * * 2670 ---------------------------------- 2680 "{space*3}QQ{space*10}Q{space*9}Q Q 2690 "{space*2}QQ{space*10}{Q*3}{space*8}{Q*3} 2700 "{space*3}Q{space*11}Q{space*9}Q Q 2710 "{space*15}Q 2720 " the 'r'{space*5}latin{space*6}letter 2730 "pentomino{space*4}cross{space*7}'h' 2740 ---------------------------------- 2750 "{space*2}Q {Q*3}{space*9}QQ{space*7}{Q*3} 2760 "{space*2}Q Q{space*11}QQ{space*7}Q{sh space}Q 2770 "{space*2}{Q*5}{space*7}QQ{space*9}Q{sh space}Q 2780 "{space*4}Q{sh space}Q{space*7}QQ 2790 "{space*2}{Q*3}{sh space}Q{space*17}symbol 2800 " swastika{space*4}beacon{space*6}'{pi}' 2810 ---------------------------------- 2820 "{space*4}Q{space*21}Q 2830 "{space*5}QQ{space*9}{Q*3}{space*8}Q 2840 "{space*3}QQ{space*10}{Q*3}{space*7}{Q*3} 2850 "{space*5}Q 2860 "{space*3}clock{space*7}toad{space*5}glider 2870 ---------------------------------- 2880 * * 2890 there are many other beautIFul 2900 patterns which can be generated by 2910 this simulatiON. try a few NEW 2920 starting patterns AND see how they 2930 grow AND die - surpriSINg you all 2940 the time. 2950 * * 2960 the program provided is written in 2970 a combinatiON of basic AND machine 2980 language. the machine language 2990 was used TO provide speed during 3000 the creatiON of NEW generatiONs. 3010 the program will allow you TO LOAD 3020 AND SAVE patterns ON the disk at 3030 any time. IF you find a partic- 3040 ularly INTeresting pattern, i 3050 would be pleased TO hear from you 3060 at the following address: 3070 "{space*8}glen bodie 3080 "{space*8}90 kingsmount pk rd 3090 "{space*8}toronto, ontario 3100 "{space*8}m4l 3l4 3110 "{space*8}(416) 461-3483 3120 as a last NOTe, when uSINg the 3130 program, you can always press f8 3140 in ORder TO see the "help" inFOR- 3150 matiON. this gives you some gen- 3160 eral info like that above AND a 3170 descriptiON of the purPOSes of the 3180 functiON keys. 3190 * * 3200 enjoy your "life"! stop tok64 (bastext 1.0)