All right, time to share my project. Really enjoy reading about all the other member projects. Hope we see even more going forward.
As I wrote in my introduction post, I am writing a bot / NL parser with the ambitions to base it on strong'ish A.I. In other words, I aim to make it learn and really understand the meanings of sentences given to it. Yet another stab at "mission impossible" in other words.
The project, which I call 'white', is currently undergoing a complete rewrite. The previous version was able to handle things like "The car is white", "What is the color of the car" but was too inflexible and the grammar parser was a growing mess. I also stored knowledge in tree structures which eventually became a recursive loop nightmare.
Lessons learned, I now have several fundamental changes to the architecture and I am no longer sure if my project can be categorized as being a chat bot. Although, it is still possible to interact with it through chat input, the learning algorithms will require vast amounts of input in order for it to learn (not refering to corpus linguistics). Something I will not be able to provide by just chatting to it.
I am currently testig with a simple christmas story but it sure is not easy even with the simplest of stories. A bit of a chicken and egg situation. Will be a few more weeks worth of work before it will understand it.
Anyways, let's get to some chat interaction. The bot just got the ability to respond instead of solely interpreting input so this is very early days. Due to the new method it is learning by, it will be a while before it can handle things like "what is the color of the car" from the input "the car is white". Also, I am currently not storing anything to the database so each session means it has no prior knowledge about anything. In the below examples it actually failed to understand that "red" and "blue" are adjectives and instead made noun groups with the word "car". The bot will primarily learn words by input but I need to work out how to handle irregularity and misspellings better. Makes no difference for this example though. The answers would have been identical.
me: The blue car is traveling 25 km/h faster than the red car
me: Is the blue car traveling faster than the red car
bot: Yes
me: What is traveling
bot: blue car, red car
me: The red car is traveling at 120 km/h
me: Is the red car traveling at 120 km/h
bot: Yes
me: How fast is the red car traveling
bot: I don't know
So, until now, the conversation has been quite basic. Most of which could can be solved by pattern matching but the question "How fast is the red car traveling" is harder for 'white' since it implies an understanding of what "fast" means. The first sentence is currently not enough to make that association.
me: 10 km/h is faster than 2 km/h
me: How fast is the red car traveling
bot: 120 km/h
me: How fast is the blue car traveling
bot: 145 km/h
With an example of what "fast" means in the context of "km/h", it has enough session input to answer the question and work out what the speed of the blue car is in the last answer.
I can also continue with:
me: The black car is traveling 10 km/h faster than the blue car
and it will understand that the black car is traveling at 155 km/h if questioned. Other methods learning what "fast" means could be (but not implemeted yet):
me: The blue car travels at 10 km/h
me: The red car travels at 20 km/h
me: The red car is faster than the blue car
That's it for now.
I will end this post by mentioning that you will probably see me throwing away and reimplementing parts of my code many times to come. So if you in the future ever go "hang on a minute, why is this guy reinventing wheels and not just stick with a traditional approach", the answer is that I strongly believe that in order to achieve something different, the approach must be different. Well, either that or I simply enjoy reinventing wheels.