Quantcast

abolish beliefs where not equal to new belief..?

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

abolish beliefs where not equal to new belief..?

Vin Baines
Hi All,

Well, after adjusting my simulation refresh rates following the recent  
discussions, things are looking better.

But, I have a problem with one of the agents, a 'driver' agent. This  
receives a belief update +entityUpdate(X,Y,Z,Heading) from the control  
agent - interface to simulation. But, as this happens frequently, I  
have a driver agent with an ever increasing number of beliefs for  
where it is! I think this is causing problems, and doesn't make sense  
for the driver too.

I tried doing something like the control agent telling the driver  
agent a temp value:

+updatedTempPositionHolder(PosX, PosY, PosZ, Heading) : true  
                                                                        .abolish(entityUpdate(_,_,_,_)); +entityUpdate(PosX,  
PosY, PosZ,  
Heading); .abolish(updatedTempPositionHolder(_,_,_,_,_,_,_)).

Which, almost does what I want, as the driver belief for where it is  
stays at zero.

But, there is a chance that another plan will get called, which relies  
on the entityUpdate belief, and is called inbetween the abolish and  
add. I think I have seen this happening a few times, which breaks  
things. Plus, this doesnt seem very eloquent either, adding a belief  
just to manage another belief.

So, is there someway that on receiving a new belief, all the previous  
beliefs are removed while the new belief stays present? In Java it  
would seem easy, but I can't see how to handle it here. I've tried a  
few variations without luck, the 'not provable' \+ sounded like it  
might work, but I tried, and not sure it works inside an abolish?

I guess, worst case, I could write some Java action to handle this  
where it manages the belief base directly, but maybe there's something  
easier?

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: abolish beliefs where not equal to new belief..?

Jomi Hubner
Hi Vin,

I guess that if you define your plan as "atomic" the problem will be solved:

@upBel[atomic]
+updatedTempPositionHolder(PosX, PosY, PosZ, Heading) : true  
        ......

HTH,

Jomi


On 24/09/2012, at 15:30, Vin Baines wrote:

> Hi All,
>
> Well, after adjusting my simulation refresh rates following the recent  
> discussions, things are looking better.
>
> But, I have a problem with one of the agents, a 'driver' agent. This  
> receives a belief update +entityUpdate(X,Y,Z,Heading) from the control  
> agent - interface to simulation. But, as this happens frequently, I  
> have a driver agent with an ever increasing number of beliefs for  
> where it is! I think this is causing problems, and doesn't make sense  
> for the driver too.
>
> I tried doing something like the control agent telling the driver  
> agent a temp value:
>
> +updatedTempPositionHolder(PosX, PosY, PosZ, Heading) : true  
> .abolish(entityUpdate(_,_,_,_)); +entityUpdate(PosX,  
> PosY, PosZ,  
> Heading); .abolish(updatedTempPositionHolder(_,_,_,_,_,_,_)).
>
> Which, almost does what I want, as the driver belief for where it is  
> stays at zero.
>
> But, there is a chance that another plan will get called, which relies  
> on the entityUpdate belief, and is called inbetween the abolish and  
> add. I think I have seen this happening a few times, which breaks  
> things. Plus, this doesnt seem very eloquent either, adding a belief  
> just to manage another belief.
>
> So, is there someway that on receiving a new belief, all the previous  
> beliefs are removed while the new belief stays present? In Java it  
> would seem easy, but I can't see how to handle it here. I've tried a  
> few variations without luck, the 'not provable' \+ sounded like it  
> might work, but I tried, and not sure it works inside an abolish?
>
> I guess, worst case, I could write some Java action to handle this  
> where it manages the belief base directly, but maybe there's something  
> easier?
>
> 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


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