can we unify variables of external actions?

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

can we unify variables of external actions?

Sura Monday
Hi All,
Inside Jason internal actions, we can unify variables. E.g. .my_name(N)

I would like to know whether the same functionality is available for user defined external actions. e.g. I would expect to have an action do_external_action(X), where X gets unified inside the executeAction method.
If it is not supported, is there any special reason for not supporting it?

Best Regards,
Sura

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
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: can we unify variables of external actions?

Rafael H Bordini-2
Hi Sura,

Yes, I'm afraid it's as you say (you can't unify variables in external actions, and there is a reason). The reason is purely conceptual though. The environment is external to the agent. The agent tries to do something in the environment and it either actually happen or perhaps something prevents from the action even taking place. If it does take place, there will be some consequence in the state of the environment, which will be eventually perceived and therefore affecting the agent's beliefs. That effect might be what the agent expected it to be, or maybe not (in non-deterministic environments, etc.).

HTH,

Rafael

On 20/09/2012 04:21, Sura Monday wrote:
Hi All,
Inside Jason internal actions, we can unify variables. E.g. .my_name(N)

I would like to know whether the same functionality is available for user defined external actions. e.g. I would expect to have an action do_external_action(X), where X gets unified inside the executeAction method.
If it is not supported, is there any special reason for not supporting it?

Best Regards,
Sura


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html


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


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
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: can we unify variables of external actions?

Sura Monday
In reply to this post by Sura Monday
Hi Rafael,
Many thanks for the response. I would like to know whether this can be achieved by accessing the intention, e.g. to implement a type of sensing action with an unbound variable as one argument. Such a mechanism is useful if, for example, the agent has to execute a database query and get back the result.

Regards,
Sura

Date: Fri, 21 Sep 2012 09:27:36 -0300
From: Rafael H Bordini <[hidden email]>
Subject: Re: [Jason-users] can we unify variables of external actions?
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Sura,

Yes, I'm afraid it's as you say (you can't unify variables in external
actions, and there is a reason). The reason is purely conceptual though.
The environment is external to the agent. The agent tries to do
something in the environment and it either actually happen or perhaps
something prevents from the action even taking place. If it does take
place, there will be some consequence in the state of the environment,
which will be eventually perceived and therefore affecting the agent's
beliefs. That effect might be what the agent expected it to be, or maybe
not (in non-deterministic environments, etc.).

HTH,

Rafael

On 20/09/2012 04:21, Sura Monday wrote:

> Hi All,
> Inside Jason internal actions, we can unify variables. E.g. .my_name(N)
>
> I would like to know whether the same functionality is available for
> user defined external actions. e.g. I would expect to have an action
> do_external_action(X), where X gets unified inside the executeAction
> method.
> If it is not supported, is there any special reason for not supporting it?
>
> Best Regards,
> Sura
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>
>
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 5
Date: Fri, 21 Sep 2012 09:36:37 -0300
From: Rafael H Bordini <[hidden email]>
Subject: Re: [Jason-users] Update rate of Jason?
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Alan,

Many thanks for commenting on this issue, it will be very helpful to
others.

Unfortunately there is no magic solution when the environment naturally
generates too many percepts too frequently. The designer will either
have to abstract way and filter only events that the agent will be able
to handle, or cope with it in various ways. In some cases, it's possible
that the agent doesn't have to be so reactive (not the case Alan
mentioned though) and perhaps waiting a bit before doing perception and
then only considering the latest state is feasible; in that case, there
is a parameter that can be passed on to the interpreter to say  how
often to do perception of the environment. That is, you could say that
the agent would do N full reasoning cycles before it's allowed to get
belief updates from the environment again.

Sorry we cannot help with that, it's a well known problem that needs to
be tackled by domain-dependent techniques.

Cheers,

Rafael

On 20/09/2012 06:13, Alan Gordon White wrote:

