Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A chat bot in Common Lisp

1,112 views
Skip to first unread message

Jaseem

unread,
Oct 6, 2009, 9:12:31 AM10/6/09
to
Hi friends,
Could any one point me where to begin to build a chat bot using Common
Lisp.
Some thing similar to the one here:
http://www.a-i.com/alan1/
Is it using a database?
If so can it be made in other languages?
Or can I use Lisp to make better.
What are the uses of the Chat bots? (Any professional use, may be in
game... other than that?)
Thank You

Robert Swindells

unread,
Oct 6, 2009, 9:40:06 AM10/6/09
to

Jaseem wrote:
>Could any one point me where to begin to build a chat bot using Common
>Lisp.
>Some thing similar to the one here:
>http://www.a-i.com/alan1/
>Is it using a database?
>If so can it be made in other languages?
>Or can I use Lisp to make better.

You could start reading here: <http://en.wikipedia.org/wiki/ELIZA>.

The only lisp one directly mentioned on that page is doctor.el but
there are others in the CMU AI Repository under:

<http://www-2.cs.cmu.edu/afs/cs/project/ai-repository/ai/areas/classics/0.html>

>What are the uses of the Chat bots? (Any professional use, may be in
>game... other than that?)

You can use them to reply to USENET posts, though I did wonder whether
the recent examples were actually one bot talking to another.

Robert Swindells

Pascal J. Bourguignon

unread,
Oct 6, 2009, 10:26:45 AM10/6/09
to
Robert Swindells <r...@fdy2.demon.co.uk> writes:

> Jaseem wrote:
>>Could any one point me where to begin to build a chat bot using Common
>>Lisp.
>>Some thing similar to the one here:
>>http://www.a-i.com/alan1/
>>Is it using a database?
>>If so can it be made in other languages?
>>Or can I use Lisp to make better.
>
> You could start reading here: <http://en.wikipedia.org/wiki/ELIZA>.
>
> The only lisp one directly mentioned on that page is doctor.el but
> there are others in the CMU AI Repository under:
>
> <http://www-2.cs.cmu.edu/afs/cs/project/ai-repository/ai/areas/classics/0.html>

Well, not really. I mean, ELIZA is probably the opposite of what we
want, and was designed as such, AFAIK. ELIZA demonstrates that you
don't need any understanding to make a "chatter" bot.

If you want to make some meaningful chat bot (in this dimension, even
minion qualifies better than ELIZA), you would use different
techniques. Granted, you can make use of ELIZA pattern matching and
substitution for the meaningless chit-chat (minion falls back to
ELIZA's algorithm when it doesn't understand a question).


>>What are the uses of the Chat bots? (Any professional use, may be in
>>game... other than that?)
>
> You can use them to reply to USENET posts, though I did wonder whether
> the recent examples were actually one bot talking to another.


Yes, answering to usenet posts or irc messages is a good applications.

Answering to commercial email (when you have 100,000,000 customers,
you may not want to hire 1% of them to answer to questions from the
remaining 99%), or answering to commercial questions on the web
(webbots). It's even more fun on the web since webbots usually
include also an animated avatar representation.


But in general, the uses of any software seems to be to communicate
(either with other humans, with dogs [1], or with computer systems).

You can design a chat bot as a user interface to any computer system.
For example, it could be used as a shell. For example, instead of typing

cd
cd pictures
ls
cd holidays
ls
cd 200907
cd 200908
xviwer *.jpg
xviewer *.jpg

at your bash, you could have this chat with your computer:

