Home » Archimedes archive » Acorn User » AU 1994-02.adf » !AI/!Help
!AI/!Help
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 » Archimedes archive » Acorn User » AU 1994-02.adf |
Filename: | !AI/!Help |
Read OK: | ✔ |
File size: | 07E2 bytes |
Load address: | FFFFFF45 |
Exec address: | 55F0DCA |
File contents
Artificially Intelligent Drawing By Barry Wickett Stroke is an exercise in artificial intelligence. It allows you to draw freehand lines in a window, and these are then converted into straight line segments for output to Draw. Run Stroke to install it on the icon bar, and click on its icon to open an empty window, where you create all of the input. The mouse acts as your pencil and the window is your piece of paper. You can draw lines by holding down Select and moving the pointer. The computer will straighten out any wiggles and draw a straight line version of your squiggles. If you or the computer makes a small mistake then click Adjust to delete the last line created. Sometimes the program will fail and change things incorrectly, like connecting two points that shouldn't be so. The system is designed so it can be finely tuned to suit each user; choose Settings from the menu and a window will appear with a list of options that can be changed. There are two sections to the options window. The second section lists the test that will operate whilst drawing: these are described in detail in the article on page 57 of the magazine. The first section contains a list of tolerances that are used with the tests and these can be altered to suit your style. This is what they do: Short line � any line that shorter than this length is discarded. Jitter � minimum distance the mouse has to move before a new data point is added. Corner � greatest angle allowed between any three points before a corner is detected and marked. This value has to be surprisingly high. Connected � points and lines within this distance from each other are deemed to be connected. Equal length � line lengths differing by less than this value are deemed to be the same length. Equal angle � line angles differing by less than this value are deemed to be the same angle. The Therapy program simulates a therapist. Run it and type in whatever you want to the prompts: it can be most interesting. Copyright � Barry Wickett 1994
00000000 41 72 74 69 66 69 63 69 61 6c 6c 79 20 49 6e 74 |Artificially Int| 00000010 65 6c 6c 69 67 65 6e 74 20 44 72 61 77 69 6e 67 |elligent Drawing| 00000020 0a 42 79 20 42 61 72 72 79 20 57 69 63 6b 65 74 |.By Barry Wicket| 00000030 74 0a 0a 53 74 72 6f 6b 65 20 69 73 20 61 6e 20 |t..Stroke is an | 00000040 65 78 65 72 63 69 73 65 20 69 6e 20 61 72 74 69 |exercise in arti| 00000050 66 69 63 69 61 6c 20 69 6e 74 65 6c 6c 69 67 65 |ficial intellige| 00000060 6e 63 65 2e 20 49 74 20 61 6c 6c 6f 77 73 20 79 |nce. It allows y| 00000070 6f 75 20 74 6f 20 64 72 61 77 20 66 72 65 65 68 |ou to draw freeh| 00000080 61 6e 64 20 6c 69 6e 65 73 20 69 6e 20 61 20 77 |and lines in a w| 00000090 69 6e 64 6f 77 2c 20 61 6e 64 20 74 68 65 73 65 |indow, and these| 000000a0 20 61 72 65 20 74 68 65 6e 20 63 6f 6e 76 65 72 | are then conver| 000000b0 74 65 64 20 69 6e 74 6f 20 73 74 72 61 69 67 68 |ted into straigh| 000000c0 74 20 6c 69 6e 65 20 73 65 67 6d 65 6e 74 73 20 |t line segments | 000000d0 66 6f 72 20 6f 75 74 70 75 74 20 74 6f 20 44 72 |for output to Dr| 000000e0 61 77 2e 0a 0a 52 75 6e 20 53 74 72 6f 6b 65 20 |aw...Run Stroke | 000000f0 74 6f 20 69 6e 73 74 61 6c 6c 20 69 74 20 6f 6e |to install it on| 00000100 20 74 68 65 20 69 63 6f 6e 20 62 61 72 2c 20 61 | the icon bar, a| 00000110 6e 64 20 63 6c 69 63 6b 20 6f 6e 20 69 74 73 20 |nd click on its | 00000120 69 63 6f 6e 20 74 6f 20 6f 70 65 6e 20 61 6e 20 |icon to open an | 00000130 65 6d 70 74 79 20 77 69 6e 64 6f 77 2c 20 77 68 |empty window, wh| 00000140 65 72 65 20 79 6f 75 20 63 72 65 61 74 65 20 61 |ere you create a| 00000150 6c 6c 20 6f 66 20 74 68 65 20 69 6e 70 75 74 2e |ll of the input.| 00000160 20 54 68 65 20 6d 6f 75 73 65 20 61 63 74 73 20 | The mouse acts | 00000170 61 73 20 79 6f 75 72 20 70 65 6e 63 69 6c 20 61 |as your pencil a| 00000180 6e 64 20 74 68 65 20 77 69 6e 64 6f 77 20 69 73 |nd the window is| 00000190 20 79 6f 75 72 20 70 69 65 63 65 20 6f 66 20 70 | your piece of p| 000001a0 61 70 65 72 2e 20 59 6f 75 20 63 61 6e 20 64 72 |aper. You can dr| 000001b0 61 77 20 6c 69 6e 65 73 20 62 79 20 68 6f 6c 64 |aw lines by hold| 000001c0 69 6e 67 20 64 6f 77 6e 20 53 65 6c 65 63 74 20 |ing down Select | 000001d0 61 6e 64 20 6d 6f 76 69 6e 67 20 74 68 65 20 70 |and moving the p| 000001e0 6f 69 6e 74 65 72 2e 20 54 68 65 20 63 6f 6d 70 |ointer. The comp| 000001f0 75 74 65 72 20 77 69 6c 6c 20 73 74 72 61 69 67 |uter will straig| 00000200 68 74 65 6e 20 6f 75 74 20 61 6e 79 20 77 69 67 |hten out any wig| 00000210 67 6c 65 73 20 61 6e 64 20 64 72 61 77 20 61 20 |gles and draw a | 00000220 73 74 72 61 69 67 68 74 20 6c 69 6e 65 20 76 65 |straight line ve| 00000230 72 73 69 6f 6e 20 6f 66 20 79 6f 75 72 20 73 71 |rsion of your sq| 00000240 75 69 67 67 6c 65 73 2e 20 49 66 20 79 6f 75 20 |uiggles. If you | 00000250 6f 72 20 74 68 65 20 63 6f 6d 70 75 74 65 72 20 |or the computer | 00000260 6d 61 6b 65 73 20 61 20 73 6d 61 6c 6c 20 6d 69 |makes a small mi| 00000270 73 74 61 6b 65 20 74 68 65 6e 20 63 6c 69 63 6b |stake then click| 00000280 20 41 64 6a 75 73 74 20 74 6f 20 64 65 6c 65 74 | Adjust to delet| 00000290 65 20 74 68 65 20 6c 61 73 74 20 6c 69 6e 65 20 |e the last line | 000002a0 63 72 65 61 74 65 64 2e 0a 0a 53 6f 6d 65 74 69 |created...Someti| 000002b0 6d 65 73 20 74 68 65 20 70 72 6f 67 72 61 6d 20 |mes the program | 000002c0 77 69 6c 6c 20 66 61 69 6c 20 61 6e 64 20 63 68 |will fail and ch| 000002d0 61 6e 67 65 20 74 68 69 6e 67 73 20 69 6e 63 6f |ange things inco| 000002e0 72 72 65 63 74 6c 79 2c 20 6c 69 6b 65 20 63 6f |rrectly, like co| 000002f0 6e 6e 65 63 74 69 6e 67 20 74 77 6f 20 70 6f 69 |nnecting two poi| 00000300 6e 74 73 20 74 68 61 74 20 73 68 6f 75 6c 64 6e |nts that shouldn| 00000310 27 74 20 62 65 20 73 6f 2e 20 54 68 65 20 73 79 |'t be so. The sy| 00000320 73 74 65 6d 20 69 73 20 64 65 73 69 67 6e 65 64 |stem is designed| 00000330 20 73 6f 20 69 74 20 63 61 6e 20 62 65 20 66 69 | so it can be fi| 00000340 6e 65 6c 79 20 74 75 6e 65 64 20 74 6f 20 73 75 |nely tuned to su| 00000350 69 74 20 65 61 63 68 20 75 73 65 72 3b 20 63 68 |it each user; ch| 00000360 6f 6f 73 65 20 53 65 74 74 69 6e 67 73 20 66 72 |oose Settings fr| 00000370 6f 6d 20 74 68 65 20 6d 65 6e 75 20 61 6e 64 20 |om the menu and | 00000380 61 20 77 69 6e 64 6f 77 20 77 69 6c 6c 20 61 70 |a window will ap| 00000390 70 65 61 72 20 77 69 74 68 20 61 20 6c 69 73 74 |pear with a list| 000003a0 20 6f 66 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 | of options that| 000003b0 20 63 61 6e 20 62 65 20 63 68 61 6e 67 65 64 2e | can be changed.| 000003c0 0a 0a 54 68 65 72 65 20 61 72 65 20 74 77 6f 20 |..There are two | 000003d0 73 65 63 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 |sections to the | 000003e0 6f 70 74 69 6f 6e 73 20 77 69 6e 64 6f 77 2e 20 |options window. | 000003f0 54 68 65 20 73 65 63 6f 6e 64 20 73 65 63 74 69 |The second secti| 00000400 6f 6e 20 6c 69 73 74 73 20 74 68 65 20 74 65 73 |on lists the tes| 00000410 74 20 74 68 61 74 20 77 69 6c 6c 20 6f 70 65 72 |t that will oper| 00000420 61 74 65 20 77 68 69 6c 73 74 20 64 72 61 77 69 |ate whilst drawi| 00000430 6e 67 3a 20 74 68 65 73 65 20 61 72 65 20 64 65 |ng: these are de| 00000440 73 63 72 69 62 65 64 20 69 6e 20 64 65 74 61 69 |scribed in detai| 00000450 6c 20 69 6e 20 74 68 65 20 61 72 74 69 63 6c 65 |l in the article| 00000460 20 6f 6e 20 70 61 67 65 20 35 37 20 6f 66 20 74 | on page 57 of t| 00000470 68 65 20 6d 61 67 61 7a 69 6e 65 2e 20 54 68 65 |he magazine. The| 00000480 20 66 69 72 73 74 20 73 65 63 74 69 6f 6e 20 63 | first section c| 00000490 6f 6e 74 61 69 6e 73 20 61 20 6c 69 73 74 20 6f |ontains a list o| 000004a0 66 20 74 6f 6c 65 72 61 6e 63 65 73 20 74 68 61 |f tolerances tha| 000004b0 74 20 61 72 65 20 75 73 65 64 20 77 69 74 68 20 |t are used with | 000004c0 74 68 65 20 74 65 73 74 73 20 61 6e 64 20 74 68 |the tests and th| 000004d0 65 73 65 20 63 61 6e 20 62 65 20 61 6c 74 65 72 |ese can be alter| 000004e0 65 64 20 74 6f 20 73 75 69 74 20 79 6f 75 72 20 |ed to suit your | 000004f0 73 74 79 6c 65 2e 20 54 68 69 73 20 69 73 20 77 |style. This is w| 00000500 68 61 74 20 74 68 65 79 20 64 6f 3a 0a 53 68 6f |hat they do:.Sho| 00000510 72 74 20 6c 69 6e 65 20 97 20 61 6e 79 20 6c 69 |rt line . any li| 00000520 6e 65 20 74 68 61 74 20 73 68 6f 72 74 65 72 20 |ne that shorter | 00000530 74 68 61 6e 20 74 68 69 73 20 6c 65 6e 67 74 68 |than this length| 00000540 20 69 73 20 64 69 73 63 61 72 64 65 64 2e 0a 4a | is discarded..J| 00000550 69 74 74 65 72 20 97 20 6d 69 6e 69 6d 75 6d 20 |itter . minimum | 00000560 64 69 73 74 61 6e 63 65 20 74 68 65 20 6d 6f 75 |distance the mou| 00000570 73 65 20 68 61 73 20 74 6f 20 6d 6f 76 65 20 62 |se has to move b| 00000580 65 66 6f 72 65 20 61 20 6e 65 77 20 64 61 74 61 |efore a new data| 00000590 20 70 6f 69 6e 74 20 69 73 20 61 64 64 65 64 2e | point is added.| 000005a0 0a 43 6f 72 6e 65 72 20 97 20 67 72 65 61 74 65 |.Corner . greate| 000005b0 73 74 20 61 6e 67 6c 65 20 61 6c 6c 6f 77 65 64 |st angle allowed| 000005c0 20 62 65 74 77 65 65 6e 20 61 6e 79 20 74 68 72 | between any thr| 000005d0 65 65 20 70 6f 69 6e 74 73 20 62 65 66 6f 72 65 |ee points before| 000005e0 20 61 20 63 6f 72 6e 65 72 20 69 73 20 64 65 74 | a corner is det| 000005f0 65 63 74 65 64 20 61 6e 64 20 6d 61 72 6b 65 64 |ected and marked| 00000600 2e 20 54 68 69 73 20 76 61 6c 75 65 20 68 61 73 |. This value has| 00000610 20 74 6f 20 62 65 20 73 75 72 70 72 69 73 69 6e | to be surprisin| 00000620 67 6c 79 20 68 69 67 68 2e 0a 43 6f 6e 6e 65 63 |gly high..Connec| 00000630 74 65 64 20 97 20 70 6f 69 6e 74 73 20 61 6e 64 |ted . points and| 00000640 20 6c 69 6e 65 73 20 77 69 74 68 69 6e 20 74 68 | lines within th| 00000650 69 73 20 64 69 73 74 61 6e 63 65 20 66 72 6f 6d |is distance from| 00000660 20 65 61 63 68 20 6f 74 68 65 72 20 61 72 65 20 | each other are | 00000670 64 65 65 6d 65 64 20 74 6f 20 62 65 20 63 6f 6e |deemed to be con| 00000680 6e 65 63 74 65 64 2e 0a 45 71 75 61 6c 20 6c 65 |nected..Equal le| 00000690 6e 67 74 68 20 97 20 6c 69 6e 65 20 6c 65 6e 67 |ngth . line leng| 000006a0 74 68 73 20 64 69 66 66 65 72 69 6e 67 20 62 79 |ths differing by| 000006b0 20 6c 65 73 73 20 74 68 61 6e 20 74 68 69 73 20 | less than this | 000006c0 76 61 6c 75 65 20 61 72 65 20 64 65 65 6d 65 64 |value are deemed| 000006d0 20 74 6f 20 62 65 20 74 68 65 20 73 61 6d 65 20 | to be the same | 000006e0 6c 65 6e 67 74 68 2e 0a 45 71 75 61 6c 20 61 6e |length..Equal an| 000006f0 67 6c 65 20 97 20 6c 69 6e 65 20 61 6e 67 6c 65 |gle . line angle| 00000700 73 20 64 69 66 66 65 72 69 6e 67 20 62 79 20 6c |s differing by l| 00000710 65 73 73 20 74 68 61 6e 20 74 68 69 73 20 76 61 |ess than this va| 00000720 6c 75 65 20 61 72 65 20 64 65 65 6d 65 64 20 74 |lue are deemed t| 00000730 6f 20 62 65 20 74 68 65 20 73 61 6d 65 20 61 6e |o be the same an| 00000740 67 6c 65 2e 0a 0a 54 68 65 20 54 68 65 72 61 70 |gle...The Therap| 00000750 79 20 70 72 6f 67 72 61 6d 20 73 69 6d 75 6c 61 |y program simula| 00000760 74 65 73 20 61 20 74 68 65 72 61 70 69 73 74 2e |tes a therapist.| 00000770 20 52 75 6e 20 69 74 20 61 6e 64 20 74 79 70 65 | Run it and type| 00000780 20 69 6e 20 77 68 61 74 65 76 65 72 20 79 6f 75 | in whatever you| 00000790 20 77 61 6e 74 20 74 6f 20 74 68 65 20 70 72 6f | want to the pro| 000007a0 6d 70 74 73 3a 20 69 74 20 63 61 6e 20 62 65 20 |mpts: it can be | 000007b0 6d 6f 73 74 20 69 6e 74 65 72 65 73 74 69 6e 67 |most interesting| 000007c0 2e 0a 0a 43 6f 70 79 72 69 67 68 74 20 a9 20 42 |...Copyright . B| 000007d0 61 72 72 79 20 57 69 63 6b 65 74 74 20 31 39 39 |arry Wickett 199| 000007e0 34 0a |4.| 000007e2