> Just to echo this;  I came across an issue recently where if an action
> generates a lot of percepts (in this example, a movement action that
> generated a new 'at' percept with every 100ms incremental update), it
> seems quite possible for the agent to receive the action result in
> advance of receiving and handling all the relevant percept update
> events.
>
> I basically sidestepped it by reducing the generation rate of
> percepts, but I can see it being a problem (depending on whether
> you're using the BB at selectIntention, etc as I am) when having
> percept-heavy environments, particularly if actions run less than,
> say, a second and generate interim percepts during their execution.
>
> Not sure if a code change or anything would be mandated as such (I can
> think of several workarounds); I'm just posting this for posterity if
> anyone has a similar issue and searches the message list.
>
> Quoting Vin Baines <[hidden email]> on Wed, 19 Sep 2012 21:23:52 +0100:
>
>> Hi all,
>>
>> Is there a setting for update cycle rate anywhere in Jason?
>>
>> I have a custom Environment, where vehicle positions are received via
>> XMPP messages. I've been looking at increasing the rate these messages
>> are sent, and the reliability of behaviours seems to get worse at
>> higher rates.
>>
>> If I just do a simple test of outputting a message when a position
>> belief is received, they seem to be processed 1 second.
>>
>> So, I'm trying to see if its something I've left coded in (originally
>> I had everything at 1 second updates!), but I can't see any sleep type
>> processes left.
>>
>> So I'm wondering if there is a default 1 second update cycle in Jason
>> architecture somewhere?
>>
>> Thanks
>>
>> Vin
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Jason-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jason-users
>>
>>
>
>




------------------------------

Message: 6
Date: Fri, 21 Sep 2012 10:46:06 -0300
From: Jomi Hubner <[hidden email]>
Subject: Re: [Jason-users] Update rate of Jason?
To: [hidden email]
Cc: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=iso-8859-1

Hi Alan,

a similar problem is being investigated by Stephen Cranefield, you can find some pointers at
    http://www.dagstuhl.de/mat/Files/12/12342/12342.CranefieldStephen.Slides.pdf

HTH,

Jomi

On 21/09/2012, at 09:36, Rafael H Bordini wrote:

> Hi Alan,
>
> Many thanks for commenting on this issue, it will be very helpful to
> others.
>
> Unfortunately there is no magic solution when the environment naturally
> generates too many percepts too frequently. The designer will either
> have to abstract way and filter only events that the agent will be able
> to handle, or cope with it in various ways. In some cases, it's possible
> that the agent doesn't have to be so reactive (not the case Alan
> mentioned though) and perhaps waiting a bit before doing perception and
> then only considering the latest state is feasible; in that case, there
> is a parameter that can be passed on to the interpreter to say  how
> often to do perception of the environment. That is, you could say that
> the agent would do N full reasoning cycles before it's allowed to get
> belief updates from the environment again.
>
> Sorry we cannot help with that, it's a well known problem that needs to
> be tackled by domain-dependent techniques.
>
> Cheers,
>
> Rafael
>
> On 20/09/2012 06:13, Alan Gordon White wrote:
>> Just to echo this;  I came across an issue recently where if an action
>> generates a lot of percepts (in this example, a movement action that
>> generated a new 'at' percept with every 100ms incremental update), it
>> seems quite possible for the agent to receive the action result in
>> advance of receiving and handling all the relevant percept update
>> events.
>>
>> I basically sidestepped it by reducing the generation rate of
>> percepts, but I can see it being a problem (depending on whether
>> you're using the BB at selectIntention, etc as I am) when having
>> percept-heavy environments, particularly if actions run less than,
>> say, a second and generate interim percepts during their execution.
>>
>> Not sure if a code change or anything would be mandated as such (I can
>> think of several workarounds); I'm just posting this for posterity if
>> anyone has a similar issue and searches the message list.
>>
>> Quoting Vin Baines <[hidden email]> on Wed, 19 Sep 2012 21:23:52 +0100:
>>
>>> Hi all,
>>>
>>> Is there a setting for update cycle rate anywhere in Jason?
>>>
>>> I have a custom Environment, where vehicle positions are received via
>>> XMPP messages. I've been looking at increasing the rate these messages
>>> are sent, and the reliability of behaviours seems to get worse at
>>> higher rates.
>>>
>>> If I just do a simple test of outputting a message when a position
>>> belief is received, they seem to be processed 1 second.
>>>
>>> So, I'm trying to see if its something I've left coded in (originally
>>> I had everything at 1 second updates!), but I can't see any sleep type
>>> processes left.
>>>
>>> So I'm wondering if there is a default 1 second update cycle in Jason
>>> architecture somewhere?
>>>
>>> Thanks
>>>
>>> Vin
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Jason-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/jason-users
>>>
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florian?polis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi




------------------------------

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html

------------------------------

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


End of Jason-users Digest, Vol 54, Issue 2
******************************************



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
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: can we unify variables of external actions?

Rafael H Bordini-2
Hi Sura,

In the Jason architecture a sensing action would only make sense if you configure the interpreter not to do perception at every reasoning cycle and then for some reason you want to force perception. Still perception would change the belief base and changes to belief base could potentially trigger plans in the agent's plan library.

If you're interested in using a data-base as part of the belief-base, there is a demo in the demos folder that shows how to do that. If you want to use a different approach, the type of "sensing action" that your refer to would be an INTERNAL action, not an external one. There are many examples of how to unify variables in a plan through an internal action. Yet another approach would be to use the integration of Jason and Cartago and use an artefact to encapsulate access to the database. Still, you'd get info from the artifact through the agents beliefs.

cheers

Rafael


On 21/09/2012 23:36, Sura Monday wrote:
Hi Rafael,
Many thanks for the response. I would like to know whether this can be achieved by accessing the intention, e.g. to implement a type of sensing action with an unbound variable as one argument. Such a mechanism is useful if, for example, the agent has to execute a database query and get back the result.

Regards,
Sura

Date: Fri, 21 Sep 2012 09:27:36 -0300
From: Rafael H Bordini <[hidden email]>
Subject: Re: [Jason-users] can we unify variables of external actions?
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Sura,

Yes, I'm afraid it's as you say (you can't unify variables in external
actions, and there is a reason). The reason is purely conceptual though.
The environment is external to the agent. The agent tries to do
something in the environment and it either actually happen or perhaps
something prevents from the action even taking place. If it does take
place, there will be some consequence in the state of the environment,
which will be eventually perceived and therefore affecting the agent's
beliefs. That effect might be what the agent expected it to be, or maybe
not (in non-deterministic environments, etc.).

HTH,

Rafael

On 20/09/2012 04:21, Sura Monday wrote:
> Hi All,
> Inside Jason internal actions, we can unify variables. E.g. .my_name(N)
>
> I would like to know whether the same functionality is available for
> user defined external actions. e.g. I would expect to have an action
> do_external_action(X), where X gets unified inside the executeAction
> method.
> If it is not supported, is there any special reason for not supporting it?
>
> Best Regards,
> Sura
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>
>
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 5
Date: Fri, 21 Sep 2012 09:36:37 -0300
From: Rafael H Bordini <[hidden email]>
Subject: Re: [Jason-users] Update rate of Jason?
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Alan,

Many thanks for commenting on this issue, it will be very helpful to
others.

Unfortunately there is no magic solution when the environment naturally
generates too many percepts too frequently. The designer will either
have to abstract way and filter only events that the agent will be able
to handle, or cope with it in various ways. In some cases, it's possible
that the agent doesn't have to be so reactive (not the case Alan
mentioned though) and perhaps waiting a bit before doing perception and
then only considering the latest state is feasible; in that case, there
is a parameter that can be passed on to the interpreter to say  how
often to do perception of the environment. That is, you could say that
the agent would do N full reasoning cycles before it's allowed to get
belief updates from the environment again.

