Program# release 2.1

View: New views
7 Messages — Rating Filter:   Alert me  

Program# release 2.1

by Nicholas Tollervey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've just release version 2.1 of the Program# (AIMLbot) the .NET
implementation. Documentation has also been updated.

Changes in this release:

1. The bot used to get the wild-card matches mixed up if processing more
than one sentence. This is now fixed with the appropriate unit tests
written and the example applications updated. A new class "SubRequest"
now encapsulates a query to the Graphmaster and holds the wild-card
matches.

2. The normalization process for applying changes is now fixed so it
doesn't always return uppercase. The case of the normalized result
should match that of the user's raw input plus any replacements. This
means <star/> tags return exactly what the user inputted, rather than a
capitalized version of it.

3. There is the potential that the bot could get into an infinite loop
when processing the template tag, especially if it encountered a srai
tag that ultimately led back to itself. This hole has now been plugged
in two ways:
a) Each time an AIML tag is processed the request is checked to make
sure it hasn't timed out.
b) When the srai class calls a sub-request with the new path the new
request object has the same StartedOn value as the original request.

4. Made changes to the way the path for queries to the Graphmaster are
dealt with. It is now "backwards": (topic <topic> that <that> User input).

5. Added some new tests and code for stopping a bot from accepting user
input (something that should happen should it be changing the
graphmaster for example). Updated other projects to reflect these
changes too.

6. Changed the behaviour of the default constructor in the "Bot" class.
Removed the loading of config files from the constructor so you now have
to call the loadSettings() method to load the configuration files.

7. Included a very simple Web-services based example application.

As always, comments and suggestions are welcome.

Best wishes,

Nicholas
_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

Re: Program# release 2.1

by Dr. Rich Wallace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> 4. Made changes to the way the path for queries to the Graphmaster are
> dealt with. It is now "backwards": (topic <topic> that <that> User input).

Why backwards?

_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

Parent Message unknown Re: Program# release 2.1

by mehri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is the email thread about this being more efficient.  I have swapped mine to be reverse and have had a reduction in memory usage as well as startup time.

IMHO, the next revision of the standard should have them reversed.

******

>From Dr Wallace:

Helio, I think there is no good reason except that's how the architecture

commmittee decided the standard, based on the existing early AIML

interpreters.  We've kept it that way for compatibility.  One idea that's

been discussed over the years is to generalize the <pattern,that,topic>

triple to a botmaster-defined infinite number of pattern-contexts, which

could include concepts such as bot name, mood, state, personality and so

on.  There is in principle no reason the botmaster should not be allowed

to redefine the order as well as the number of levels of matching.



Note that it isn't necessarily true that the graph has to take up a lot of

memory when the "topic" and "that" are both "*", because one could

compress these paths with a special terminal node.



> The AIML standard states [1] that "an AIML interpreter

> must construct a match path from each category at

> load-time", and that "a match path has three

> components, whose order is mandatory": (pattern),

> (that) and (topic).

>

> My question is, what is the rationale behind this

> ordering? To me it looks the inverse would be a more

> efficient option. So long most categories have unset

> (topic) and (that) sections (something that is

> probably true for most AIML sets), a match path of the

> form:

>

> TOPIC ELEMENTS (TOPIC) THAT ELEMENTS (THAT) PATTERN

> ELEMENTS

>

> Would allow for more compact match graphs, since all

> topic-less, that-less categories would be placed under

> the same root node. Of course, this arrangement would

> cause the repetition of equivalent pattern elements

> from categories under different (topic) and/or (that)

> sections; but so long the number of unique (topic,

> that) pairs remained slow, this would be more than

> compensated by the savings.

>

> Am I missing something here?

>

> [1]

> http://www.alicebot.org/TR/2005/WD-aiml/#section-load-time-match-path-construction

>

> --

> Ja mata ne.

> Helio Perroni Filho

 

----- Original Message ----
From: Dr. Rich Wallace <drwallace@...>
To: Alicebot Developer Discussion <alicebot-developer@...>
Sent: Tuesday, December 12, 2006 8:54:58 AM
Subject: Re: [alicebot-developer] Program# release 2.1


> 4. Made changes to the way the path for queries to the Graphmaster are
> dealt with. It is now "backwards": (topic <topic> that <that> User input).

Why backwards?

_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer





 
____________________________________________________________________________________
Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.
_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

Parent Message unknown Re: Program# release 2.1

by mehri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Nicholas,

Great news.  You're doing good getting these changes implemented in such a fast manner.  I'm also happy to see the open source friendly license too. ;-)

