|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Multiple passes, infinite loops--- In Robitron@..., Noel Bush wrote:
> What's really needed, assuming one is coming from an AIML world, > is to extend functionality such that you take multiple passes at > an input, and break it up into individual utterances which are to > be discarded or handled as appropriate, based not on the flimsy > evidence of punctuation, but on plain old "content" -- same as > AIML works now for individual sentences. I've done some more thinking on this issue, and I guess it's more appropriate to discuss this here than on Robitron. First of all, there exists a way to do /safe/ multiple passes over an input while staying in one <topic>, by using what I call "self-modding words". For instance, what I can do to iterate over several possible interpretations, or "senses", of a word is to prefix the words I want to involve in the multi-pass transform with numbers, and use the numbered versions of the word in the various patterns that include that word in its different "senses". <category> <pattern>* WORD *</pattern> <template> <srai> <star index="1"/> 1WORD <star index="2"/> </srai> </template> </category> <category> <pattern>* 1WORD *</pattern> <template> <srai> <star index="1"/> 2WORD <star index="2"/> </srai> </template> </category> <category> <pattern>* 2WORD *</pattern> <template> <srai> <star index="1"/> 3WORD <star index="2"/> </srai> </template> </category> <!-- . . . give up at count N . . . --> <category> <pattern>* NWORD *</pattern> <template> <srai> <star index="2"/> </srai> </template> </category> This is easy to generate; no extension of AIML is necessary to do in-topic multi-pass, or multi-topic multi-pass, or even branched multi-topic multi-pass transformations. It's a powerful linguistic tool; I'm a long ways from having explored all of its possibilities, but I know they are there. As for the question of what an AIML interpreter developer can do to detect the wide varity of infinite loops that I can generate by effing up on tactics like this, in particular once I add nested recursion - I'd rather they wouldn't bother. I just want an interpreter with a simple loop counter that I can configure so that it matches the same category at most m times, and then emits a user-definable string. Loop depth should be set to "1" by default, and the configuration code should be preceded by a comment saying something like "Increase this value at your own risk!" Please, as an interpreter developer, don't try to out-think me on that regard - let me have the power I need, and don't disturb my loops. As a tool for linguistic exploration, AIML becomes worthless if you can't do "dangerous" things with it. Groping for the cutting edge can't be perfectly safe, but you can always add safety catches written in AIML, once you know, from enough experience, how you can plunge into a particular abyss ;-) Dirk -- _______________________________________________ Search for businesses by name, location, or phone number. -Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 _______________________________________________ xaiml mailing list xaiml@... http://aitools.org/mailman/listinfo/xaiml |
|
|
Re: Multiple passes, infinite loopsDirk Scheuring wrote:
> This is easy to generate; no extension of AIML is necessary to do in-topic multi-pass, or multi-topic multi-pass, or even branched multi-topic multi-pass transformations. It's a powerful linguistic tool; I'm a long ways from having explored all of its possibilities, but I know they are there. Of course the implementors of various xAIML dialects may have many different interests, but for those such as I who are interested in experimenting with extensions that operate at a fairly "core" level, I would approach the issue you're describing by trying to offer some semantics that would enable you to do exactly what you're illustrating here but with more explicitness about what's going on. So, for instance, one thing that seems highly desirable is to separate attributes that have to be "encoded" in match strings and patterns, into actual labeled attributes. One might wish to match not just string patterns, but attribute patterns. So your example might become: <category> <pattern>* WORD *</pattern> <template> <srai> <string id="message"><star/> WORD <star index="2"/></string> <string id="sense">1</string> </srai> </template> </category> <category> <pattern> <string id="message">* WORD *</string> <string id="sense">1</string> </pattern> <template> <srai> <string id="message"><star/> WORD <star index="2"/></string> <string id="sense">2</string> </srai> </template> </category> .... <category> <pattern> <string id="message">* WORD *</string> <string id="sense">*</string> </pattern> <template> <srai> <string id="message"><star index="2"/></string> </srai> </template> </category> Or something along those lines. This isn't a new idea -- basically corresponds to letting the categories have named argument lists. > As for the question of what an AIML interpreter developer can do to detect the wide varity of infinite loops that I can generate by effing up on tactics like this, in particular once I add nested recursion - I'd rather they wouldn't bother. I just want an interpreter with a simple loop counter that I can configure so that it matches the same category at most m times, and then emits a user-definable string. Loop depth should be set to "1" by default, and the configuration code should be preceded by a comment saying something like "Increase this value at your own risk!" For some reason in Program D I removed the counting of loops, and just introduced a timeout. Since either seems so arbitrary and "magic numberish", I guess I figured that rather than encouraging people to try to guess how many times would be too many (a very tough problem), I'd just let the cut-off be configurable in terms of response time, which is going to be what really matters pragmatically. You can do a *lot* of recursions in a matter of a few milliseconds, but what really counts is whether you can "ever" come up with the "right" answer -- both "ever" and "right" being in scare quotes because "ever" almost always means "in a pretty short time" and "right" means "acceptable within a pretty short time"...or something like that. But I fully appreciate what you're saying about not trying to out-think you. As a general principle I think it is absolutely right -- *you* are the AIML wizard, not me. I guess the question for xAIML is: do you see some way that the matter of loop detection could become part of the language spec itself, rather than one of these "left up to the interpreter" matters? Are you saying that you would want to be able to change the loop counter on a per-category basis? What would that look like? > Please, as an interpreter developer, don't try to out-think me on that regard - let me have the power I need, and don't disturb my loops. As a tool for linguistic exploration, AIML becomes worthless if you can't do "dangerous" things with it. Groping for the cutting edge can't be perfectly safe, but you can always add safety catches written in AIML, once you know, from enough experience, how you can plunge into a particular abyss ;-) > > Dirk > _______________________________________________ xaiml mailing list xaiml@... http://aitools.org/mailman/listinfo/xaiml |
|
|
|
|
|
|
|
|
Re: Multiple passes, infinite loopsDirk Scheuring wrote:
> Noel Bush wrote: > >> This isn't a new idea -- basically corresponds to letting the >> categories have named argument lists. > > Sorry, I didn't want to imply that this was my idea at all - it's a basic Lisp feature. I just wanted to show the users how to achieve the effect until the interpreter developers get around to implementing this feature formally, and show the interpreter devs that this might be one of the features worth considering. No, no...sorry -- I was trying to stress that the alternate form that I showed wasn't *my* idea. Didn't mean to seem to be suggesting that you were implying that something that wasn't your idea was. :-) _______________________________________________ xaiml mailing list xaiml@... http://aitools.org/mailman/listinfo/xaiml |
|
|
|
| Free Forum Powered by Nabble | Forum Help |