Fuzzy AIML

  • 5 Replies
  • 3271 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Fuzzy AIML
« on: June 13, 2014, 06:02:56 pm »
Data suggested this had a thread for itself so here it is.

I like AIML, I think it's quite elegant and useful. People like SquareBear have shown what it can do. So I thought I would have a crack at AIML again. I was wanting to host it somewhere, so needed an interpreter. I like PHP and there was Program O, but I decided it would be interesting to write my own.

One thing I wanted to change about AIML was that an input has to exactly match a pattern to get a hit. I felt I could improve on that. So I went all fuzzy. This thread will deal with my ideas and what I have achieved. I'm not sure how much I will get done now the weather is so lovely, but I am working on the interpreter and it's preprocessing quite a lot lately. I have a few AIML tags working, but have a fair bit to still do. Anyway I will update as I go.

I'm working on spelling mistakes at the moment and still have a few things to try.


Just a little taster to show you how this fuzzy preprocessing fleshes out. Take this AIML pattern...

Code
<category>
<pattern>NAME THE ROMAN SOLDIER WHO IS SUPPOSED TO HAVE STABBED JESUS</pattern>
<template>Longinius</template>
</category>

Normally with AIML you would have to input the exact pattern to get a match -  but I can get a hit with lines like this :

"Who was that man who stabbed Jesus ?"

Making it a bit more flexible. Keywords are the key here.

In a different way I can get hits with spelling mistakes :

Code
<category>
<pattern>WHO WROTE CANDIDE</pattern>
<template>Voltaire</template>
</category>

Take note of the spelling of Candide. With my approach I get a hit with...

"Who wrote Candede ?"

Ask most AIML bots "What is a fish ?" and they will tell you...

"A cold-blooded vertebrate who lives in the ocean or fresh water."

Ask them "What is a fosh ?" and they will fall back to a default no-answer-for-that reply.

And similar things. One of the things I am doing I mentioned a while back here and that's using Levenshtein Distance.

Together with keywords and some other nifty ways of comparing strings it works quite well and makes my AIML bot a bit more flexible.

At the time of writing this I am still in the early stages. It's going to take me a while to see how effective it is. Sometimes I can see that a pattern match might not be desirable but as I have introduced a scoring mechanism maybe I can control that. The spelling mistakes I think will work well. It all remains to be seen.
« Last Edit: June 13, 2014, 08:39:40 pm by Freddy »

*

squarebear

  • Trusty Member
  • *********
  • Terminator
  • *
  • 867
  • It's Hip to be Square
Re: Fuzzy AIML
« Reply #1 on: June 13, 2014, 10:40:58 pm »
Nice work Freddy.
Feeling Chatty?
www.mitsuku.com

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Fuzzy AIML
« Reply #2 on: June 14, 2014, 12:17:51 am »
Thanks. There's nothing like jumping in at the deep end  :o

*

Data

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1279
  • Overclocked // Undervolted
    • Datahopa - Share your thoughts ideas and creations
Re: Fuzzy AIML
« Reply #3 on: June 14, 2014, 12:16:00 pm »
Thanks for this thread, so impressed with this whole idea, really, to my mind it has the potential to be quite a leap in AIML. looking forward to my first chat with it, maybe I wont have to worry so much about my awful spelling  ;D

Keep at it, you will find your way out of the deep end.  O0

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Fuzzy AIML
« Reply #4 on: June 14, 2014, 04:06:57 pm »
Thanks Data, it's been interesting to work on so far :)

Some of my bits that I ordered to host it on arrived today. Got a few more things on the way. It would work as a really simple bot as it is, with just the features of AIML I have so far coded. I think I will go for full AIML compatibility now, well I will try...

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Fuzzy AIML
« Reply #5 on: June 24, 2014, 03:34:16 pm »
Sounds like an interesting approach Freddy.  You should get some nice results with that.

 


OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

236 Guests, 0 Users

Most Online Today: 282. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles