AIML Evolved - Aims and Objectives
12 October 2006
Program#
My original .NET chat-bot was written over three years ago and is based upon the AIML specifications. It was also my first project in C# and became a vehicle for me to learn about the .NET platform.
Now that I have extensive experience and knowledge of .NET, I am re-designing this library to include several modifications and improvements. The definite modifications will be (in no particular order):
- Better cross-platform compatibility: .NET 1.1 and 2.0 as well as MONO support.
- A significant change in the architecture of the library (more modular to make it easier for developers to extend and add functionality).
- Better (i.e. more efficient and standards-compliant) AIML support.
- A simpler and more logical API.
I also aim (but no promises) to include the following features (in order of priority):
- A means of saving the bot’s “brain” as a binary file. Loading a binary file into memory will be significantly faster than having to re-load and process the AIML every time the software starts up.
- The option to run the library with at least two different types of backend:
- The regular in-memory “brain” built from the AIML or binary file described above.
- A relational database (initially SQL Server2000/2005, MySql and PostgreSQL) and associated code to import and process the AIML into a relational structure.
- The implementation of some non-AIML compliant learning algorithms so the bot’s vocabulary and scope for conversation grows.
- User profiling for better awareness of conversational context.
- Some simple code snippets and examples for developers to get started.
ProgramR
In addition to the work on Program#, I have been in touch with the developers of a Ruby version of the standard AIML bot (ProgramR).
By their own admission, the project is very much “alpha” code. I am going to spend time contributing to this project as both a bug fixer and implementer of new features.
My reasons for doing this are to:
- Deepen my understanding of the capabilities and stylistic conventions of the Ruby programming language.
- Advance ProgramR to the same level of maturity as Program#.
- Help bring into existence something insanely useful.
- Create a platform upon which new chat-bot techniques can be easily tried and tested.
Ultimately, both Program# and ProgramR will implement only the minimum of required features in the simplest, easiest and most helpful way possible and become solid foundations upon which bespoke systems can be built.

7 Responses to "AIML Evolved - Aims and Objectives"
2006-10-16 05:01
Hi – nice work with the library, I just started having a play with it yesterday (working it into an MSN bot I’m writing).
One thing I have encountered so far, though, is a recursion issue with cNodeMapper.evaluate() – feeding the bot the string “what is up?” with one of the standard AIML sets resulted in a StackOverflowException. My understanding of AIML isn’t all that great, so I’m not sure if this is an issue with how the parser works or not. In the meantime, I’ve added a variable to track the recursion depth and to pull the plug if things go too far.
2006-10-16 07:13
Thanks for the comment.
The issue that you mention is probably caused by self referencing AIML. For example, perhaps the pattern matched by “what is up?” uses the srai tag to point to “what’s up?” that uses the srai tag to point to “What is up?” and so on ad-infinitum.
This is definitely an issue with the AIML set. However, I definitely think that Program# should gracefully deal with such a situation. Many bots (like mine) assume that the AIML will be correct, but I know of at least one (the original Java version) that uses a time-out mechanism to catch infinite loops.
This is, of course, something to be included in version 2. :-)
2006-10-17 05:20
I just found your bot and currently I am rewriting it for better performance and better API (compiled regexp vs char ArrayList, generics, etc). I am going to use it as the GTalk chatbot, maybe I will even try to create Russian aiml brain.
Anyway I think your work is great, considering the limited knowledge of .Net you had at the moment of writing the bot.
2006-10-17 08:24
Thanks for your positive comments.
I hope to make use of a site such as Sourceforge so version two of the bot has a project “homepage” and source control mechanism (probably subversion).
Any contributions would be most welcome. :-)
2006-11-10 20:33
Any update on this project yet?
2006-11-10 23:41
Hi Rob,
Assuming “life” and other distractions don’t get in the way, I should have a completely re-written version ready for “beta” release by the middle of next week. It’ll be about as functional as the first version but significantly better written, organised and tested (I’m having a lot of fun with nUnit).
I’ll put it on Sourceforge and hope to welcome collaboration from others with a view to focusing on the database backend code / schema / queries.
It will be released under the LesserGPL (or equivalent) to allow its inclusion in commercial software.
2010-12-14 15:48
Hi Tollervey,
Great app!
I was looking for this.
I tried it because I wanted a bot on my website.
Nevertheless, The bot just gives me a blank answer.
I am running ruby 1.8.7
Can I fix this?
Thanks in advance.
Arquitecto