BTW,
Have you looked at ProgramD's test cases that are in XML to run as part of your regression test suite?  The test cases are kind of like the acid test for web browsers but for AIML bots.

The regression test goes as follows:
You load your bot with the test AIML file.  Then you parse an XML file that has the input to your bot and the expected response.  Finally, you compare the actual output to the expected response and spit out an error if they do not match.  It's a great test suite to ensure that you have gotten white spacing done right and that your condition's, set's, get's, etc... all work out okay.

Plus, it's always easy to add new test cases when a user reports a problem to the XML file and rerun your test suite to ensure it's been fixed.  Latter, when you do major modifications on your bot it's easy to ensure you didn't break something else.

Here is an example of my bot's run through on the test suite:
http://rebecca-aiml.sourceforge.net/regressionTest-0987.htm

I have added a few extra test cases that aren't in ProgramD and I think Noel has added more to his since I took his (I need to merge his into mine).  But you should be able to download the XML test file from my downloads section as well as ProgramD's.

I am thinking about opening up a seperate sourceforge site strictly for the maintance and release of the XML test suite.  It's a very very helpful tool for developers to run their bots against.

Finally,

7. Included a very simple Web-services based example application.

Both ProgramD and Program# have web services.  Do they happen to share the same WSDL file?  It would be nice if there was a common yet simple getResponse WSDL file that was standardized.  This would make it compatiable for client side code that accessed the Program# WSDL to also access the ProgramD WSDL.


 
----- Original Message ----
From: Nicholas H.Tollervey <ntoll@...>
To: Alicebot Developer Discussion <alicebot-developer@...>
Sent: Tuesday, December 12, 2006 7:43:16 AM
Subject: [alicebot-developer] Program# release 2.1

Hi,

I've just release version 2.1 of the Program# (AIMLbot) the .NET
implementation. Documentation has also been updated.

Changes in this release:

1. The bot used to get the wild-card matches mixed up if processing more
than one sentence. This is now fixed with the appropriate unit tests
written and the example applications updated. A new class "SubRequest"
now encapsulates a query to the Graphmaster and holds the wild-card
matches.

2. The normalization process for applying changes is now fixed so it
doesn't always return uppercase. The case of the normalized result
should match that of the user's raw input plus any replacements. This
means <star/> tags return exactly what the user inputted, rather than a
capitalized version of it.

3. There is the potential that the bot could get into an infinite loop
when processing the template tag, especially if it encountered a srai
tag that ultimately led back to itself. This hole has now been plugged
in two ways:
a) Each time an AIML tag is processed the request is checked to make
sure it hasn't timed out.
b) When the srai class calls a sub-request with the new path the new
request object has the same StartedOn value as the original request.

4. Made changes to the way the path for queries to the Graphmaster are
dealt with. It is now "backwards": (topic <topic> that <that> User input).

5. Added some new tests and code for stopping a bot from accepting user
input (something that should happen should it be changing the
graphmaster for example). Updated other projects to reflect these
changes too.

6. Changed the behaviour of the default constructor in the "Bot" class.
Removed the loading of config files from the constructor so you now have
to call the loadSettings() method to load the configuration files.

7. Included a very simple Web-services based example application.

As always, comments and suggestions are welcome.

Best wishes,

Nicholas
_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer





 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

Re: Program# release 2.1

by Dr. Rich Wallace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is an earlier discussion of matching order:

http://list.alicebot.org/pipermail/alicebot-archcomm/2004-May/000974.html


_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

Re: Program# release 2.1

by Nicholas Tollervey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guys,

Thanks for the information.

Rich's comment (in Mehri's email) preempt many of the thoughts I've been
having whilst re-writing Program# regarding the path part of the AIML
standard: "One idea that's been discussed over the years is to
generalize the <pattern, that, topic> triple into a botmaster-defined
infinite number of pattern-contexts, which could include concepts such
as bot name, mood, state, personality and so on. There is in principle
no reason the botmaster should not be allowed to redefine the order as
well as the number of levels matching."

In the new year I'll create an "experimental" branch to act as a
playground for new ideas and non-AIML features and will definitely be
changing the way the "path" works (among other things).

With regard to path "order": Having read Kim's comments on "shadowed"
categories arising from the possibility of catch-alls in topics I think
"correctness" definitely trumps performance and memory. Program# will
therefore revert to the original <path,that,topic> triple of the
original standard.