Sorry we cannot help with that, it's a well known problem that needs to
be tackled by domain-dependent techniques.

Cheers,

Rafael

On 20/09/2012 06:13, Alan Gordon White wrote:
> Just to echo this;  I came across an issue recently where if an action
> generates a lot of percepts (in this example, a movement action that
> generated a new 'at' percept with every 100ms incremental update), it
> seems quite possible for the agent to receive the action result in
> advance of receiving and handling all the relevant percept update
> events.
>
> I basically sidestepped it by reducing the generation rate of
> percepts, but I can see it being a problem (depending on whether
> you're using the BB at selectIntention, etc as I am) when having
> percept-heavy environments, particularly if actions run less than,
> say, a second and generate interim percepts during their execution.
>
> Not sure if a code change or anything would be mandated as such (I can
> think of several workarounds); I'm just posting this for posterity if
> anyone has a similar issue and searches the message list.
>
> Quoting Vin Baines <[hidden email]> on Wed, 19 Sep 2012 21:23:52 +0100:
>
>> Hi all,
>>
>> Is there a setting for update cycle rate anywhere in Jason?
>>
>> I have a custom Environment, where vehicle positions are received via
>> XMPP messages. I've been looking at increasing the rate these messages
>> are sent, and the reliability of behaviours seems to get worse at
>> higher rates.
>>
>> If I just do a simple test of outputting a message when a position
>> belief is received, they seem to be processed 1 second.
>>
>> So, I'm trying to see if its something I've left coded in (originally
>> I had everything at 1 second updates!), but I can't see any sleep type
>> processes left.
>>
>> So I'm wondering if there is a default 1 second update cycle in Jason
>> architecture somewhere?
>>
>> Thanks
>>
>> Vin
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Jason-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jason-users
>>
>>
>
>




------------------------------

Message: 6
Date: Fri, 21 Sep 2012 10:46:06 -0300
From: Jomi Hubner <[hidden email]>
Subject: Re: [Jason-users] Update rate of Jason?
To: [hidden email]
Cc: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=iso-8859-1

Hi Alan,

a similar problem is being investigated by Stephen Cranefield, you can find some pointers at
    http://www.dagstuhl.de/mat/Files/12/12342/12342.CranefieldStephen.Slides.pdf

HTH,

Jomi

On 21/09/2012, at 09:36, Rafael H Bordini wrote:

> Hi Alan,
>
> Many thanks for commenting on this issue, it will be very helpful to
> others.
>
> Unfortunately there is no magic solution when the environment naturally
> generates too many percepts too frequently. The designer will either
> have to abstract way and filter only events that the agent will be able
> to handle, or cope with it in various ways. In some cases, it's possible
> that the agent doesn't have to be so reactive (not the case Alan
> mentioned though) and perhaps waiting a bit before doing perception and
> then only considering the latest state is feasible; in that case, there
> is a parameter that can be passed on to the interpreter to say  how
> often to do perception of the environment. That is, you could say that
> the agent would do N full reasoning cycles before it's allowed to get
> belief updates from the environment again.
>
> Sorry we cannot help with that, it's a well known problem that needs to
> be tackled by domain-dependent techniques.
>
> Cheers,
>
> Rafael
>
> On 20/09/2012 06:13, Alan Gordon White wrote:
>> Just to echo this;  I came across an issue recently where if an action
>> generates a lot of percepts (in this example, a movement action that
>> generated a new 'at' percept with every 100ms incremental update), it
>> seems quite possible for the agent to receive the action result in
>> advance of receiving and handling all the relevant percept update
>> events.
>>
>> I basically sidestepped it by reducing the generation rate of
>> percepts, but I can see it being a problem (depending on whether
>> you're using the BB at selectIntention, etc as I am) when having
>> percept-heavy environments, particularly if actions run less than,
>> say, a second and generate interim percepts during their execution.
>>
>> Not sure if a code change or anything would be mandated as such (I can
>> think of several workarounds); I'm just posting this for posterity if
>> anyone has a similar issue and searches the message list.
>>
>> Quoting Vin Baines <[hidden email]> on Wed, 19 Sep 2012 21:23:52 +0100:
>>
>>> Hi all,
>>>
>>> Is there a setting for update cycle rate anywhere in Jason?
>>>
>>> I have a custom Environment, where vehicle positions are received via
>>> XMPP messages. I've been looking at increasing the rate these messages
>>> are sent, and the reliability of behaviours seems to get worse at
>>> higher rates.
>>>
>>> If I just do a simple test of outputting a message when a position
>>> belief is received, they seem to be processed 1 second.
>>>
>>> So, I'm trying to see if its something I've left coded in (originally
>>> I had everything at 1 second updates!), but I can't see any sleep type
>>> processes left.
>>>
>>> So I'm wondering if there is a default 1 second update cycle in Jason
>>> architecture somewhere?
>>>
>>> Thanks
>>>
>>> Vin
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Jason-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/jason-users
>>>
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florian?polis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi




------------------------------

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html

------------------------------

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


End of Jason-users Digest, Vol 54, Issue 2
******************************************




------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html


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


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...