swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Swarm help


From: Trushar Panchal
Subject: Swarm help
Date: Thu, 27 Jun 2002 14:20:45 +0100

Hi,

 

I am having a slight confusion understanding some aspects of Swarm. I am trying to simulate agent behaviour and try to find some results of the experiment. My simulation goes like this

 

Create only 2 agents with different perception and understanding (with extension to agents possible easily)

Make a space available so 2 agents can live in it. (World)

Before that the World has been assigned specified random value (between 1 – 10, putValue$At$X$Y method)

Task to find value 1 in the World and try to agree that both are watching the same thing even though the perception is different.

Start Agents with the control panel.

Agent Behaviour is as follows

Agents move randomly

Once agent finds the specified no. on the pxl it stops (may be the other agent is still moving to find the specified no.)

Generate a label according to its perception. (other agents once reaching does the same)

Exchange the label (who so is first send the label first)

Checks the label if same then they agree that they both see the same thing

If not then they with Mathematical algorithms try to come closer to each other to find if they are able to agree.

Still not able to agree then they jump on the position of the other agent and find out their perception s different so they are not able to agree that the value is same.

 

Here I am having problems if I can do this type of experiment with Swarm.

Another thing I am having problems with Scheduling and Action building. I am not sure what is the main purpose of this and if I have to put all the actions in the schedule.

 

ObserverSwarm.java

Grid created. Colouring the grid with black and two agents with red and blue. Control panel created. Action build and schedule build.

 

ModelSwarm.java

Creating a probe with costomised values to be displayed. Graphs for the perception. Action build and schedule build.

 

AgentBehaviour.java

I have created two objects representing 2 agents. All the behaviour ie randomMoveAgent1 and randomMoveAgent2 methods from that Label generation method is evoked once randomMove achieves its target. Then messages are passed for exchanging the labels to the Agreement method. And another method is also there to come closer to each other if the agreement method is failed.

 

AssignValue.java

Here the World is seeded with Values randomly between 1 -10

 

My problem is do I have to put all the methods in the action and schedule or I will be fine if only RandomMove is kept and from that other methods are evoked. Also I have a schedule like first RandomMove then stop then calculate label then exchange with each other then try to agree if yes then start again if no then call another method to come closer to each other.

 

Can you help me in putting things right in the right place so I can get my simulation working. Thanks a lot.

 

Regards

Trushar


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 24/05/2002


reply via email to

[Prev in Thread] Current Thread [Next in Thread]