Mehri, I am aware of the Program D test cases but have not had time
(yet) to include them in Program#. I suspect my library won't pass
because of white-space issues and the way it handles non-aiml tags, but
this can be changed. I've got pretty comprehensive tests for get, set
and condition tags but I think tests to exercise my code that originated
from someone else would be an excellent resource. I'd also be interested
in collaborating in an ACID2 like test
(http://www.webstandards.org/action/acid2/) for AIML interpreters.

This brings me to the question of the AIML standard: what exactly is the
status of moving it from draft to ???? Would it mean submitting the
standard to ASCII / W3C or whoever for some sort of seal of approval?
(You can tell I've never been involved in such a process). Is discussion
/ development of the standard still ongoing or has it stalled? (Why?)
What are people's thoughts on this?

Finally, the web-service I wrote was literally banged out in an
afternoon. It is *ONLY* meant to be an example of how one *MIGHT* do it.
A proof of concept as it were. It needs a lot more thought putting into
it before it could be used IRL. If programD already has a web-service
worked out with an appropriate WSDL then I think some effort should be
put in to thrashing out a standard web-based API. Again, I'd certainly
be willing to be involved with this.

Anyway, thanks for the encouragement and I'd be interested to hear your
thoughts.

Regards,

Nicholas.
_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

Re: Program# release 2.1

by Gary Dubuque :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, Nicholas,

Program N (AIMLpad) already does the contexts and even has a function to
identify the shadowed categories.  Although you may be stuck with inputs
first, any order after that, i.e, topic, then that, then mood, then etc. can
be explored.  Just be sure to use graphmaster indexing and save a file in
the bots folder (contexts.txt) of the order in which you want the contexts
to be checked.

I'm willing to help finalize the AIML standard, but I don't know about
"boards of standardization" either.

In Program N I still haven't figured out when the namespaces apply if
various sets of AIML files using different namespaces are combined into a
bot's set.  Once you match to a category, are you to go back in the XML to
parse out the namespaces for that particular file or do all the files in the
set have to use the same namespaces?

Thanks,
  Gary Dubuque

-----Original Message-----
From: alicebot-developer-bounces@...
[mailto:alicebot-developer-bounces@...]On Behalf Of
Nicholas H.Tollervey
Sent: Thursday, December 14, 2006 5:26 AM
To: Alicebot Developer Discussion
Subject: Re: [alicebot-developer] Program# release 2.1


Guys,

Thanks for the information.

Rich's comment (in Mehri's email) preempt many of the thoughts I've been
having whilst re-writing Program# regarding the path part of the AIML
standard: "One idea that's been discussed over the years is to
generalize the <pattern, that, topic> triple into a botmaster-defined
infinite number of pattern-contexts, which could include concepts such
as bot name, mood, state, personality and so on. There is in principle
no reason the botmaster should not be allowed to redefine the order as
well as the number of levels matching."

In the new year I'll create an "experimental" branch to act as a
playground for new ideas and non-AIML features and will definitely be
changing the way the "path" works (among other things).

With regard to path "order": Having read Kim's comments on "shadowed"
categories arising from the possibility of catch-alls in topics I think
"correctness" definitely trumps performance and memory. Program# will
therefore revert to the original <path,that,topic> triple of the
original standard.

Mehri, I am aware of the Program D test cases but have not had time
(yet) to include them in Program#. I suspect my library won't pass
because of white-space issues and the way it handles non-aiml tags, but
this can be changed. I've got pretty comprehensive tests for get, set
and condition tags but I think tests to exercise my code that originated
from someone else would be an excellent resource. I'd also be interested
in collaborating in an ACID2 like test
(http://www.webstandards.org/action/acid2/) for AIML interpreters.

This brings me to the question of the AIML standard: what exactly is the
status of moving it from draft to ???? Would it mean submitting the
standard to ASCII / W3C or whoever for some sort of seal of approval?
(You can tell I've never been involved in such a process). Is discussion
/ development of the standard still ongoing or has it stalled? (Why?)
What are people's thoughts on this?

Finally, the web-service I wrote was literally banged out in an
afternoon. It is *ONLY* meant to be an example of how one *MIGHT* do it.
A proof of concept as it were. It needs a lot more thought putting into
it before it could be used IRL. If programD already has a web-service
worked out with an appropriate WSDL then I think some effort should be
put in to thrashing out a standard web-based API. Again, I'd certainly
be willing to be involved with this.

Anyway, thanks for the encouragement and I'd be interested to hear your
thoughts.

Regards,

Nicholas.
_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer


_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer