I created this tutorial to explain how to make your very own custom JavaBot based on my code base. When designing the JavaBot, I took extra care to ensure that extending the code base would be as easy as possible.
Creating your own JavaBot is a simple matter of implementing the Mutater interface. This involves writing a single method that follows the following form:
public String mutate(String input)
{
//do string manipulation here
}
The mutate method is the core of the bot. It is what converts the input that the user sends into the output that the user receives. You can make the mutate method as complex as you wish, using as many classes as necessary to complete your transformation. The mutate method is thread-safe and statefull. You can record any information you want in your classes about the state of the current conversation because a unique Mutater object is created for each conversation. This feature allows your code any degree of conversational memory without having to worry about conversations stomping on each other.
The final step to creating your very own JavaBot is to modify the User class to use your mutater rather than the default one. In the User class, find the line near the top that looks like
Mutater M = new ElizaMutater();
and change it to like so:
Mutater M = new YourMutaterHere();
Once you have created your own mutater class and added it to the User class, start up your JavaBot and enjoy the show.