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

Antoine Raux antoine at cs.cmu.edu
Mon Apr 16 00:29:51 EDT 2007


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