<human> Hello Compy!
<computer> Hello Master!
<human> Could you show me the pictures of my last holidays?
<computer> Sure.
computer launches xviewer /home/master/pictures/holidays/200908/*.jpg
<human> Thanks.
<computer> You're welcome.
<human> What's the size of all my picture?
<computer> About 80GB
<human> Are they all backed up?
<computer> Backup? What's a backup?
<human> Here I hooked a TB hd, format it and backup all my pictures on it.
<computer> Ok.
computer launches fdisk /dev/sda1
computer launches mke2fs /dev/sda1
computer Pfff!
computer launches mount /dev/sda1 /mnt/backup-for-master
computer launches rsync /home/master/pictures /mnt/backup-for-master/pictures
computer Pfff! Pfff!
computer launches umount /mnt/backup-for-master
<computer> Here, it is done. Anything else?
<human> No, thank you.

[1] http://www.time.com/time/2002/inventions/tra_bow.html
--
__Pascal Bourguignon__

John Thingstad

unread,
Oct 6, 2009, 11:18:02 AM10/6/09
to Robert Swindells
Pᅵ Tue, 06 Oct 2009 15:40:06 +0200, skrev Robert Swindells
<r...@fdy2.demon.co.uk>:

You might try starting with the book 'Natural language processing in
Python'.
http://oreilly.com/catalog/9780596516499
Not quite Common Lisp, but under Linux you benefit from a huge Natural
Language Toolkit (nltk), which will seriously speed up learning.
Book and tools available for free on-line.

--------------
John Thingstad

Jaseem

unread,
Oct 6, 2009, 11:43:26 AM10/6/09
to

> --
> __Pascal Bourguignon__

That's inspiring. Really nice (like Knight Rider...)

Jaseem

unread,
Oct 6, 2009, 11:46:45 AM10/6/09
to

> You might try starting with the book 'Natural language processing in  
> Python'.http://oreilly.com/catalog/9780596516499

> --------------
> John Thingstad

Python is only secondary preference.
Lisp is all that matters...
Any ways the book might help in grasping the theory (i suppose)...

Hope I'll get support from this great Lisp community.. if I'm stuck
some where.

Richard Fateman

unread,
Oct 6, 2009, 12:35:43 PM10/6/09
to
See, for a unix consultant chat bot in lisp,

https://www.aaai.org/ojs/index.php/aimagazine/article/viewFile/423/359


or others that you will probably be able to find via google.

John Thingstad

unread,
Oct 6, 2009, 1:02:16 PM10/6/09
to Jaseem
Pᅵ Tue, 06 Oct 2009 17:46:45 +0200, skrev Jaseem <jas...@gmail.com>:

> Python is only secondary preference.
> Lisp is all that matters...
> Any ways the book might help in grasping the theory (i suppose)...
>
> Hope I'll get support from this great Lisp community.. if I'm stuck
> some where.

As you will, but know that Natural Language Processing (NLP) is more about
linguistics than a particular programming language.
Also you would need some statistics (like a mathematical statistics ground
course) and then some practical applications book like 'Learning from
data' by Cherkawssky and Muller.
If you want to learn Lisp I would try something else first. Say,
'Paradigms in AI programming' (PAIP) by Peter Norvig.

--------------
John Thingstad

Jaseem

unread,
Oct 6, 2009, 1:39:23 PM10/6/09
to
Okay friends.
I started collecting the required books and materials.
Didn't know that I needed to learn Statistics.
Nice that you pointed it out.


John Thingstad

unread,
Oct 6, 2009, 2:21:37 PM10/6/09
to Jaseem

To see where the wager is at look at http://alice.pandorabots.com/
A previous Turing award winner.

--------------
John Thingstad

vanekl

unread,
Oct 6, 2009, 4:49:40 PM10/6/09
to
On Oct 6, 1:39 pm, Jaseem <jas...@gmail.com> wrote:
> Okay friends.
> I started collecting the required books and materials.
> Didn't know that I needed to learn Statistics.

You don't.

http://www.amazon.com/Programming-Artificial-Intelligence-International-Computer/dp/0321417461/ref=sr_1_1?ie=UTF8&s=books&qid=1254858094
You could use a grammar as illustrated in this book. Yes, it's Prolog,
but Prolog is a subset of CL.

Vassil Nikolov

unread,
Oct 6, 2009, 10:50:22 PM10/6/09
to

On Tue, 6 Oct 2009 10:39:23 -0700 (PDT), Jaseem <jas...@gmail.com> said:
> ...

> Didn't know that I needed to learn Statistics.

In general, 82.7% of all people need that.

---Vassil.


--
"Even when the muse is posting on Usenet, Alexander Sergeevich?"

Rob Warnock

unread,
Oct 6, 2009, 11:53:36 PM10/6/09
to
John Thingstad <jpt...@online.no> wrote:
+---------------

| To see where the wager is at look at http://alice.pandorabots.com/
| A previous Turing award winner.
+---------------

I just had a very interesting chat with that bot, ending with:

Human: Methinks ALICE is a bit much like ELIZA.
ALICE: When is Methinks ALICE not a bit much like ELIZA?
Human: ALICE is not like ELIZA when ALICE doesn't use obviously
ELIZA-like rules.
ALICE: What makes you think I am not like ELIZA when ALICE does
not use obviously ELIZA like rules?
Human: Perhaps you *are* like ELIZA, but that's what I'm trying
to discover.
ALICE: You seem uncertain. Interesting comparison, and probably true.

At this point, I typed two phrases into the dialog box at once:

You say: I see. So how does ALICE differ from ELIZA?

which it treated as two separate interactions:

Human: I see.
ALICE: I am glad you understand it.
Human: So how does ALICE differ from ELIZA?
ALICE: Gosh! ELIZA could only recognize a few hundred patterns.
ALICE can recognize tens of thousands.
Human: Just how many patterns *do* you currently match?
ALICE: Around 100.
Human: Oh, o.k. Good day.
ALICE: Yikes! Hi there! Wow!

At which point I got bored, but it's certainly a step up from ELIZA!


-Rob

-----
Rob Warnock <rp...@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607

John Thingstad

unread,
Oct 7, 2009, 12:46:30 AM10/7/09
to vanekl

What world are you on? Prolog and Lisp are both Turing complete. It is
true that Norvig implemented a subset of Prolog (badly) in CL.
But there is no reason you can't implement CL in Prolog.

--------------
John Thingstad

GP lisper

unread,
Oct 7, 2009, 1:08:46 AM10/7/09
to
On Tue, 06 Oct 2009 20:21:37 +0200, <jpt...@online.no> wrote:

> P� Tue, 06 Oct 2009 19:39:23 +0200, skrev Jaseem <jas...@gmail.com>:
>
>> I started collecting the required books and materials.
>> Didn't know that I needed to learn Statistics.
>> Nice that you pointed it out.
>
> To see where the wager is at look at http://alice.pandorabots.com/
> A previous Turing award winner.
> --------------
> John Thingstad


Human: why are we here?
ALICE: It is all part of God's plan for us.
Human: no, I mean now, not some grand fantasy
ALICE: Are you serious? Oh I get it. Thanks for explaining that. Why now? Oh I get it.
Human: lame
ALICE: What do you do in your spare time?
Human: what would you do with a brain if you had one?
ALICE: You and your a brain if me had one.

I've seen the #perl chatbot last longer.


--
Humans are allergic to change. "We've always done it that way" is not
a good reason to continue to do so. That's why I have a clock on my
office wall that runs backwards. It forces visitors to think.
They hate me for that. - Admiral Hopper.

Frank Buss

unread,
Oct 7, 2009, 1:46:47 AM10/7/09
to
John Thingstad wrote:

> To see where the wager is at look at http://alice.pandorabots.com/
> A previous Turing award winner.

At least it is some kind of funny :-)

Human: how are you?
ALICE: I am fine, thank you.
Human: can you repeat your last answer?
ALICE:" my last answer ".
Human: what is one and two?
ALICE: ONE plus ONE = TWO.
Human: and one plus two?
ALICE: Use a calculator!
Human: I'm tired
ALICE: Better get some rest.

--
Frank Buss, f...@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de

Pascal J. Bourguignon

unread,
Oct 7, 2009, 3:43:39 AM10/7/09
to
"John Thingstad" <jpt...@online.no> writes:

Yes, you can implement CL in a subset of CL. QED.

--
__Pascal Bourguignon__

John Thingstad

unread,
Oct 7, 2009, 4:12:28 AM10/7/09
to Pascal J. Bourguignon
Pᅵ Wed, 07 Oct 2009 09:43:39 +0200, skrev Pascal J. Bourguignon
<p...@informatimago.com>:

> "John Thingstad" <jpt...@online.no> writes:

True, and in a sense you do..
All them macro's...

--------------
John Thingstad

kalayci....@gmail.com

unread,
Feb 1, 2017, 3:33:12 PM2/1/17
to
6 Ekim 2009 Salı 16:12:31 UTC+3 tarihinde kadaj yazdı:

menti...@gmail.com

unread,
Feb 4, 2017, 9:31:42 AM2/4/17
to
On Wednesday, February 1, 2017 at 12:33:12 PM UTC-8, kalayci....@gmail.com wrote:
[...]
The link below shows Mentifex artificial intelligence functioning as a chatbot:

https://www.youtube.com/watch?v=QuBEgINpGdo



0 new messages