perceive functionality

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

perceive functionality

Michalis Mamakos
Hello there,

Being a new Jason developer I would like to ask the following.
Assuming that my environment class extends the Environment class(i.e not the TimeSteppedEnvironment one)
and being aware of the fact that at each reasoning cycle there can perceived many percepts(via the addPercept function) from which only one is finally chosen in order to trigger an event,
my question is how can I be sure that the perceive function is called after all of the desired calls of the addPercept function, so that all the percepts I want to be added before the beginning of the reasoning cycle really are. When is the perceive function called?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: perceive functionality

Rafael H Bordini-2
Hi Michalis,

In the normal execution mode each agent and the environment are all
asynchronous. That is, the environment keeps changing depending on the
actions being executed by all the agents and each agent perceives the
environment (by calling the perceive method) at the beginning of each of
its own "reasoning cycles". In fact in extremely dynamic environments,
it's even possible that the agent perceives the environment, the
environment changes to a new state and then back to its old state and
only then that agent perceives the environment again, therefore not
realised that the change took place, for example.

I'm not sure I understand why you need various percepts added before a
particular reasoning cycle begins. Feel free to contact us if you need
more specific help.

Cheers,

Rafael


On 20/07/2013 09:33, Michalis Mamakos wrote:

> Hello there,
>
> Being a new Jason developer I would like to ask the following.
> Assuming that my environment class extends the Environment class(i.e not the
> TimeSteppedEnvironment one)
> and being aware of the fact that at each reasoning cycle there can perceived
> many percepts(via the addPercept function) from which only one is finally
> chosen in order to trigger an event,
> my question is how can I be sure that the perceive function is called after
> all of the desired calls of the addPercept function, so that all the
> percepts I want to be added before the beginning of the reasoning cycle
> really are. When is the perceive function called?
>
>
>
> --
> View this message in context: http://jason.2324890.n4.nabble.com/perceive-functionality-tp719.html
> Sent from the jason-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
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: perceive functionality

Michalis Mamakos
Hi Rafael and thanks for your answer,

The reason I need many percepts to be added in a particular cycle is that I am writing an extension of netlogo in which Jason is used as the "mind" of the agent whilst the "body of the agent and the environment are in netlogo, so before the start of a particular reasoning cycle there have to passed many percepts from the environment(netlogo) to the environment of jason so that the addPercept function is called and an event is finally triggered.
What I am still searching for is how can I be sure that the perceive function will not be called before I have called the addPercept function as many times as I want.
That's why I tried to point out at my initial post that I am aware of the fact that at the beginning of a reasoning cycle the agent can receive many percepts from which only one triggers an event.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: perceive functionality

Rafael H Bordini-2
Dear Michalis,

The Netlogo model is more similar to the TimeStepped environment that
you mentioned. Also, let me point out a different, perhaps cleaner,
approach to what you want to do. Rather than using a Jason environment
to connect to Netlogo, it might be better to create a customised
architecture where you can override the perceive() method. This method
would make sure all percepts are received before the next reasoning
cycle goes ahead.

Cheers,

Rafael


On 21/07/2013 05:56, Michalis Mamakos wrote:

> Hi Rafael and thanks for your answer,
>
> The reason I need many percepts to be added in a particular cycle is that I
> am writing an extension of netlogo in which Jason is used as the "mind" of
> the agent whilst the "body of the agent and the environment are in netlogo,
> so before the start of a particular reasoning cycle there have to passed
> many percepts from the environment(netlogo) to the environment of jason so
> that the addPercept function is called and an event is finally triggered.
> What I am still searching for is how can I be sure that the perceive
> function will not be called before I have called the addPercept function as
> many times as I want.
> That's why I tried to point out at my initial post that I am aware of the
> fact that at the beginning of a reasoning cycle the agent can receive many
> percepts from which only one triggers an event.
>
>
>
> --
> View this message in context: http://jason.2324890.n4.nabble.com/perceive-functionality-tp719p722.html
> Sent from the jason-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
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: perceive functionality

Michalis Mamakos
This post has NOT been accepted by the mailing list yet.
Dear Rafael,

What you suggest really sounds as the correct approach to what I want to make, so I will head towards that direction.
If you don't mind, I have one more question.
At the second step of the reasoning cycle, when the update of the bb occurs,
according to the book "Programming Multi Agent Systems in AgentSpeak using Jason",
each literal in bb that no longer exists in the current percepts is deleted from the bb.
So, I would like to ask you how this happens, since when I use the addPercept function this does not occur.

Loading...