Advertisement

ELIZA source/demo/explanation?

Started by September 27, 2004 09:10 AM
13 comments, last by GameDev.net 20 years, 2 months ago
I remember a long long time ago mucking about with an ELIZA port on the BBC Master 128, and was quite interested in it- is there somewhere I could find a decent "tutorial" in how it worked, or at the very least some source code that makes it fairly evident how it's working? I guess one of the AI gurus here would know - I've had a look around the web but just keep finding web-based implementations and very little as far as an explanation.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

OK, never mind, I've found some old BASIC source - it's in true labelled-lines old-school BASIC, but I should be able to eventually get to grips with it...

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Advertisement
I found source code in Lisp and Prolog. You can probably see from the source code why people don't do these kinds of programs in languages like C and Java. By the way, try searching on google for "Eliza source code" along with the name of a programming language for good results.
Just for comparison, I found other implementations in Pascal and Java. It's amazing how quickly you can write programs like this with useful AI facilities like unification built into the implementation language; these two programs are a significant order of magnitude longer than most implementations I've seen in more suitable languages.
Thing is, I'm probably going to be writing a version in ASM, so a BASIC one is the best bet for me.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Quote: Original post by benryves
Thing is, I'm probably going to be writing a version in ASM, so a BASIC one is the best bet for me.


Any reason why you've got to use ASM?
Advertisement
Quote: Original post by seanw
Quote: Original post by benryves
Thing is, I'm probably going to be writing a version in ASM, so a BASIC one is the best bet for me.


Any reason why you've got to use ASM?


You doin one on your graphics calc?
Quote: Original post by BosskIn Soviet Russia, you STFU WITH THOSE LAME JOKES!
Quote: Original post by grekster
Quote: Original post by seanw
Quote: Original post by benryves
Thing is, I'm probably going to be writing a version in ASM, so a BASIC one is the best bet for me.


Any reason why you've got to use ASM?


You doin one on your graphics calc?


Maybe... I need to look into how ELIZA works... that's why I said I'd rather see an explanation of how it works rather than have to work backwards from source. I don't even know if I've got the RAM available to work with.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Quote: Original post by benryves
Maybe... I need to look into how ELIZA works... that's why I said I'd rather see an explanation of how it works rather than have to work backwards from source. I don't even know if I've got the RAM available to work with.


Try reading the Lisp source. Even if you don't know Lisp, it should be easy to spot what's happening. Eliza isn't all that clever; it just looks for specific sentence patterns (e.g. "I like to eat food") using templates (e.g. "I like X") and then subtitues the match into a reply (e.g. "Why is it that you like X?", "I like X too").
Quote: Original post by benryves
Maybe... I need to look into how ELIZA works... that's why I said I'd rather see an explanation of how it works rather than have to work backwards from source.

I found this which has a basic explanation. I guess you're looking for more detail though, right?

This topic is closed to new replies.

Advertisement