Shift838 Posted June 11, 2017 Share Posted June 11, 2017 I used to have a program called ELIZA (The AI Shrink program) for the TI years ago. Does anyone have a copy of it? Quote Link to comment Share on other sites More sharing options...
matthew180 Posted June 11, 2017 Share Posted June 11, 2017 That was available for many systems, written in BASIC. It should not be that hard to find. Maybe not specifically TI BASIC, but since it only output text is should be easy to port if you can't find a TI version. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted June 11, 2017 Author Share Posted June 11, 2017 That was available for many systems, written in BASIC. It should not be that hard to find. Maybe not specifically TI BASIC, but since it only output text is should be easy to port if you can't find a TI version. Yes, I have one I think it's in Atari 800 basic. I just wanted to see if anyone already had a ported version. Quote Link to comment Share on other sites More sharing options...
Airshack Posted June 11, 2017 Share Posted June 11, 2017 http://psych.fullerton.edu/mbirnbaum/psych101/Eliza.htm Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted June 11, 2017 Share Posted June 11, 2017 I remember that program on the TI as well, but I'm not sure if I have a copy of it. I also seem to remember a version of it in UCSD Pascal. . . Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted June 11, 2017 Share Posted June 11, 2017 Taken from the Gamebase. 1 Quote Link to comment Share on other sites More sharing options...
Stuart Posted June 11, 2017 Share Posted June 11, 2017 (edited) Here's a version that runs under Cortex BASIC. Should be fairly easy to convert to another dialect. The original article/listing is now at www.atariarchives.org/bigcomputergames/showpage.php?page=20. 1 REM LISTING FROM: 2 REM WWW.ATARIARCHIVES.ORG/BIGCOMPUTERGAMES/PAGES/PAGE22.JPG 10 REM 20 REM ELIZA/DOCTOR 30 REM CREATED BY JOSEPH WEIZENBAUM 40 REM THIS VERSION BY JEFF SHRAGER 50 REM EDITED BY BOB ANDERSON 60 REM CREATIVE COMPUTING 61 REM CONVERTED TO CORTEX BASIC BY STUART CONNER 15/06/2012 70 REM 80 REM --- INITIALISATION --- 90 DIM $C[14],$I[14],$K[14],$F[14],$S[14],$R[14],$P[14],$TMP[14],$TMQ[14] 100 DIM SS[36],RR[36],NN[36] 110 N1=36: N2=12: N3=112 120 RESTOR 2530 130 FOR X=1 TO N1 140 READ SS[X],L: RR[X]=SS[X]: NN[X]=SS[X]+L-1 150 NEXT X 155 PRINT @"C": REM CLEAR SCREEN 160 PRINT "HI! I'M ELIZA. WHAT IS YOUR PROBLEM?" 170 REM 180 REM --- USER INPUT --- 190 REM 200 INPUT $I[0] 210 $TMP[0]=" "+$I[0]+" ": $I[0]=$TMP[0] 220 REM 230 FOR L=1 TO LEN[$I[0]] 239 $ZZ=$I[0;L],1 240 IF $ZZ="'" THEN $TMP[0]=$I[0],L-1: $TMQ[0]=$I[0;L+1]: $I[0]=$TMP[0]+$TMQ[0]: GOTO 239 250 IF L+4<=LEN[$I[0]] THEN $ZZ=$I[0;L],4: IF $ZZ="SHUT" THEN PRINT "SHUT UP ...":END 260 NEXT L 270 IF $I[0]=$P[0] THEN PRINT "PLEASE DON'T REPEAT YOURSELF": GOTO 170 280 REM 290 REM --- FIND KEYWORD --- 300 REM 310 RESTOR 320 SSS=0 330 FOR KK=1 TO N1 340 READ $K[0] 350 IF SSS>0 THEN GOTO 390 370 L=POS[$K[0],$I[0]]: IF L>0 THEN SSS=KK: T=L: $F[0]=$K[0] 390 NEXT KK 400 IF SSS>0 THEN KK=SSS: L=T: GOTO 430 410 KK=36: GOTO 630 420 REM 430 REM TAKE RIGHT PART OF STRING 440 REM AND CONJUGATE CORRECTLY 450 REM 460 RESTOR 1230 470 $C[0]=" "+$I[0;LEN[$F[0]]+L] 480 FOR X=1 TO N2/2 490 READ $S[0],$R[0] 500 FOR L=1 TO LEN[$C[0]] 510 IF L+LEN[$S[0]]>LEN[$C[0]] THEN GOTO 560 520 $TMP[0]=$C[0;L],LEN[$S[0]]: IF $TMP[0]<>$S[0] THEN GOTO 560 530 $TMP[0]=$C[0],L-1: $TMQ[0]=$TMP[0]+$R[0]+$C[0;LEN[$S[0]]+L]: $C[0]=$TMQ[0] 540 L=L+LEN[$S[0]] 550 GOTO 600 560 IF L+LEN[$R[0]]>LEN[$C[0]] THEN GOTO 600 570 $TMP[0]=$C[0;L],LEN[$R[0]]: IF $TMP[0]<>$R[0] THEN GOTO 600 580 $TMP[0]=$C[0],L-1: $TMQ[0]=$TMP[0]+$S[0]+$C[0;LEN[$R[0]]+L]: $C[0]=$TMQ[0] 590 L=L+LEN[$S[0]] 600 NEXT L 610 NEXT X 620 REM 630 REM --- GET REPLY --- 640 REM 650 RESTOR 1330 660 FOR X=1 TO RR[KK]: READ $F[0]: NEXT X 670 RR[KK]=RR[KK]+1: IF RR[KK]>NN[KK] THEN RR[KK]=SS[KK] 680 $TMP[0]=$F[0;LEN[$F[0]]]: IF $TMP[0]<>"*" THEN PRINT $F[0]: $P[0]=$F[0]: GOTO 170 690 $TMP[0]=$F[0],LEN[$F[0]]-1: PRINT $TMP[0];$C[0] 700 $P[0]=$F[0]: GOTO 170 1000 REM 1010 REM --- PROGRAM DATA --- 1020 REM 1030 REM --- KEYWORDS --- 1040 REM 1050 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" 1060 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " 1070 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" 1080 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" 1090 DATA "NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" 1100 DATA "COMPUTER","NOKEYFOUND" 1200 REM 1210 REM --- CONJUGATION DATA --- 1220 REM 1230 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " 1240 DATA " I'VE "," YOU'VE "," I'M "," YOU'RE " 1300 REM 1310 REM --- REPLIES --- 1320 REM 1330 DATA "DON'T YOU BELIEVE THAT I CAN*" 1340 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" 1350 DATA "YOU WANT ME TO BE ABLE TO*" 1360 DATA "PERHAPS YOU DON'T WANT TO*" 1370 DATA "DO YOU WANT TO BE ABLE TO*" 1380 DATA "WHAT MAKES YOU THINK I AM*" 1390 DATA "DOES IT PLEASE YOU TO BELIEVE THAT I AM*" 1400 DATA "PERHAPS YOU WOULD LIKE TO BE*" 1410 DATA "DO YOU SOMETIMES WISH YOU WERE*" 1420 DATA "DON'T YOU REALLY*" 1430 DATA "WHY DON'T YOU*" 1440 DATA "DO YOU WISH TO BE ABLE TO*" 1450 DATA "DOES THAT TROUBLE YOU?" 1460 DATA "TELL ME MORE ABOUT SUCH FEELINGS." 1470 DATA "DO YOU OFTEN FEEL*" 1480 DATA "DO YOU ENJOY FEELING*" 1490 DATA "DO YOU REALLY BELIEVE I DON'T*" 1500 DATA "PERHAPS IN GOOD TIME I WILL*" 1510 DATA "DO YOU WANT ME TO*" 1520 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" 1530 DATA "WHY CAN'T YOU*" 1540 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" 1550 DATA "WOULD YOU PREFER IF I WERE NOT*" 1560 DATA "PERHAPS IN YOUR FANTASIES I AM*" 1570 DATA "HOW DO YOU KNOW I CAN'T*" 1580 DATA "HAVE YOU TRIED?" 1590 DATA "PERHAPS YOU CAN NOW*" 1600 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" 1610 DATA "HOW LONG HAVE YOU BEEN*" 1620 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" 1630 DATA "DO YOU ENJOY BEING*" 1640 DATA "WE WERE DISCUSSING YOU -- NOT ME." 1650 DATA "OH, I*" 1660 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" 1670 DATA "WHAT WOULD IT MEAN IF YOU GOT*" 1680 DATA "WHY DO YOU WANT*" 1690 DATA "SUPPOSE YOU SOON GOT*" 1700 DATA "WHAT IF YOU NEVER GOT*" 1710 DATA "I SOMETIMES ALSO WANT*" 1720 DATA "WHY DO YOU ASK?" 1730 DATA "DOES THAT QUESTION INTEREST YOU?" 1740 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" 1750 DATA "WHAT DO YOU THINK?" 1760 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" 1770 DATA "WHAT IT IS YOU REALLY WANT TO KNOW?" 1780 DATA "HAVE YOU ASKED ANYONE ELSE?" 1790 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" 1800 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" 1810 DATA "NAMES DON'T INTEREST ME." 1820 DATA "I DON'T CARE ABOUT NAMES. GO ON." 1830 DATA "IS THAT THE REAL REASON?" 1840 DATA "DON'T ANY OTHER REASONS COME TO MIND?" 1850 DATA "DOES THAT REASON EXPLAIN ANYTHING ELSE?" 1860 DATA "WHAT OTHER REASON MIGHT THERE BE?" 1870 DATA "PLEASE DON'T APOLOGISE." 1880 DATA "APOLOGIES ARE NOT NECESSARY." 1890 DATA "WHAT FEELINGS DO YOU GET WHEN YOU APOLOGISE?" 1900 DATA "DON'T BE SO DEFENSIVE!" 1910 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" 1920 DATA "DO YOU DREAM OFTEN?" 1930 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" 1940 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" 1950 DATA "HOW DO YOU DO ... PLEASE STATE YOUR PROBLEM." 1960 DATA "YOU DON'T SEEM QUITE CERTAIN." 1970 DATA "WHY THE UNCERTAIN TONE?" 1980 DATA "CAN'T YOU BE MORE POSITIVE?" 1990 DATA "YOU AREN'T SURE?" 2000 DATA "DON'T YOU KNOW?" 2010 DATA "ARE YOU SAYING THAT JUST TO BE NEGATIVE?" 2020 DATA "YOU ARE BEING A BIT NEGATIVE." 2030 DATA "WHY NOT?" 2040 DATA "ARE YOU SURE?" 2050 DATA "WHY NO?" 2060 DATA "WHY ARE YOU CONCERNED ABOUT MY*" 2070 DATA "WHAT ABOUT YOUR OWN*" 2080 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" 2090 DATA "WHEN?" 2100 DATA "WHAT ARE YOU THINKING OF?" 2110 DATA "REALLY, ALWAYS?" 2120 DATA "DO YOU REALLY THINK SO?" 2130 DATA "BUT YOU ARE NOT SURE YOU*" 2140 DATA "DO YOU DOUBT YOU*" 2150 DATA "IN WHAT WAY?" 2160 DATA "WHAT RESEMBLANCE DO YOU SEE?" 2170 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" 2180 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" 2190 DATA "COULD THERE REALLY BE SOME CONNECTION?" 2200 DATA "HOW?" 2210 DATA "YOU SEEM QUITE POSITIVE." 2220 DATA "ARE YOU SURE?" 2230 DATA "I SEE." 2240 DATA "I UNDERSTAND." 2250 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" 2260 DATA "DO YOUR FRIENDS WORRY YOU?" 2270 DATA "DO YOUR FRIENDS PICK ON YOU?" 2280 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" 2290 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" 2300 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" 2310 DATA "DO COMPUTERS WORRY YOU?" 2320 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" 2330 DATA "ARE YOU FRIGHTENED BY MACHINES?" 2340 DATA "WHY DO YOU MENTION COMPUTERS?" 2350 DATA "WHAT DO YOU THINK COMPUTERS HAVE TO DO WITH YOUR PROBLEM?" 2360 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" 2370 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" 2380 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" 2390 DATA "WHAT DOES THAT SUGGEST TO YOU?" 2400 DATA "I SEE." 2410 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." 2420 DATA "COME, COME, ELUCIDATE YOUR THOUGHTS." 2430 DATA "CAN YOU ELABORATE ON THAT?" 2440 DATA "THAT IS QUITE INTERESTING." 2500 REM 2510 REM --- REPLY FINDING DATA --- 2520 REM 2530 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 2540 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 2550 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 2560 DATA 80,3,83,7,90,3,93,6,99,7,106,6 Edited June 11, 2017 by Stuart Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted June 11, 2017 Share Posted June 11, 2017 Taken from the Gamebase. eliza.zip This made me angry lol. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted June 11, 2017 Share Posted June 11, 2017 There is a somewhat more advanced version called TI Psychiatrist (on the TI Gameshelf site). Tipsych.dsk Quote Link to comment Share on other sites More sharing options...
Shift838 Posted June 11, 2017 Author Share Posted June 11, 2017 There is a somewhat more advanced version called TI Psychiatrist (on the TI Gameshelf site). I tried to download this one off of gameshell but the arc file on this disk must be corrupted or something. I cannot get it extracted. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted June 11, 2017 Author Share Posted June 11, 2017 Taken from the Gamebase. eliza.zip Bingo.. that's it.. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted June 11, 2017 Share Posted June 11, 2017 I tried to download this one off of gameshell but the arc file on this disk must be corrupted or something. I cannot get it extracted. Hmmm... I was able to extract the files with no problems at all using TIDir. Just double click on the image within TIDir and copy the files to a new blank dsk image. I have attached a disk image with the files expanded and I will replace the orginal image with this one for convenience. psyarc.dsk 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted September 5 Share Posted September 5 7 years later... I spent way to much time working on making a DSL (domain specific language) to let me to write responses for Eliza with embedded Forth code similar to the way it can be done in LISP. This implementation uses Forth definitions in place of strings so you can even add loops to the replies. (try using MY in your conversation a few times) This version looks a bit like the very old versions. No flash, just text, but there are 66 keywords and phrases and about 6K bytes of text replies. Eliza even has a "high level" understanding of TI-99. The response times average about 1.5 seconds but a very long input sentence will stretch it out. So for the archives, here is yet another version of the famous therapist that loads with E/A cartridge Option 5. Source is here for Camel99 Forth CAMEL99-ITC/DEMO/ELIZA at master · bfox9900/CAMEL99-ITC · GitHub edit: removed program files. Bugs bugs bugs. 4 Quote Link to comment Share on other sites More sharing options...
Artoj Posted September 5 Share Posted September 5 I wrote a children friendly version of Eliza for my daughter when she was 2 years old, I created a face that moved it's lip and had small expressions around the eyes and talked with the speech synth, she loved it. She learned to read and write very quickly using that program, she had to type correctly spelt words that made sense, while she also learned how to load and run from tape. All data lost now, I might rewrite it as I remember quite a fair bit of the coding, she told me many times over the years how she loved that program. Thanks for the memory, regards Arto. 2 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted September 6 Share Posted September 6 4 hours ago, Artoj said: I wrote a children friendly version of Eliza for my daughter when she was 2 years old, I created a face that moved it's lip and had small expressions around the eyes and talked with the speech synth, she loved it. She learned to read and write very quickly using that program, she had to type correctly spelt words that made sense, while she also learned how to load and run from tape. All data lost now, I might rewrite it as I remember quite a fair bit of the coding, she told me many times over the years how she loved that program. Thanks for the memory, regards Arto. That's a very sweet story. I showed this one to my grandson today. And this morning I found a ton of mistakes which you probably saw. One small problem with writing a DSL is you have to learn how to use it yourself afterwards. Are you in Nederland? 1 Quote Link to comment Share on other sites More sharing options...
Artoj Posted September 6 Share Posted September 6 10 hours ago, TheBF said: Are you in Nederland? I am a Finn living in Australia. I talked to my daughter today about the ELIZA type program, I think I gave it another name, I think it might have been TIM or something like that. He greeted you when you ran the program and asked how do you feel today, something like the HAL9000. It contained a rudimentary arithmetic, spelling and general knowledge Q&A. It was written in TI BASIC and was quite large, the Terminal Emulator was also needed. If I ever find the original tape and try and read it, I will definitely get it operational again, otherwise I will create a new one, regards Arto. 2 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted September 7 Share Posted September 7 Humble apologies. My enthusiasm out-weighs my testing capabilities. Here is a better version that properly deals with keywords that had an apostrophe in the source code. (My fancy DSL that creates keywords was not cleaning out the punctuation before recording the keyword) The good news: All I had to do was add the phrase PUNCTUATION$ STRIP to the definition. : KEY" [CHAR] " PARSE PUNCTUATION$ STRIP KEY, ; This version also adds the IF word like the original LISP version. Since my responses are actual Forth CODE, not strings, this presented a problem because IF is keyword in Forth as well. To fix the problem I had to make separate name space (VOCABULARY in Forth terms) for the ELIZA responses. Then it worked. STANDBY ... 3 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted September 7 Share Posted September 7 Updated version. Beyond the normal faults of such a simple chatbot, please let me know when you find problems and I will try and fix them. ELIZA ELIZB ELIZC 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.