Hi Hari, I’ve been coding my own Perl based bot engine in the last few months. I’ve been experimenting with SQLite, mySQL, and eventually decided using a Perl Hash to store the bot database.
I’ve also played with my own bot “language” if you will, using a simple mySQL database backend that worked reasonably well.
Here’s my advice… If you plan on developing a non-AIML bot engine, then the floor is yours. You can create a simple table or two in a database, pop it full of rules, and write a nice PHP interface into that table. That is really easy (so to speak). I did the same, but I had some issues. My biggest problem was the lack of features.. The more I tried to add features, the more I realized that AIML was already servicing those. So I ended up scratching that code, and starting again.
My new code (called AIMLPerl) will now read AIML, and store it in memory. I did have it in a database originally, but it was a bit slow. Using an internal memory hash was much faster. I have a built in AIML parser that will analyze the <template> tags, and figure out what the various tags inside it means.
So basically, with enough programming you can build it from scratch. I find that by picking a language, be it AIML, Chatscript, RiveScript, or any of the others out there, you allow your bot to be portable, and you allow some portability of code.