Thanks for everybody's feedback so far. This bot does not use AIML. The algorithm is actually very simple: everything you write gets stored verbatim in the database, and every response from the bot is one of those phrases. There is no semantic parsing of any kind. So you are really talking with everybody who has ever conversed with the bot (including yourself), using those exact phrases.
For example, if it has asked "How are you?" to ten people so far, and seven of them have responded, "I'm doing great!" then the next time somebody asks "How are you?" it is most likely to respond with "I'm doing great!". And if you write "I'm doing great!" it will pick the response to that which it has heard the most often...ad infinitum.
The secret sauce is how it decides which phrase to respond with, based on similar phrases it has heard before. The algorithm it uses to decide how closely two phrases match (e.g. "I'm doing great!" vs "Doing great!" vs. "I'm great!") is a combination of several MySQL pattern matching functions. That's probably the weakest link in the chain so far. The other weak link is that it has no ability to distinguish between what you said vs. what somebody else said, or when you said it. In fact, part of its strength comes from the fact that everything it hears is part of its "conversation", regardless of who said it or when. It does track sessions and IP addresses so theoretically I could make use of that in the algorithm but that gets into a whole other level of sophistication I'm not quite ready for.
The bot's success is predicated on the idea that when it comes to regular human conversation, given any phrase there will be a relatively limited set of possible meaningful responses. And given a long enough conversation, eventually it will be able to pick a meaningful response from the phrases it has heard before. Of course this requires lots of bot training, but if a few thousand people had a short conversation with the bot, it would become pretty smart quite quickly--provided those people didn't all discuss wildly divergent topics.