Chatbot


There are broadly two branches to the development of Artificial Intelligence (AI). One, the more successful, seeks to utilise natural problem-solving techniques to solve specific human problems. Examples include things like Genetic Algorithms. The second, somewhat less successful branch, seeks to recreate human intelligence in a computer. This branch has had more luck at giving the impression of human intelligence rather than actually creating it (and, indeed, one may ask quite what is meant by 'intelligence'). One place where this has been somewhat successful is in the production of ChatBots -- AIs that talk to humans. Current examples include Siri, Cortana, and Alexa, who answer queries. Success here is judged by the famous Turing Test. One of the first chatbots to successfully interact with people was ELIZA, especially its 'DOCTOR' variant, which basically encouraged people to answer questions, and then bounced the answers back to them as fresh questions. For example:

DOCTOR: "How are you today?"
HUMAN: "I'm a little tired"
DOCTOR: "Why are you 'a little tired'?"
HUMAN: "Because I'm learning to code"
DOCTOR: "Why are you 'learning to code'?"

For this project, you could:

Day one: implement something that interacts with users.

Day two: give it a go building the basic DOCTOR bot.


Day One

Write a program that allows a user to enter some text, and respond to the text by just bouncing it back. To do this, use System.out.println, and the Scanner class.

Day Two

See if you can implement the DOCTOR character above. This isn't the full DOCTOR, but see if you can get something that works as above. Once you've managed that, go to the Wikipedia page on ELIZA and follow the link for a Java implementation (by Charles Hayden). Download the code and experiment with getting it to work.