Quantcast

problem in action fail with belief add event.

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

problem in action fail with belief add event.

Marcos Côrtes
Hello Jason Develops....

I found a behavior that I think is a bug...

If I run the agent:
====================================================================
+!start:true<-
      !mygoal.

+!mygoal:true<-
        act.  //act will fail everytime.


-!start:true<-
      .print("it works!").
====================================================================

The system will print "it works" because it execute a intention for !start and the subgoal !mygoal. When the agent fails the "act" action, the intention stack fails and it will generate the event -!start. it works fine.


But, in the follow code:
====================================================================
+!start:true<-
      +mybelief..

+mybelief:true<-
        act.  //act will fail everytime.


-!start:true<-
      .print("it works!").
====================================================================

the system will generate the message : "Could not finish intention:     mybelief/ {} \n    +mybelief / {}"


I understand that in the first example I use a goal and in the second a belief. But if it use the intention stack to register the execution of the initial goal "!start", I has hoped the same behavior (fail -!start).

Thanks!
=======================================================================


Olá Desenvolvedores.

Eu criei dois exemplos de falha de ação que eu esperava tratar com o plano -!start. Só que quando eu uso um evento de crença, o sistema não gera o  evento de falha "-!start", mas sim a mensagem que falei "Cound not finish...". Isto é um erro ou eu estou esperando o comportamento errado do agente?

Thanks!

 




--
Ass: Marcos Côrtes
Mestrando Computação - UFF

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
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: problem in action fail with belief add event.

Rafael H Bordini-2
Hi Marcos,

No it's not a bug. By default, when a belief addition in a plan triggers another plan, that other plan is handle in a separate intention by default. There is an interpreter option that you set in the MAS2J file that you can use for each agent to say that in that agent you want to change the default behaviour of the interpreter so that the same intention is used for belief additions (as it is for new goals): "intBels = sameFocus"

HTH,

Rafael

On 02/04/2012 18:14, Marcos Côrtes wrote:
Hello Jason Develops....

I found a behavior that I think is a bug...

If I run the agent:
====================================================================
+!start:true<-
      !mygoal.

+!mygoal:true<-
        act.  //act will fail everytime.


-!start:true<-
      .print("it works!").
====================================================================

The system will print "it works" because it execute a intention for !start and the subgoal !mygoal. When the agent fails the "act" action, the intention stack fails and it will generate the event -!start. it works fine.


But, in the follow code:
====================================================================
+!start:true<-
      +mybelief..

+mybelief:true<-
        act.  //act will fail everytime.


-!start:true<-
      .print("it works!").
====================================================================

the system will generate the message : "Could not finish intention:     mybelief/ {} \n    +mybelief / {}"


I understand that in the first example I use a goal and in the second a belief. But if it use the intention stack to register the execution of the initial goal "!start", I has hoped the same behavior (fail -!start).

Thanks!
=======================================================================


Olá Desenvolvedores.

Eu criei dois exemplos de falha de ação que eu esperava tratar com o plano -!start. Só que quando eu uso um evento de crença, o sistema não gera o  evento de falha "-!start", mas sim a mensagem que falei "Cound not finish...". Isto é um erro ou eu estou esperando o comportamento errado do agente?

Thanks!

 




--
Ass: Marcos Côrtes
Mestrando Computação - UFF


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev


_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
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: problem in action fail with belief add event.

Marcos Côrtes
I understand :) I will try see this interpreter option and change my code...


Thanks...

Em 2 de abril de 2012 19:14, Rafael H Bordini <[hidden email]> escreveu:
Hi Marcos,

No it's not a bug. By default, when a belief addition in a plan triggers another plan, that other plan is handle in a separate intention by default. There is an interpreter option that you set in the MAS2J file that you can use for each agent to say that in that agent you want to change the default behaviour of the interpreter so that the same intention is used for belief additions (as it is for new goals): "intBels = sameFocus"

HTH,

Rafael


On 02/04/2012 18:14, Marcos Côrtes wrote:
Hello Jason Develops....

I found a behavior that I think is a bug...

If I run the agent:
====================================================================
+!start:true<-
      !mygoal.

+!mygoal:true<-
        act.  //act will fail everytime.


-!start:true<-
      .print("it works!").
====================================================================

The system will print "it works" because it execute a intention for !start and the subgoal !mygoal. When the agent fails the "act" action, the intention stack fails and it will generate the event -!start. it works fine.


But, in the follow code:
====================================================================
+!start:true<-
      +mybelief..

+mybelief:true<-
        act.  //act will fail everytime.


-!start:true<-
      .print("it works!").
====================================================================

the system will generate the message : "Could not finish intention:     mybelief/ {} \n    +mybelief / {}"


I understand that in the first example I use a goal and in the second a belief. But if it use the intention stack to register the execution of the initial goal "!start", I has hoped the same behavior (fail -!start).

Thanks!
=======================================================================


Olá Desenvolvedores.

Eu criei dois exemplos de falha de ação que eu esperava tratar com o plano -!start. Só que quando eu uso um evento de crença, o sistema não gera o  evento de falha "-!start", mas sim a mensagem que falei "Cound not finish...". Isto é um erro ou eu estou esperando o comportamento errado do agente?

Thanks!

 




--
Ass: Marcos Côrtes
Mestrando Computação - UFF


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev


_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users




--
Ass: Marcos Côrtes
Mestrando Computação - UFF

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...