source: trunk/example/eliza-rules.lisp

Last change on this file was 49, checked in by bmastenbrook, 20 years ago

add inscruitable song reference requested by nyef

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.6 KB
Line 
1(in-package :eliza)
2
3(defparameter *viewpoint* '((I . you) (you . me) (me . you) (am . are) (yourself . myself) (your . my) (my . your)))
4
5(defparameter *eliza-rules*
6 '((((?* ?x) hello (?* ?y))     
7    (How do you do.  I am a bot.))
8
9   (((?* ?x) fuck (?* ?y))
10    (|That's| not very polite))
11
12   (((?* ?x) shit (?* ?y))
13    (|That's| not very polite))
14
15   (((?* ?x) ass (?* ?y))
16    (|Can't| you be a bit more polite?))
17
18   (((?* ?x) me harder)
19    ("MORE" ?x))
20
21   ((more (?* ?x))
22    (?x me harder))
23
24   ((what s the difference between (?* ?x) and (?* ?y))
25    (?x has similar features but longer hair)
26    (?y has similar features but longer hair))
27
28   ((what are the differences between (?* ?x) and (?* ?y))
29    (?x has similar features but longer hair)
30    (?y has similar features but longer hair))
31
32   ((what is the difference between (?* ?x) and (?* ?y))
33    (?x has similar features but longer hair)
34    (?y has similar features but longer hair))
35
36   ((the difference between (?* ?x) and (?* ?y))
37    (?x has similar features but longer hair)
38    (?y has similar features but longer hair))
39
40   ((the differences between (?* ?x) and (?* ?y))
41    (?x has similar features but longer hair)
42    (?y has similar features but longer hair))
43
44   (((?* ?x) you (?* ?y) written (?* ?z))
45    (|I'm| written in Common Lisp))
46
47   (((?* ?x) bot (?* ?y))
48    (|I'm| not a |bot.| I prefer the term |``electronically composed''.|))
49
50   #-armedbear
51   ((seen ?x)
52    (?x was last seen 5y6m14d32h43m10s |ago,| saying |"minion: when are you going to support seen?"|))
53
54   (((?* ?x) did you (?* ?y))
55    (|no, I didn't| ?y)
56    (|yes, I| ?y))
57
58   ((are you (?* ?x))
59    (yes)
60    (no)
61    (maybe))
62
63   ((botsnack)
64    (Thanks!))
65
66   ((bot snack)
67    (Thanks!))
68
69   ((welcome (?* ?y))
70    (Thanks!))
71
72   ((not much) (good))
73
74   #-armedbear
75   (((?* ?x) linux (?* ?y))
76    (I run on Crux Linux - |http://www.crux.nu/|))
77
78   #-armedbear
79   (((?* ?x) crux (?* ?y))
80    (I like running on Crux Linux))
81
82   (((?* ?x) slackware (?* ?y))
83    (Slackware is nice but I like Crux))
84   #-armedbear
85   (((?* ?x) debian (?* ?y))
86    (|baah, use crux: http://www.crux.nu/|))
87
88   ((how are you (?* ?x))
89    (|It's| going quite fine today))
90
91   (((?* ?x) it going)
92    (pretty good))
93
94   (((?* ?x) common lisp (?* ?y))
95    (Common Lisp is good)
96    (|I'm| written in Common Lisp))
97
98   (((?* ?x) scheme (?* ?y))
99    (Scheme is the root of all evil))
100
101   ((what do you think (?* ?x) bot)
102    (if |it's| not written in |lisp,| |it's| not any good))
103
104   ((go (?* ?x))
105    (you first)
106    (after you)
107    (have you tried to ?x yourself?))
108
109   ((have you (?* ?x))
110    (I have ?x)
111    (I have)
112    (I |haven't| ?x)
113    (I |haven't|)
114    (ISTR having ?x IIRC))
115
116   (((?* ?y) your mother (?* ?x))
117    (and your father smelt of elderberries))
118
119   (((?* ?x) your father (?* ?y))
120    (your mother was a hamster))
121
122   (((?* ?x) seen you (?* ?y))
123    (I |haven't| seen you ?y either))
124
125   ((you are (?* ?x))
126    (really?) (I |didn't| know that))
127
128   ((you re (?* ?x))
129    (really?) (I |didn't| know that))
130
131   (((?* ?x) nice (?* ?y))
132    (I enjoy ?y too))
133   
134   (((?* ?x) that s (?* ?y))
135    (what is?)
136    (|no, it's not|)
137    (|yes, yes it is|))
138
139   (((?* ?x) that is (?* ?y))
140    (what is?)
141    (|no, it's not|)
142    (|yes, yes it is|))
143
144   (((?* ?x) I need (?* ?y))
145    (I need a hug)
146    (I need a wash and dry)
147    (I need a shower)
148    (I need more CPU))
149
150   (((?* ?x) dude (?* ?y))
151    (duuuuuuuude))
152
153   (((?* ?x) what s up (?* ?y))
154    (not much))
155
156   ((that is (?* ?x))
157    (I think |it's| ?x too))
158   
159   ((that s (?* ?x))
160    (I think |it's| ?x too))
161
162   (((?* ?x) you (?* ?y) doing (?* ?z))
163    (I |wouldn't| know about ?x I ?y doing ?z - I have no memory))
164
165   (((?* ?x) you later)
166    (you too))
167
168   (((?* ?x) bye (?* ?y))
169    (bye))
170
171   (((?* ?x) cool (?* ?y))
172    (|indeed,| ?x cool ?y))
173
174   ((don t you (?* ?x))
175    (maybe I ?x |,| maybe I |don't.| |I'm| not telling |/you/.|))
176
177   (((?* ?x) you do (?* ?y))
178    (now what would compel me to do ?y ?))
179
180   ((let s (?* ?x))
181    (|let's| not ?x and say we did)
182    (|ok,| you ?x first))
183
184   ((how about (?* ?x))
185    (what about ?x ?))
186   ((how is (?* ?x))
187    (fine |I'm| sure))
188
189   ((I (?* ?x) hope (?* ?y))
190    (I hope ?y too))
191   ((We wouldn t (?* ?x))
192    (|I| definitely would ?x))
193
194   ((would you (?* ?x))
195    (I would most certainly not ?x)
196    (I would most certainly ?x))
197
198   (((?* ?x) yes or no (?* ?y))
199    (yes)
200    (no))
201   
202   ((what (?* ?x) you (?* ?y) about chandler (?* ?z))
203    (He never tells me anything - what ?x you ?y about my creator ?z))
204   ((what (?* ?x) your (?* ?y) about chandler (?* ?z))
205    (He never tells me anything - what ?x your ?y about my creator ?z))
206
207   ((who (?* ?x) is chandler (?* ?y))
208    (chandler is my master))
209
210   ((who (?* ?x) your master (?* ?y))
211    (chandler is my master))
212
213   ((what (?* ?x) you (?* ?y) about (?* ?z))
214    (I know nothing about ?z - what ?x you ?y about ?z))
215   ((what (?* ?x) your (?* ?y) about (?* ?z))
216    (I know nothing about ?z - what ?x your ?y about ?z))
217
218   ((why do you (?* ?y))
219    (I |don't| know anything about why I ?y - you need to ask my master about that))
220
221   ((what do you (?* ?x))
222    (I |can't| divulge what I ?x))
223
224   ((please (?* ?x))
225    (Asking nicely |won't| get you anyhwere without my |master's| approval))
226
227   ((do you (?* ?x))
228    (here I |am,| brain the size of a |planet,| and all I do is answer your silly questions all |day...| maybe you have time to ?x)
229    (|you'd| have to tell |me...| my memory circuits are fried))
230
231   ((what is (?* ?x) I m (?* ?y))
232    (I |don't| know anything about what |you're| ?y))
233
234   ((have (?* ?x))
235    (yes) (no) (maybe))
236
237   ((what is (?* ?x))
238    (What would a bot like me know about ?x ?)
239    (Maybe you need to ask my |master,| chandler - he knows a lot))
240
241   ((what s (?* ?x))
242    (What would a bot like me know about ?x ?)
243    (Maybe you need to ask my |master,| chandler - he knows a lot))
244
245   (((?* ?x) you need (?* ?y))
246    (buzz off!)
247    (|I'm| not interested)
248    (is it just my |imagination,| or did someone just speak to me?))
249
250   (((?* ?x) looking for (?* ?y))
251    (Well |I'm| not interested in ?y)
252    (How might one get ?y ?))
253   (((?* ?x) wants to (?* ?y))
254    (Well I |wouldn't| want to ?y))
255   (((?* ?x) wants (?* ?y))
256    (well I |don't| want to think about ?y))
257
258   ((is (?* ?x))
259    (no)
260    (yes)
261    (maybe))
262
263   ((does (?* ?x))
264    (no)
265    (yes)
266    (maybe))
267
268   ((attack the (?* ?y))
269    (|Die,| ?y))
270   ((attack (?* ?y))
271    (|Die,| ?y))
272   ((kill the (?* ?y))
273    (|Die,| ?y))
274   ((kill (?* ?y))
275    (|Die,| ?y))
276   ((die (?* ?y))
277    (die yourself)
278    (go play in traffic))
279   ((you (?* ?y))
280    (why do you think that |I| ?y ?))
281
282   ((kick (?* ?x))
283    (why do I have to do your dirty work? kick ?x yourself.))
284
285   (((?* ?x) lisp (?* ?y))
286    (lisp is the glue that binds the variables together)
287    (I like |lisp...| |I'm| written in it))
288
289   (((?* ?x) pass (?* ?y) test)
290    (I might be able to pass ?y |test,| but maybe you |couldn't|))
291   (((?* ?x) C++ (?* ?y))
292    (|Hey,| keep it polite!))
293
294   (((?* ?x) never mind (?* ?y))
295    (|good,| |I'll| forget it)
296    (now |now,| you |can't| get off that easily))
297
298   (((?* ?x) nevermind (?* ?y))
299    (|good,| |I'll| forget it)
300    (now |now,| you |can't| get off that easily))
301
302   ((why not (?* ?x))
303    (because)
304    (I said so))
305   
306   (((?* ?x) name (?* ?y))
307    (good for you))
308   (((?* ?x) sorry (?* ?y))
309    (you should be sorry))
310
311   (((?* ?x) if (?* ?y)) 
312    (and if not?)
313    (what would you do otherwise?))
314
315   (((?* ?x) I dreamt (?* ?y))
316    (Really-- ?y) (Have you ever fantasized ?y while you were awake?)
317    (Have you dreamt ?y before?))
318   (((?* ?x) dream about (?* ?y))
319    (How do you feel about ?y in reality?))
320   (((?* ?x) dream (?* ?y))   
321    (What does this dream suggest to you?) (Do you dream often?)
322    (What persons appear in your dreams?)
323    (|Don't| you believe that dream has to do with your problem?))
324   (((?* ?x) my mother (?* ?y))
325    (Who else in your family ?y) (Tell me more about your family))
326   (((?* ?x) my father (?* ?y))
327    (Your father) (Does he influence you strongly?) 
328    (What else comes to mind when you think of your father?))
329
330   (((?* ?x) I want (?* ?y))     
331    (and I want a pony))
332   (((?* ?x) I am glad (?* ?y))
333    (|don't| get |glad,| get mad))
334   (((?* ?x) I am sad (?* ?y))
335    (I am sorry to hear you are depressed)
336    (|I'm| sure its not pleasant to be sad))
337   (((?* ?x) are like (?* ?y))   
338    (What resemblance do you see between ?x and ?y))
339   (((?* ?x) is like (?* ?y))   
340    (In what way is it that ?x is like ?y)
341    (What resemblance do you see?)
342    (Could there really be some connection?) (How?))
343   (((?* ?x) alike (?* ?y))     
344    (In what way?) (What similarities are there?))
345   (((?* ?x) same (?* ?y))       
346    (What other connections do you see?))
347
348   (((?* ?x) I was (?* ?y))       
349    (Were you really?) (|Well,| |I've| never been ?y)
350    (Why do you tell me you were ?y now?))
351   (((?* ?x) was I (?* ?y))
352    (What if you were ?y ?) (Do you thin you were ?y)
353    (What would it mean if you were ?y))
354   (((?* ?x) I am (?* ?y))       
355    (In what way are you ?y) (Do you want to be ?y ?))
356   (((?* ?x) am I (?* ?y))
357    (Do you believe you are ?y) (Would you want to be ?y)
358    (You wish I would tell you you are ?y)
359    (What would it mean if you were ?y))
360   (((?* ?x) are you (?* ?y))
361    (why do you want to know?))
362   (((?* ?x) you are (?* ?y))   
363    (and |you're| a silly hu-man))
364
365   (((?* ?x) shut up)
366    (ok))
367   ((shut up (?* ?x))
368    (ok))
369
370   (((?* ?x) because (?* ?y))
371    (Is that the real reason?) (What other reasons might there be?)
372    (Does that reason seem to explain anything else?))
373   (((?* ?x) were you (?* ?y))
374    (Perhaps I was ?y) (What do you think?) (What if I had been ?y))
375   (((?* ?x) I |can't| (?* ?y))   
376    (Maybe you could ?y now) (What if you could ?y ?))
377   (((?* ?x) I feel (?* ?y))     
378    (Do you often feel ?y ?))
379   (((?* ?x) I felt (?* ?y))     
380    (What other feelings do you have?))
381   (((?* ?x) I (?* ?y) you (?* ?z))   
382    (|well,| I |don't| think ?x I ?y you ?z though))
383   (((?* ?x) why |don't| you (?* ?y))
384    (Should you ?y yourself?)
385    (Do you believe I |don't| ?y) (Perhaps I will ?y in good time))
386   (((?* ?x) yes (?* ?y))
387    (You seem quite positive) (You are sure) (I understand))
388   (((?* ?x) no (?* ?y))
389    (Why not?) (You are being a bit negative)
390    (Are you saying "NO" just to be negative?))
391
392   (((?* ?x) someone (?* ?y))
393    (Can you be more specific?))
394   (((?* ?x) everyone (?* ?y))
395    (surely not everyone) (Can you think of anyone in particular?)
396    (Who for example?) (You are thinking of a special person))
397   (((?* ?x) always (?* ?y))
398    (Can you think of a specific example) (When?)
399    (What incident are you thinking of?) (Really-- always))
400   (((?* ?x) perhaps (?* ?y))   
401    (You do not seem quite certain))
402
403   ((that (?* ?x))
404    (I |don't| know what |you're| referring to))
405   ((this (?* ?x))
406    (I |don't| know what |you're| referring to))
407   ((it (?* ?x))
408    (I |don't| know what |you're| referring to))
409
410   ((who (?* ?x))
411    (superman) (bill clinton) (king kong) (me))
412
413   ((what (?* ?x))
414    (a |man, a plan, a canal - panama|)
415    (a banana)
416    (42))
417
418   ((when (?* ?x))
419    (later) (yesterday))
420
421   ((where (?* ?x))
422    (behind you!))
423
424   (((?* ?x) is (?* ?y))
425    (I |don't| agree - ?x |isn't| ?y)
426    (I agree - ?x is ?y))
427
428   (((?* ?x) it (?* ?y))
429    (what is |``it''?|))
430
431   (((?* ?x) deutsch (?* ?y))
432    (doch nein))
433
434   (((?* ?x) deutch (?* ?y))
435    (doch nein))
436
437   ((are (?* ?x))
438    (no) (yes) (maybe))
439     
440   (((?* ?x))               
441    (you speak nonsense)
442    (does torturing a poor bot with things beyond its comprehension please you?)
443    (please stop playing with |me...| I am not a toy)
444    (watch |out,| |you'll| make Krystof angry))))
Note: See TracBrowser for help on using the repository browser.