Building a Multi-Agent System with Cloud Haskell



What is this? A project idea for a computer science dissertation, or a hobby project for anyone!
The idea: Develop a FIPA based Multi Agent System in Cloud Haskell
Share the idea...


Description

Using correct models for programming applications for distributed computing is hard. One must deal with failures, asychronous interaction with 3rd party services, timeouts, networking bottlenecks, and so on. When the application needs parallelism, this only complicates matters. The stagnation of processor speeds is old news. The growing need for de-coupled distributed computing has brought with it a proliferation of new programming languages, and middlewares for scalable programming.

The agent programming model isn't new, the idea has been around for over a decade. It promises, however, to attract a new wave of interest as one possible way to modularize independent program parts on distributed environments. For those who are familiar with the actor programming model, you're in luck. It's almost exactly the same thing. To give you a clue, agents are synonymous with processes: isolated memory, message passing, message queues, unique ID's and names etc...
Actor model ~= Agent model

Multi-Agent Systems (MAS) are distributed platforms hosting autonomous software agents. A common characteristic of MAS's is the model in which agents interact. Agents have beliefs, and the only way they manipulate the beliefs of another agents is with agent message passing. Agents have mailboxes, and they expect messages of specific types, often called "performatives", such as request, accept, reject, ask etc...

So, what does the agent model bring to the party? Agents need to speak a universal language. Therefore, messages need a standardized formalism in order for agents to achieve computational interaction. What does an agent message say: What is the performative action? What is the content of the message? The Agent Communication Language (ACL) was developed for this purpose. The FIPA [1] (Foundation for Intelligent Physical Agents) agent standard encapsulates software agents in MAS's that communicate using the ACL. That way, the theory goes, agents can be pluggable, to be taken from one framework and dropped into another.

Arguably, the greatest opportunity for the agent programming model to gain traction, has come with the increasing popularity of Erlang. The Erlang language primitives provides much of the necessary message passing an agent would need, and the Erlang VM is a rock solid platform to deploy distributed systems. Implementations of the actor model are appearing everywhere, the AKKA Scala library [2] is one particularly apt example. There is even a prototype implementation of a FIPA agent framework in Erlang called eXAT [3,4]. A plethora of frameworks would be most welcomed, most of all from those who believe object-oriented programming is the wrong approach [3] for MAS implementations.

The last 12 months has seen an exciting flurry of development activity on Cloud Haskell [5,6]. Cloud Haskell is a new distributed Haskell that borrows many of the great language features from Erlang. This project would involve developing a FIPA based Multi Agent System in Cloud Haskell (much of the existing plumbing could may well be used). The main contribution would be an implementations of the FIPA standard in Cloud Haskell for ACL-based communication, and to demonstrate the potential of FIPA-based agent programming in a purely functional programming language. Optionally, some existing examples of Jade (Java) agents [7] (Jade is a popular MAS implementation) should be ported to this new Haskell MAS, to compare code size, ease of programmability and performance. The goal: to bring Haskell to the game of agent programming in the cloud.

Outcomes

  • A FIPA based multi-agent platform framework written in Haskell
    • Agent interaction via the ACL messaging standard
    • Agent mailboxes
    • Fault tolerence e.g. restarting agents when they recover
  • Collaborative dialog with the relevant communites
    • The parallel-haskell mailing list
    • Agent programming communities e.g. the jade-develop mailing list
  • Open ecosystem
    • The framework should be uploaded to hackage
    • all code should be open sourced on github, bitbucket...

Possible Extensions

The following ideas could be considered in the implementation. It is entirely up to the author.
  • BDI agent reasoning One strand of agent programming research that is not described here is the beleif-desires-intention (BDI) reasoning capabilities of BDI agent systems. This is an exciting area, and one that can be used to embody human beliefs to simulate human interaction, amongst other things. Recent efforts at a BDI library for Haskell have been presented [8].
  • Standardized Message Content The FIPA standard outlines the data fields that are included in an ACL message. One property that interests me is the use of a standardized language for the content of an ACL message. There is no apparent constraint on content language in the specification [9], and all FIPA frameworks seemingly permit plain text. One project [10] using the Jade Java framework has tried to address this by using RDF, a W3C standard, as a formalize message content language. In short, RDF is a simple representation language that holds rich meaning with the re-use of common ontological vocabularies. An interesting extension to the Cloud Haskell agents project would be to optionally constrain message content representation. I even maintain an RDF library for Haskell [11] that could be used :-)

    If you're interested, do get in touch: robstewart57 [the at sign] gmail [dot] com . Otherwise, please share the idea!


    References

    [1] - http://www.fipa.org/specs/fipa00061/
    [2] - http://akka.io/
    [3] - http://www.lia.deis.unibo.it/books/woa2003/pdf/09.pdf
    [4] - https://github.com/gleber/exat
    [5] - http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/remote.pdf
    [6] - https://github.com/haskell-distributed/distributed-process
    [7] - http://jade.tilab.com/
    [8] - http://verify.disi.unige.it/wp-content/uploads/2012/11/dalt2012.pdf
    [9] - http://www.fipa.org/specs/fipa00061/SC00061G.html#_Toc26669707
    [10] - http://www.macs.hw.ac.uk/~rs46/papers/df2012/DF2012.pdf
    [11] - https://github.com/robstewart57/rdf4h