Communication between agents through messages [message #760697] |
Sun, 04 December 2011 06:07  |
Eclipse User |
|
|
|
I was wondering how I could model agents communicating by sending and receiving messages. For example, say that we have 2 types of agents, buyers and sellers. A seller has an attribute that contains the price of a product. If a buyer wants to ask the price of the product, he should send a message to the seller and the seller should reply by sending back to the buyer a message telling him about the price.
Up to now I have thought that if a buyer wants to use the price of the product (an attribute of the seller) he could just write
a = seller.getPrice();
since the classes buyer and seller are in the same package. However, I think that this is not so realistic because in real applications an agent cannot have access in the attributes of another agent. He can only ask the other agent to give him such information.
|
|
|
Re: Communication between agents through messages [message #760749 is a reply to message #760697] |
Mon, 05 December 2011 00:32  |
Eclipse User |
|
|
|
giorgos wrote on Sun, 04 December 2011 06:07Up to now I have thought that if a buyer wants to use the price of the product (an attribute of the seller) he could just write
a = seller.getPrice();
since the classes buyer and seller are in the same package. However, I think that this is not so realistic because in real applications an agent cannot have access in the attributes of another agent. He can only ask the other agent to give him such information.
I'm away from the office for the week, but one quick thought.. There are two issues here:
a) Are the mechanics 'realistic'?
b) Are the mechanics *implemented* in a 'realistic' way?
Do you see my point?
So in the base case where you are modeling say a simple market interaction, you *could* create a message passing mechanism where an agent sent a price query to another agent. But that would be pointless in terms of the actual model execution if the agent always sent as a response it's own internal price state. If on the other hand, you wish to model negotiation, deception, etc.. then you would need to build in some kind of price messaging implementation.
In fact, in this case what you would probably want to implement would be an exchange of some sort. I've built a few of those and you can get some really interesting dynamics from it.
|
|
|
Powered by
FUDForum. Page generated in 0.03881 seconds