All About Mark The Chatterbot...

It is important to note that Mark is not an original idea.  The first chatterbot was created by Joseph Weizembaum in 1967.  It was called ELIZA, and it's purpose was to simulate a conversation between a psychoanalyst and a patient.  

Mark is an elaboration of ELIZA.  Whereas ELIZA phrased your input into a question for everything you wrote, Mark searches your input for keywords and bases responses on whether or not keywords are found.

My version of Mark is not all of my own original thinking and work.  I borrowed ideas from many sources.  The Simon Laven page "http://www.simonlaven.com" offered great deal of advice and examples.  Also, the chatterbot collection "http://www.angelfire.com/trek/amanda/bot.htm" supplied an almost infinite amount of examples.  Many hours were spent combing the links for research purposes.  Professor Wang's course website also listed a link to where you can find chatterbot code in prolog.  While I did make sure to visit it, I did not use it to code my program.  However, it is an excellent example on how to write a chatterbot in PROLOG.  The most important idea I used was written by Amit Mathur.  He wrote an article on how to build a chatterbot, and it proved to be an indispensible piece of information.  Much of my source is polished code that he wrote.  Almost every line is commented so you should be able to easily follow what is happening in the program.
To run Mark you need to compile the response.h, program_start.h, and mark main.cpp.  I compiled this code using Microsoft's Visual C++, but it should compile on any C compiler.  That is, no functions are exclusive to a certain microsoft library.
Modifying this chatterbot is simple.  You can add words to the dictionary file so long as you follow the format it is in.  That being:
	@NXT@ // token must be put before a keyword                                                                               	KEYWORD OR PHRASE // the keyword                                                                               	RESPONSE1	// the responses                                                                                              	RESPONSE 2
Make sure you keep track of the number of responses and be sure to update the MAX_KEYWORDS variable accordingly.  If you don't, not all the new keywords and responses will be added to the array.  Similarly, if you have more than ten responses for any keyword, make sure to update the MAX_RESPONSE_NUMBER variable.  Other constant variables are similarly updated.
Enjoy,
Justin Beerley