Fuzzy AIML

  • 5 Replies
  • 3492 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • 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
  • *
  • 869
  • 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
  • *
  • 6860
  • 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
  • *
  • 6860
  • 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.

 


Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
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

Users Online

375 Guests, 1 User
Users active in past 15 minutes:
WriterOfMinds
[Trusty Member]

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

Articles