Giter Site home page Giter Site logo

sajas's Introduction

SAJaS

SAJaS, the Simple API for JADE-based Simulations, implements a simplified version of many JADE features in a manner that makes it possible to create faster JADE-like simulations, which don't need or make use of JADE's distributed infractured.

In this first Alpha, we have sully implemented the Contract Net and AchieveRE protocols, as well as other services needed to make them work.

sajas's People

Contributors

lopis avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

sajas's Issues

Add support for template memory in MailBox

The Mailbox performs a plain search in the mail array, which means that each access is always O(N). When a new message arrives, it would be useful to save this e-mail in a container identified by the Message Template that matches that message.

However, multiple templates can match the same message. An HashMap works in a 1:N way. A possible way to deal with it is to save the Message in multiple containers in the hash map, since Maps and Lists use references to the objects. So, something like

HashMap<MessageTemplate, ArrayList<ACLMessage> > mail

and every time new mail arrives

for each template in mail.keySet
    if newMessage.match(template)
    then mail.get(template).add(mail)

Issues with this approach:

  • If a new template is added, the whole mail box must be search again to add the current mail
  • When a message is removed from the mail box, it must be removed from every single template where it appears. One possible way to deal with this is to have reference redundancy between the ACLMessage and the MailBox (the message contains a list of its templates) which is less than ideal.

The Contract Net Initiator accepts many proposals from each agent

When a PROPOSE arrives, the initiator removes the responder for the waiting list. If he is not in the list, nothing is done. Is this intended? An agent can send multiple proposals? Is there a handle to accept/reject/update propose? There is the "acceptances" list and the "responses" list. They probably hold a different set of values in this case.

    // Since we know the message matches the template,
    // we can assume it's a valid propose or refuse.
    cNetInit.responses.add(m);

    // Remove the sender from the list  
    cNetInit.responders.remove(m.getSender());  

Behaviors must verify if replies are not out-of-sequence

I.e., some response types may be expected but may arrive in unexpected sequence. For instance, in the AchieveRE protocol, an "inform" may arrive before or after an "accept" but an "accept" can never arrive after an "inform" (assuming they all come from the same agent).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.