[RavenclawDev 256] Re: checking if an agent has been restarted

Antoine Raux antoine at cs.cmu.edu
Mon Apr 16 15:08:58 EDT 2007


Hi Svetlana,

Actually the solution I described does not require to add any extra agent
(although that kind of depends on your task structure). Sorry if I was not
clear.
Basically all you need to do is a start over function which describes what
to do on a start over. The rest is handled by the generic start over library
agent.

If you send me either a detailed description of what you want to do or your
code, I might be able to help you with your specific case...

antoine

-----Original Message-----
From: Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] 
Sent: Monday, April 16, 2007 2:54 PM
To: Antoine Raux
Cc: ravenclaw-developers at cs.cmu.edu
Subject: Re: [RavenclawDev 253] Re: checking if an agent has been restarted

Thanks Antoine,

 your solution makes sense, however it would require me to make
changes to my dialog structure and add a custom start over code.

I would like to re-use the generic start-over, I was hoping to get a
flag indicating if the system has been start over or not.

I guess I will live with my (inelegant) solution for now because I do
not want to add any extra agents.

Svetlana

On 4/16/07, Antoine Raux <antoine at cs.cmu.edu> wrote:
> Udhay (and everyone),
>
> The difference is that the custom StartOver function gets called by the
> StartOver library agent, i.e. anytime a user says "START OVER" or
something
> equivalent. To get the same behavior "manually", you'd have to create an
> agent that gets triggered on such user input, i.e. you'd have to duplicate
> the generic StartOver library agent. It's precisely in an attempt to keep
> the StartOver behavior as generic (i.e. task-independent and reusable) as
> possible that we designed this customizable StartOver function thing.
>
> Hope this clarifies things...
>
> antoine
>
> -----Original Message-----
> From: udhay.ece at gmail.com [mailto:udhay.ece at gmail.com] On Behalf Of
> Udhyakumar N
> Sent: Monday, April 16, 2007 12:41 AM
> To: Antoine Raux
> Cc: ravenclaw-developers at cs.cmu.edu
> Subject: Re: [RavenclawDev 251] Re: checking if an agent has been
restarted
>
> A small clarification.
>
> What is the difference between reopening all the agents except Welcome
> prompt at the end and the method you just described?
>
> -Udhay
>
>
> On 4/16/07, Antoine Raux <antoine at cs.cmu.edu> wrote:
> > Hi Svetlana,
> >
> > We had a similar issue in Let's Go so let me describe it and how we
> > addressed it. Hopefully that'll help you.
> >
> > At the very beginning of the dialog, the system gives an introduction
> > message ("Welcome to Let's Go (...) To get help say HELP (...)"), which
we
> > do not want to repeat on a start over (in that case we just want "Okay
> let's
> > start from the beginning. What can I do for you?"). The solution was to
> >
> > 1) define an inform prompt for starting_over as "Okay let's start from
the
> > beginning." (this prompt is automatically spoken by the standard
StartOver
> > agency)
> >
> > 2) define a Let's Go specific StartOver function.
> > The latter is done by adding:
> >
> >         CUSTOM_START_OVER(LetsGoPublicStartOver)
> >
> > to the CORE_CONFIGURATION section, and define a function called
> > LetsGoPublicStartOver() as follows (sorry for the potential spurious
line
> > breaks...):
> >
> > // D: define the start-over routine for lets go public
> > void LetsGoPublicStartOver() {
> >         // Resets only the subttree in charge of the actual task
> >         // (so as not to repeat the introduction)
> >         CDialogAgent& rda =
> >
> > pDTTManager->GetDialogTaskTreeRoot()->A("/LetsGoPublic/PerformTask");
> >         rda.Reset();
> >
> >
pDMCore->PopTopicFromExecutionStack(pDTTManager->GetDialogTaskTreeRoot());
> >         pDMCore->ContinueWith(pDMCore,
> > pDTTManager->GetDialogTaskTreeRoot());
> > }
> >
> > In our case, this function restarts the PerformTask subtree instead of
the
> > whole tree (the introduction prompt is not in PerformTask).
> > Of course, you could do other stuff in this function...
> >
> > So here is how we solved our problem. I hope that'll help you solve
yours.
> > Let me know if you have questions...
> >
> > antoine
> >
> >
> > -----Original Message-----
> > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu
> > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On
Behalf
> Of
> > Svetlana Stenchikova
> > Sent: Sunday, April 15, 2007 10:30 PM
> > To: ravenclaw-developers at cs.cmu.edu
> > Subject: [RavenclawDev 250] checking if an agent has been restarted
> >
> > Hi,
> >
> > does RavenClaw have any facility to check if the dialog has been
> > "restarted"?
> >
> > I would like to play a different message when the dialog is
> > 'restarted' than when it is 'started' for the first time, but I do not
> > see how I can check for that.
> >
> > When a user says 'restart' all agents are recreated, so that all
> > reset, reopen counters start from 0 again.
> >
> > I can add to  DialogAgent  a static variable 'countCreated', which
> > counts every time any agent is created, but this is not a nice
> > solution.
> >
> > Can someone suggest a better way?
> >
> > thank you
> > Svetlana
> >
> >
> >
>
>
>




More information about the Ravenclaw-developers mailing list