Quantcast

backtrack

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

backtrack

Andy Here!!!
hi,
 
Sorry for sending it wrongly... :)
 
i wonder any backtrack on Jason just like prolog does?
 
i have a problem in my program, i always get this error message: "Found a goal for which there is no relevant plan: ". From my understanding, this message will come out if there is no other plan that can be matched. But it should return "false" and do backtrack to find out another plan. Let say this plan(PLAN B), which can't be matched, is inside PLAN A, then the process should backtrack and leave PLAN B to find another PLAN A that may match. My question is do Jason has "false" statement / anyway to make it backtrack??
 
Thank you very much
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backtrack

Rafael H Bordini

Hi Andy,

Thanks for the email, this question is natural because there
hasn't been much explanation on the plan failure events in the
available material. However, please have a look at questions
5.1 and 5.3 of the FAQ (it's in the release but also accessible
from jason.sf.net). Basically, if there is the possibility of
not there being an applicable plan for a goal the agent might
have, and you don't want to ignore the whole intention because
no plan was found to carry it on, you have to make use of the
plan failure handling mechanism. For example, if there is
no applicable plan for a goal g2 called from the body
of a plan p1 with trigger event +!g1, then the failed plan
on top of p1 is removed and an event for -!g1 is generated
for that intention. If the programmer included a plan, say,
-!g1 : true <- !g1.
the agent will keep trying to achieve g1 no matter how
many attempts have failed in the past.

In the future there will be a lot more facilities for dealing
with these issues, for example the idea of "goal patterns" from
a paper on which Jomi Hubner, Mike Wooldridge, and I are working
at the moment.

Hope this helps,

Rafael


Andy Here!!! writes:
 > hi,
 >  Sorry for sending it wrongly... :)
 >  i wonder any backtrack on Jason just like prolog does?
 >  i have a problem in my program, i always get this error message: "Found a
 > goal for which there is no relevant plan: ". From my understanding, this
 > message will come out if there is no other plan that can be matched. But it
 > should return "false" and do backtrack to find out another plan. Let say
 > this plan(PLAN B), which can't be matched, is inside PLAN A, then the
 > process should backtrack and leave PLAN B to find another PLAN A that may
 > match. My question is do Jason has "false" statement / anyway to make it
 > backtrack??
 >  Thank you very much


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backtrack

Andy Here!!!
Thank you, Rafael. It helps me much, i know how to handle failure plan. But then i face a problem where for example i have:
 
+!new( [ T1 | T2 ] ): true <- !new(T2).         ----- for my successful plan
 
-!new( [ T1 | T2 ] ): true <- !new(T2).          ----- for my failure plan
 
i can't get "T2" 's value for failure plan. Value for "T2" is only "T2" . Is this because of failure plan will not be able to get the value inside ""T2" ???
 
Thank you very much....
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Jason-bugs] Re: backtrack

Rafael H Bordini

Hi Andy,
Thanks for this question.
With the sample code you sent me, I could check
that this is indeed a bug in Jasons's plan failure handling.
This hasn't been tested much, so that very much for pointing this out.
We'll let you know when this is fixed, but it might take
a few days.
Cheers,
Rafael

Andy Here!!! writes:
 > Thank you, Rafael. It helps me much, i know how to handle failure plan. But
 > then i face a problem where for example i have:
 >  +!new( [ T1 | T2 ] ): true <- !new(T2). ----- for my successful plan
 >  -!new( [ T1 | T2 ] ): true <- !new(T2). ----- for my failure plan
 >  i can't get "T2" 's value for failure plan. Value for "T2" is only "T2" .
 > Is this because of failure plan will not be able to get the value inside
 > ""T2" ???
 >  Thank you very much....


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jason-bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Jason-bugs] Re: backtrack

Rafael H Bordini
In reply to this post by Andy Here!!!

Dear Andy,

