Thursday, March 12, 2009

Building Programs like CompuTalk in PYTHON

Today, I built a program in PYTHON ( which is now my favorite programming language of all time) as a fun little experiment. Inspired by the movie "War Games" I built a simple program that would allow the user to communicate with his or her computer as if it were a person. There are a small number (I don't want to sit all night typing line after line similar code) of preprogrammed word and phrases that the user can type in to get a response. For instance: "hello" would output "Greetings. How are you?", "fine" would output "Fascinating. I am neither good nor bad.", and so-on and so-fourth.

The Program is called CompuTalk (click to download), and you can download it via The BW Files.

2 comments:

Anonymous said...

One nice extension to something like this is to add user feedback for storing more responses. So when you don't find a response ask the user to input what would have been a good response to what they said, and then add it to your knowledgebase of responses. Next time someone asks you then have a response ready for them. :)

Brennon said...

That's a good idea. Regrettably none of my scripts are very user friendly. :)

I'll work on it.

blogger templates 3 columns | Make Money Online