Makefile - makefile for eliza (edit as needed) README - this file eli.c - eliza driver eli.script - eliza's script (edit as needed) logs - directory of eliza's conversations servio.c - code to connect to the mud server starteli - shell script to launch eliza (edit as needed) This is the Eliza robot. The file format is completely undocumented - you'll have to read the source. There are some remarks in the source, but basically it is as follows: overall layout: the first part of the file contains a series of templates. The list is ended with a '+' beginning a line, and is then followed by a series of keyword/weight pairs, also terminated by a '+'. templates: a template is a string which contains unpunctuated words and possibly a '%'. The '%' will wild-card to any set of words in the input. Only one '%' can be used per template!. After each template are a series of lines marked with '*', which are possible responses that get output to MUD. If there is a '%' in them, the matching text from the previous '%' gets pasted in. If there is a '&' in them, the name of the player who spoke gets pasted in. keywords: a keyword is much like a template except no substitutions other than '&' are performed. The numerical value is a 'weight' value, indicating whether that keyword is 'worth' any other keywords, and if so it is chosen in the case of multiple matches. the program: The source for the eliza routines is *NOT* my code. I write better than that. lots. In fact, I had to clean them up some to make them work at all, which they still barely do. (like, someone was doing fseeks on ints, OK ?). The access scheme is absurd, and could be moved to just keeping things in memory. But that's not my concern. Another nice thing to add would be the ability to link multiple commands on a single response line using ';' or something. Anyhow, there must be 2 environment variables set, ELIZAHOST and ELIZAPORT - see 'starteli' for an example. The connection is performed in servio.c - look at the bottom where it compares its input against the beginning of the 'Welcome to' message. This is what it uses to figure out if it has gotten in or not. This may be specific to tinyHELL. *Compile the program, type 'make'. *create the player on the MUD of your choice, describe it, etc. *set the password in the servio.c routine where it send the connect message. test it by typing 'eli' and work it from there. If you make any clever improvements, let me know! This just in! Now everything is read from env. variables. see setelivars and starteli for details. mjr. mjr@mimsy.umd.edu