Thanks again for the code excerpt you send me to reproduce the error you were
talking about in this email. It allowed us to fix two bugs. First was that
when a plan failed because an action failed, the originally posted event was
lost. The second was that the failed plan (which is kept on the stack just in
case the user wants to check which plan failed, although this is not easy and
currently not implemented) was resumed after the goal deletion plan finished!
It should be removed, of course, as it failed and in principle cannot be
executed again (the deletion again might already have generated another
instance of that plan and executed successfully).

These two bugs have been fixed in the code in the CVS repository. If you are
OK using "ant" to compile and run, please download the latest code from the
CVS. Please let us know if this doesn't work.

Best,

Rafael


Andy Here!!! writes:
 > Thank you, Rafael. It helps me much, i know how to handle failure plan. But
 > then i face a problem where for example i have:
 >  +!new( [ T1 | T2 ] ): true <- !new(T2). ----- for my successful plan
 >  -!new( [ T1 | T2 ] ): true <- !new(T2). ----- for my failure plan
 >  i can't get "T2" 's value for failure plan. Value for "T2" is only "T2" .
 > Is this because of failure plan will not be able to get the value inside
 > ""T2" ???
 >  Thank you very much....


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jason-bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jason-bugs] Re: backtrack

Jomi Fred Hubner-2
Andy, if you prefer, you can download the jason.jar file from

        http://jason.sourceforge.net/jws/jason.jar

and replace the Jason/bin/jason.jar that comes in the distribution.

This file fixes the bugs that Rafael mentioned.

Regards,

Jomi


On 19/out/2005, at 14:03, Rafael H Bordini wrote:

>
> Dear Andy,
>
> Thanks again for the code excerpt you send me to reproduce the error
> you were
> talking about in this email. It allowed us to fix two bugs. First was
> that
> when a plan failed because an action failed, the originally posted
> event was
> lost. The second was that the failed plan (which is kept on the stack
> just in
> case the user wants to check which plan failed, although this is not
> easy and
> currently not implemented) was resumed after the goal deletion plan
> finished!
> It should be removed, of course, as it failed and in principle cannot
> be
> executed again (the deletion again might already have generated another
> instance of that plan and executed successfully).
>
> These two bugs have been fixed in the code in the CVS repository. If
> you are
> OK using "ant" to compile and run, please download the latest code
> from the
> CVS. Please let us know if this doesn't work.
>
> Best,
>
> Rafael
>
>
> Andy Here!!! writes:
>> Thank you, Rafael. It helps me much, i know how to handle failure
>> plan. But
>> then i face a problem where for example i have:
>>  +!new( [ T1 | T2 ] ): true <- !new(T2). ----- for my successful plan
>>  -!new( [ T1 | T2 ] ): true <- !new(T2). ----- for my failure plan
>>  i can't get "T2" 's value for failure plan. Value for "T2" is only
>> "T2" .
>> Is this because of failure plan will not be able to get the value
>> inside
>> ""T2" ???
>>  Thank you very much....
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Jason-bugs mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-bugs
>
>
WYSIWYG: what you see is all that you get
LaTeX: what you get is more than you see
--
Jomi Fred Hübner             Universidade Regional de Blumenau    FURB
Professor                    Departamento de Sistemas e Computação DSC
                              Campus IV, rua Braz Wanka, 238, Vila Nova
mailto:[hidden email]      89035-160                    Blumenau, SC
http://www.inf.furb.br/~jomi Tel: (47) 321-7810     Fax: (47) 321-7802



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jason-bugs] Re: backtrack

Andy Here!!!
hi,
 
i have tried to run the new jason.jar, but it end up with some of my program can't work. If i use the jason.jar which is on Jason 0.7, then it works fine. I will try to check my program first to see which part actually is not working. so i can't give any detail of what error is produced at the moment. I just want to let you know about this thing... i'll try to check it out again.
 
Thank you very much
 
