Question: Based on the book trading scenario below ( reproduced from Chapter 2 of the Java Agent Development ( JADE ) tutorial ( 2 0 0

Based on the book trading scenario below (reproduced from Chapter 2 of the Java Agent Development (JADE) tutorial (2009)), write a Java program (not in JADE), to simulate the agent behaviour and transactions as described in this scenario. Note that the interactions follow a variant of the Contract-Net protocol. [Hint: For this simulation, agents do not need to be physically distributed and can therefore invoke each other's methods directly and no network programming is required.]
This scenario includes some agents selling books and other agents buying books on behalf of their users. Each buyer agent receives the title of the book to buy (the target book) as a command line argument (or otherwise) and periodically requests all known seller agents to provide an offer. As soon as an offer is received the buyer agent accepts it and issues a purchase order. If more than one seller agent provides an offer the buyer agent accepts the best one (lowest price). Having bought the target book the buyer agent terminates the interaction. You may wish to include a broker agent, which can facilitate the interactions between buyer agents and seller agents, but this is entirely optional.
Each seller agent has a minimal user interface by means of which the user can insert new titles (and the associated price) in the local catalogue of books for sale. Seller agents continuously wait for requests from buyer agents. When asked to provide an offer for a book they check if the requested book is in their catalogue and in this case reply with the price. Otherwise they do not respond (refuse). When they receive a purchase order they serve it and remove the requested (copy of the) book from their catalogue.
All issues related to electronic payment are beyond the scope of this exercise.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!