agent to agent communication

268 views
Skip to first unread message

Srirama Bhamidipati

unread,
Sep 9, 2014, 1:48:13 AM9/9/14
to gama-p...@googlegroups.com
Hi,

I would like to extend a little bit on my model and include agent-to-agent communication, in a sense that an agent (driver) is able to inform another (driver) about a bad route on a network so that the other driver takes other route, or may be ask other driver to pick something from home or somewhere. I do not know which skill or module of gama to use. any tips please? :)

regards,
Srirama

Alexis Drogoul

unread,
Sep 9, 2014, 3:25:19 AM9/9/14
to gama-p...@googlegroups.com
Hi,

Actually, it really depends on your needs. Implementing « instant communication » between agents is easy, for instance:

species driver {

list<list> messages <- [];

action receive(list message) {
messages << message;
}

action send(list message, driver to) {
to.receive(message);
}

action manage() {
loop message over: messages {
driver sender <- message[0];
road r <- message[1];
float time <- message[2];
… do whatever is needed with these information …
}
messages <- [];
}

action example_talk() {
list message <- [];
driver to <- one_of(driver - self);
message << self; // the sender
message << road overlapping self ; // the data, whatever it is, here the road on which I am
message << cycle ; // other stuff (it really depends on how you want the messages to be formatted), here the current cycle
}
}


This is just an example, of course, and you might want to delay the reception of messages, or make the agents manage one at a time, etc.

If you want something more structured, which could enable dialogs between agents, you should go for the « communicating » skill, which implements the FIPA Agent Communication Language.

Hope this helps !

Cheers
Alexis
> --
> You received this message because you are subscribed to the Google Groups "GAMA" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
> To post to this group, send email to gama-p...@googlegroups.com.
> Visit this group at http://groups.google.com/group/gama-platform.
> For more options, visit https://groups.google.com/d/optout.

--
Senior Researcher, UMI UMMISCO 209, IRD & UPMC, France.
Invited Researcher, DREAM, Can Tho University, Viet Nam.
--
alexis....@gmail.com | http://tiny.cc/liqemw
[Vietnam] +84915088155 [France] +33608698845
--
GAMA: https://code.google.com/p/gama-platform/

Srirama Bhamidipati

unread,
Sep 11, 2014, 6:30:19 AM9/11/14
to gama-p...@googlegroups.com
Hi Alexis,

Thank you. I think I will go for the second option. I checked the FIPA from the model library, the look really simplistic. I will try understanding them and later may be ask more questions.

many thanks
srirama

Srirama Bhamidipati

unread,
Nov 6, 2014, 9:46:54 AM11/6/14
to gama-p...@googlegroups.com

Hi,

Can somebody point me to more FIPA examples ?

thanks
Srirama

Duc An Vo

unread,
Nov 6, 2014, 9:35:56 PM11/6/14
to gama-p...@googlegroups.com
Hello Srirama,

FIPA examples in the model library are intentionally kept simple for the illustrative purpose.

Please find in the attachment 2 examples that hopefully may be useful for your case.
One example implements the communication between drivers using 'no-protocol'. Il enables a driver to inform another driver about the situation of a road. The other example illustrates how to use 'fipa-request' protocol which helps a driver to ask another driver to go picking something on a road.

You may combine these examples and adapt them a little bit for your case.

Cheers,
An.

--
communicating_driver_fipa-request.gaml
communicating_driver_no-protocol.gaml

Srirama Bhamidipati

unread,
Nov 6, 2014, 10:50:29 PM11/6/14
to gama-p...@googlegroups.com
Hi An,

Thank you very much. I will look into these. One small question: i have found some FIPA texts and articles online with some examples and structure of the protocol, if I learn from those, would it be very different to GAMA implementation, which portion of FIPA protocol should I focus more on, so that I can translate those online text/ article / examples for easy implementation in GAMA.

many thanks again
Srirama

Duc An Vo

unread,
Nov 6, 2014, 11:09:06 PM11/6/14
to gama-p...@googlegroups.com
Hi Srirama,

The FIPA documentation in the GAMA doc (page 269) gives the description of built-in variables and actions of agents with "communicating" skill. It is useful to have a look at it to know what we can do with this skill in GAML. Then the models examples illustrates how the skill works with some very simple cases.

As Alexis said, there are many ways to implement the agent communication in GAMA. For example, we can do it without the "communicating" skill (c.f. example of Alexis). Or we can use the "communicating" skill if we want our agents to communicate in a FIPA style. Concerning the FIPA protocol that we should focus, it depends a lot on what you want to do with your agents.

From my experience, in many cases, the set of standard FIPA protocols do not always well reflect the communicating behaviour of our agents. So GAMA offers a free-style protocol name 'no-protocol' in which the modeller can send whatever types of message (i.e., the message performative). One point to remember when using this protocol is that the modeller needs to be responsible for marking the end of a conversation by using the 'end_conversation' action.

Cheers,
An.

--
Reply all
Reply to author
Forward
0 new messages