I uploaded the original version to ticalc.org and they sent it back with a cover note explaining that there were a few too many naughty words. As such, this is a limited version based on the original PC version I based this on.
Psychiatrist... well, yeah. Just don't take her too seriously. She's not charging; if you tell her all your troubles and she tells you to "GET LOST" it's not my fault. Or hers. Try not to take it personally, OK?
If you want to see how strange she is, start a fresh install, say "Good Morning" then answer "No" to "Do you have any psychological problems".
My point exactly. Anyway, if this causes your calculator to melt, crash, trigger a nuclear war with Belgium or cause your cat to spontaneously combust, it's not my fault.
Eliza is a program that simulates intelligence by holding a conversation with its operator. It was first conceived by Joseph Weizenbaum at MIT in 1966 and was written in Fortran.
A brief description of its operation
follows: When the user types in a sentence, Eliza scans for "keywords" which can be words or phrases. Each keyword has one or more responses associated with it. These responses can be complete sentences or may require that a modified portion of the user's text be appended to them. The portion of text is all text to the right of the keyword. The modification is that the text is correctly conjugated (i.e., "I" becomes "YOU"). This allows the computer to handle different subjects "intelligently" without gigabytes of canned responses. |
The above text was taken from a BASIC Eliza, written by Frederick B. Maxwell back in 1989. His Eliza was the basis of this one; his is a lot simpler as at least he had access to BASIC, and I've done mine in ASM. You could easily do this in BASIC too, but the responses file is about 7K in raw ASCII - not practical or fast to search in TI-BASIC! And we all know how great TI-BASIC is... Real men program in ASM!
Well, you have quite a choice here. What type of calculator do you have?
For the Ion (or 100% compatible) shell;
For the MirageOS shell (the only advantage is the icon);
You only get the Ion version.
Once you have sent the file to your calculator, you need to open up the shell you installed it for. Highlight the "Eliza - Ben Ryves" text, and press Enter.
Eliza is very simple to use. Not that you should use women, they are real people too and deserve to be treated with the utmost respect. But you can use this program, which is a simulation of a psychiatrist.
You should have a clear screen with a border and an introductory line of text at the top. Just type away to Eliza! Press Enter once you've entered your question. You can use any of the keys on your TI from A-Z and space. I haven't catered for punctuation as these would have to be stripped out of the input anyway and that'd make the program even more cumbersome. If you make a mistake, press Del to back up and then carry on typing. If you type in a mega-huge-über-question, don't be alarmed that Eliza gets impatient and swallows your input without asking you to press Enter. You have a maximum of 150 characters (for memory reasons). Pressing Clear at any time will instantly quit. She doesn't charge.
The source is included in the Zip archive - just look in that Source folder! All you need to do to get it ready to compile is to download ti83plus.inc from http://education.ti.com (it's a 110K file - too big to stick in this Zip) and put it in the same folder. At the top of the main file "eliza.z80" is the line '#define TI83P'. Change this to set compile target:
#define TI83P ;Compiles to TI-83 Plus Ion #define TI83M ;Compiles to TI-83 Plus MirageOS #define TI83I ;Compiles to TI-83 Ion |
Fairly straightforwards, I hope!
Now, why would you want to edit the source? Well, I can guess you'd mainly want to edit the replies.inc file.
This is quite an evil task! Fortunately, I've helped (aren't I a nice guy?) with the little tool "Convert DAT File.exe".
This basically allows you to convert the eliza.dat file into replies.inc with the miminum of hassle. The eliza.dat file MUST be in the same directory as the EXE! The file can be opened up in Notepad.
. LIST OF KEYWORDS ! LIST OF RESPONSES |
It is structured like this: The higher up an entry is in the file, the sooner Eliza chooses it as a response. For example, in this file:
. I ! YOU LIKE TALKING ABOUT YOURSELF WHAT ABOUT YOU? . I FEEL ! WHY DO YOU FEEL* |
...the "I FEEL" section would never get reached, because even if the person said "I FEEL ILL" the "I" would get caught by the upper keyword block.
Hence the swearwords (I didn't put those there - they're from the original file!) are near the top, so whatever you say, if it has a swearword in it it'll get caught early.
Some blocks have got "speech marks" around them. This is because the file is comma/newline delimited, so the file:
. FISH ! HEY, I LIKE FISH! |
...actually reads as two different responses: "HEY" and "I LIKE FISH" (this is part of the way VB works when reading files). Just put "speech marks" around the line if you're going to put in a comma.
The last thing to note are the lines that end in an asterisk (*). When Eliza replies with one of these, she'll output a conjugated version of the remainder of the input string after the keyword. For example; with the "I FEEL" example, if I said "I FEEL THAT YOU ARE STUPID" would output "WHY DO YOU FEEL"; the text after the keyword is "THAT YOU ARE STUPID" - this is conjugated to "THAT I AM STUPID" - and outputted, to say "WHY DO YOU FEEL THAT I AM STUPID".
Ideas;
Make Eliza speak a foreign language. You'd have to change the conjugation table, but it's possible!
Alternatively, just give her an accent!
Sarcastic Eliza? Stupid Eliza? 1337 h4xx0r 3L1z4? AOL ELIzA!!11!~~!one!!
Add a group of keywords pertaining to a favourite subject. The first Eliza I saw had a "castles" file, and so asked you all about your castle. It had data on towers, drawbridges, suits of armour and the like. Maybe produce one that you can ask your calculator questions to?
If you do create a new Eliza, please post it to http://ticalc.org for others to enjoy; I'd love a copy too! Please remember to leave credit where credit is due, and it'd be awesome if you could keep this original readme in your release. Just put your name at the top with mine, or put "Uber Eliza 2001 by John Hacker" and "Powered by Ben Ryves' Eliza". You get the idea. Else I'll set my trained killer lemurs on you.
No; some say I need to get out more.
Still, if I wasn't up to this sort of unhealthy thing, you wouldn't have such awesome programs on your TI handheld, would you?
Well, if you had any knowledge of the finer arts you would know of the book Pygmalion by George Bernard Shaw; failing that you should know the musical "My Fair Lady" which is based on this book. Anyway; it features a flower girl called Eliza Doolittle who is taught to shrug off her thick London accent and to adopt a much fairer tone - and pretends to be much more than she really is. Same goes for this computer program; it's appearing to be something more than it is with a few clever word-swaps! No intelligence involved; all it does is respond with pre-prepared phrases, sometimes returning what you just said but switching person and posing it as a question. Just about as bright as your average gym teacher.
Bugs, comments, death threats? benryves@benryves.com is the place to go.
Say Hello to Eliza for me!