The boring story and AI chatbot development in mIRC
The first chatbot program I ever created is using mIRC scripting. Back in 2004 - 2007, I used mIRC program to connect to IRC network and started chatting with other people. However, other than just for chatting, mIRC has a powerful scripting language which we called it ‘remote’. From there, I had been exploring and writing my own mIRC script. There are many things we can do with the scripting. People started writing the script to protect the chat room (IRC channel) from user spamming (we called it ‘channel flooding’), creating music player, hosting a quiz bot in the IRC channel and many more.
But for user like me, I played ‘revenge’ - a scripting battle to test who writes the best, powerful script - by kicking each other from the IRC channel. After some time, things get boring and I started bulding a chatbot. I had a dream to make my IRC chatbot intelligence enough, but due to lack of scripting skills, I was not able to create proper AI chatbot. What I can do was I created my chatbot using direct input-output response method by matching certain keywords in the input. Almost the same concept used to create the quiz bot. At the end, it was good enough for me as my chatbot can do “simple conversation” with the users in the IRC channel. Good enough to keep the channel from silence. To be advanced, my chatbot also can play ‘revenge’ and retrieve certain commands from me to execute certain tasks.
Here are my legacy mIRC scripts I built and successfuly backed up. No chatbot feature inside, just to share for the sake of the legacy ‘sweet’ memories I had:
Developing AI chatbot using .NET Framework and SQLite database
After few years passed, this “AI chatbot” thing came back into my mind. As this time, I tried to develop them using .NET C# and SQLite as its database. I used SQLite to save each possible input and output responses, so whenever the application received input that is matched, the application will immediately respond with possible outputs. Quite basic, no framework involved and not really “AI”. Below are the screenshots how the application is looked like:
Looking for framework..
After I had done some researches on Internet, I found one so-called the “first framework” that I can start with. It was called Artificial Intelligence Markup Language (AIML), a standard XML format markup language for defining the responses from the chatbot. AIML was developed by Richard S. Wallace and a worldwide free software community between 1995 and 2002. AIML formed the basis for what was initially a highly extended Eliza called “A.L.I.C.E.” (Artificial Linguistic Internet Computer Entity) which won the annual Loebner Prize Competition in Artificial Intelligence three times and was also the Chatterbox Challenge Champion in 2004.
So, I used AIMLbot.dll library for my chatbot application while getting myself to learn more about the markup language structures used in AIML as published in this paper. AIML provided much better way of defining the knowledge database of my chatbot and made it looked more natural to call as an “artificial intelligence” chatbot. Below are the screenshots of my chatbot that used the AIML library.
Found better library… called SIML
After some time, I found another chatbot markup language library known as Synthetic Intelligence Markup Language (SIML), which was more powerful than AIML. SIML provided much better features compared to AIML. So, I changed the current markup language of my chatbot from AIML to use SIML as SIML already provided their own chatbot studio program called Syn Chatbot Studio.
As for the credits, I created “W4Y1” based on elizabot.js by Norbert Landsteiner for the interpretation engine for AI markup language and processing, jQuery Terminal Emulator plugin by Jakub Jankiewicz for the program interface (GUI), and particles.js by Vincent Garreau for the particles effect in the background.
Demo URL to the app: http://heiswayi.github.io/w4y1
N.B. Please note that “W4Y1” is just an experimental application, so not much interesting features in the live demo. However, when I have the time, these are the ideas I’m going to implement in the future:
- Integrate with math.js for mathematical computations.
- Implement AJAX request for accessing PHP files, so more features can be performed by PHP.
- Centralize the knowledge database somewhere and secure it.
As I grow older, my memory recall becomes weaker. Perhaps, an application like this in future may try to capture everything of my knowledge and able to recall or remember it for me one day once I forgot something I could just ask it.
Artificial intelligence and the technology are one side of the life that always interest and surprise us with the new ideas, topics, innovations, products …etc. AI is still not implemented as the films representing it (i.e. intelligent robots), however there are many important tries to reach the level and to compete in market, like sometimes the robots that they show in TV. Nevertheless, the hidden projects and the development in industrial companies.
At the end, we’ve been in this research through the AI definitions, brief history, applications of AI in public, applications of AI in military, ethics of AI, and the three rules of robotics. This is not the end of AI, there is more to come from it, who knows what the AI can do for us in the future, maybe it will be a whole society of robots.