Quantcast

Update rate of Jason?

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

Update rate of Jason?

Vin Baines
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update rate of Jason?

Jomi Hubner
Dear Vin,

I am not sure whether I am answering your question, but I'll try anyway.

Jason agents go to sleep when there is nothing to do (no messages, perception, intentions, ...). They usually wake up each second to see if there is something to process. The environment integration is responsible to wake up the agents sooner if a more responsiveness behavior is required. The AgArch.wake() method can be used for that in case you have a customised architecture.

HTH,

Jomi


On 19/09/2012, at 17:23, Vin Baines wrote:

> 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

--
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


------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update rate of Jason?

Rafael H Bordini-2
In reply to this post by Vin Baines
see post by Augusto Radtke below

Not sure either but if you are running synchronised there is a 500ms sleep that tick the cycle if there is nothing to do. Check out the CentralisedAgArch.sleep() if that is your current architecture.

Augusto

On Wed, Sep 19, 2012 at 5:44 PM, Jomi Hubner <[hidden email]> wrote:
Dear Vin,

I am not sure whether I am answering your question, but I'll try anyway.

Jason agents go to sleep when there is nothing to do (no messages, perception, intentions, ...). They usually wake up each second to see if there is something to process. The environment integration is responsible to wake up the agents sooner if a more responsiveness behavior is required. The AgArch.wake() method can be used for that in case you have a customised architecture.

HTH,

Jomi


On 19/09/2012, at 17:23, Vin Baines wrote:

> 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

--
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


------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update rate of Jason?

Vin Baines
Brilliant! Thanks everyone! In the environment class, I added

informAgsEnvironmentChanged(agNameSend);

As I already know the name of the agent who has just had percepts  
updated. I couldn't see an easy way to access .wake() but it looks  
like this does the same thing.. and the result is just what I wanted!  
Well.. it fixed one problem, now I've found another :)

Quoting Rafael H Bordini <[hidden email]>:

> see post by Augusto Radtke below




------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update rate of Jason?

Alan Gordon White
In reply to this post by Vin Baines
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
>
>



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



------------------------------------------------------------------------------
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: Update rate of Jason?

Rafael H Bordini-2
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update rate of Jason?

Jomi Hubner
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update rate of Jason?

Vin Baines
In reply to this post by Alan Gordon White
Hi All,

Resurrecting a slightly old topic, I wondered if anyone has seen /  
published any findings or data on data frequency issues in Jason, or  
BDI in general?

In the work I'm doing with vehicle convoys using Jason, there are  
varying needs for data update rates - e.g. the 3D view would like to  
run at 30fps with position updates at that interval, for Jason agents  
such a high frequency will not be processed sensibly (and yes,  
probably isn't appropriate anyway).

Thanks,

Vincent

Quoting Alan Gordon White <[hidden email]>:

> 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
>>
>>
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
> ------------------------------------------------------------------------------
> 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




------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...