Cheers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jason-bugs] Re: backtrack

Rafael H Bordini

Hi Andy,

Yes, please check what's the problem. Maybe we inroduced errors
because of the changes we have made. It's quite possible. But
it might be that you made your program work in a version of
Jason that was wrong, so in fact the program is now wrong.
If your programme used plan failure, that's also possible.
Note that now the failed plan is kept in the stack when the
"-!goal" plan executes, but when this finishes, the failed plan
is removed and no longer executed. This is the right way, you
have to make sure "-!goal" will achieve the goal WITHOUT going back
to the failed plan (possibly by calling !g again from it's body).

Rafael

Andy Here!!! writes:
 > hi,
 >  i have tried to run the new jason.jar, but it end up with some of my
 > program can't work. If i use the jason.jar which is on Jason 0.7, then it
 > works fine. I will try to check my program first to see which part actually
 > is not working. so i can't give any detail of what error is produced at the
 > moment. I just want to let you know about this thing... i'll try to check it
 > out again.
 >  Thank you very much
 >  Cheers.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jason-bugs] Re: backtrack

Andy Here!!!
Hi Rafael,
 
So what you mean is for example i have:
 
+!sb1 : true <- !sb2; !sb4.
 
+!sb2 : true <- ?new_belief; !sb3.
 
-!sb2 : true <- true.
 
by running it from !sb1, then it will produce failure plan which is because "new_belief" is not in belief base. -!sb2 will then be called. after finishing -!sb2, then it will remove +!sb2 as well which means !sb3 is not executed. After removing +!sb2, then it will execute +!sb4. Is this correct ??? if this is correct, means i have a wrong program which run perfectly on the Jason 0.7 but not running well at the new jason.jar.
 
Thank you very much
 
Cheers. 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jason-bugs] Re: backtrack

Rafael H Bordini

Hi Andy,

Apologies for the delay in aproving your post to the
list. We do that manually to avoid spam.

Andy Here!!! writes:
 > Hi Rafael,
 >  So what you mean is for example i have:
 >  +!sb1 : true <- !sb2; !sb4.
 >  +!sb2 : true <- ?new_belief; !sb3.
 >  -!sb2 : true <- true.
 >  by running it from !sb1, then it will produce failure plan which is because
 > "new_belief" is not in belief base. -!sb2 will then be called. after
 > finishing -!sb2, then it will remove +!sb2 as well which means !sb3 is not
 > executed. After removing +!sb2, then it will execute +!sb4. Is this correct
 > ???

Yes, that's correct. But note it's correct because you wrote that
plan saying that failures should be ignored (the last one).
The idea is that plan "+!sb2:..." failed,
so you cannot just carry on running it later on. If in your "-!sb2:..."
you have reason to think the goal can be attempted again by the "+!sb2..."
plans, then it has to do it explicitly, as in:

-!sb2 : not new_belief <- +new_belief; !sb2.

 > if this is correct, means i have a wrong program which run perfectly on
 > the Jason 0.7 but not running well at the new jason.jar.

Yes, I'm afraid that's true. I do apologise for the inconvenience.
The plan failure mechanism has not been given formal semantics
yet, and we were undecided about this. In a way, you could think
of the goal deletion plan as simply a means to do what you have to do
before carrying on the failed plan. We might even give both
options to programmer in the future. But for various reasons,
currently we have settled for the semantics as it is in the .jar
file you downloaded. It's probably best if you change your program,
but if you want a version of Jason with the corrected bug on
instantiation but the old semantics of plan failure, we can
produce that for you, but that won't be standard.

Cheers,

Rafael


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jason-bugs] Re: backtrack

Andy Here!!!
So it means i did it wrongly for my program with wrong semantic of failure plan which is on Jason 0.7. Yes, i will try to change my program to suit this new Jason.jar i downloaded.
Thank you Rafael and Jomi for all of your help...
 
Cheers
Loading...