Multi Agent System Programming languages Mahmoud El Razzaz Mostafa M. Ameen Mai M. M. Farag.

Slides:



Advertisements
Similar presentations
ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Intelligent Architectures for Electronic Commerce Part 1.5: Symbolic Reasoning Agents.
(Imperative and) Declarative Programming Languages for Multi-Agent Systems João Alexandre Leite CENTRIA - New University of Lisbon
Formal Semantics for an Abstract Agent Programming Language K.V. Hindriks, Ch. Mayer et al. Lecture Notes In Computer Science, Vol. 1365, 1997
Chapter 16: Multiagent Systems Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
IMS1805 Systems Analysis Topic 3: Doing Analysis (continued from previous weeks)
SELBO Agent Ivan Minov University of Plovdiv “Paisii Hilendarski“
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
What exactly is an agent? James Harland 23rd November, 2009.
Mehdi Dastani Jorge J. Gomez-Sanz PROMAS PROgramming Multi-Agent Systems.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
JACK Intelligent Agents and Applications Hitesh Bhambhani CSE 6362, SPRING 2003 Dr. Lawrence B. Holder.
Implementation of MAS issues M. Birna van Riemsdijk ProMAS TFG 2005.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Reasons to study concepts of PL
PDDL: A Language with a Purpose? Lee McCluskey Department of Computing and Mathematical Sciences, The University of Huddersfield.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
April 15, 2005Department of Computer Science, BYU Agent-Oriented Software Engineering Muhammed Al-Muhammed Brigham Young University Supported in part by.
Programming Languages Structure
JADE Java Agent Development Framework An Overview.
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
Dr. Muhammed Al-Mulhem ICS An Introduction to Functional Programming.
DISTRIBUTED PROCESS IMPLEMENTAION BHAVIN KANSARA.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Architectural Design.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
PROGRAMMING LANGUAGES The Study of Programming Languages.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
2APL A Practical Agent Programming Language March 6, 2007 Cathy Yen.
Chapter 8 Architecture Analysis. 8 – Architecture Analysis 8.1 Analysis Techniques 8.2 Quantitative Analysis  Performance Views  Performance.
Multi-Agent Systems University “Politehnica” of Bucarest Spring 2003 Adina Magda Florea
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
Knowledge representation
Building a Robocup team using Jason BDI framework Sean Bassett, Nancy Ho Woo, Laurence Smith, Carlos Valencia Software Agents November 30, 2006.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Information System Development Courses Figure: ISD Course Structure.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
NAVEEN AGENT BASED SOFTWARE DEVELOPMENT. WHAT IS AN AGENT? A computer system capable of flexible, autonomous (problem-solving) action, situated in dynamic,
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Interoperable Multi-Agent Systems in Near-Field Communication Networks Mathias Rieder.
University of Windsor School of Computer Science Topics in Artificial Intelligence Fall 2008 Sept 11, 2008.
Agents, Multi-Agent Systems and Declarative Programming: What, When, Where, Why, Who, How? Andrew Diniz da Costa –
TIVDM2Functional Programming Language Concepts 1 Concepts from Functional Programming Languages Peter Gorm Larsen.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
A Quantitative Trust Model for Negotiating Agents A Quantitative Trust Model for Negotiating Agents Jamal Bentahar, John Jules Ch. Meyer Concordia University.
1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas.
1-1 An Introduction to Functional Programming Sept
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Agent Overview. Topics Agent and its characteristics Architectures Agent Management.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Functional Programming
The language focusses on ease of use
OOP - Object Oriented Programming
Functional Programming Languages
Software Testing.
PROGRAMMING LANGUAGES
Design of a Multi-Agent System for Distributed Voltage Regulation
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Computer Programming.
Programming Languages 2nd edition Tucker and Noonan
Market-based Dynamic Task Allocation in Mobile Surveillance Systems
Principles of Programming Languages
Some Programming Paradigms
PASSI (Process for Agent Societies Specification and Implementation)
Presentation transcript:

Multi Agent System Programming languages Mahmoud El Razzaz Mostafa M. Ameen Mai M. M. Farag

Introduction Research in Multi-Agent Systems (MAS) has recently led to the development of practical programming languages and tools that are appropriate for the implementation of such systems. Agent-oriented languages, ranging from purely declarative, to purely imperative, and various hybrid approaches. Using these languages, instead of more conventional ones, proves useful when the problem is modeled as a multi- agent system, and understood in terms of cognitive and social concepts such as beliefs, goals, plans, roles, and norms.

Classification of MAS Programming Languages MAS programming languages DeclarativeImperative Hybrid approaches

1- Declarative Programming Languages

Definition [1] Is a programming paradigm that expresses the logic of a computation without describing its control flow. The programmer can concentrate on stating what is to be computed, not how it is to be computed. Algorithm = Logic + Control The programmer gives the logic but not necessarily the control.

//C# Imperative implementation static int factorial(int n) { if (n <= 1) return 1; int result = 1; for (int i = 2; i <= n; i++) { result = result * i; } return result; } //Prolog Declarative implementation factorial(0,1):- !. factorial(N1,T2):- N2 is N1-1, factorial(N2,T1), T2 is N1*T1.

Declarative languages make extensive use of relationships. There are two principal styles of defining relationships available to such languages: 1. Functional 2. Logic These form the two sub-branches of the declarative family of programming languages.

Functional declarative languages tend to be inspired by the Lambda Calculus ( Calculus), a computational model proposed by Alonzo Church in the 1930's. As the name suggests, using the functional style, relationships are expressed using functions. Example: (square (n) (* n n)) This is a function, square, that express the relationship between the input n and the output value n*n. Functional Definition

Logic declarative languages in turn, tend to be inspired by Predicate Calculus and, more particularly, the Horn Clause subset of Predicate calculus. In this style of declarative programming relationships are declared using expressions known as clauses. Example: square(N, M):- M is N*N. Clauses can be used to express both facts and rules. A logic programme can therefore be treated as a relational database to which we can pose queries of various forms. Logic Definition

Some Tools and Languages CLAIM (Computational Language for Autonomous, Intelligent and Mobile agents)[2] is a high-level agent-oriented programming language that combines cognitive aspects such as knowledge goals capabilities computational elements such as communication, mobility and concurrence in order to reduce the gap between the design and the implementation phase.

CLAIM[2] A CLAIM agent: Is a node in a hierarchy. Is an autonomous, intelligent and mobile entity that can be seen as a bounded place where the computation happens. Has a parent, a list of local processes and a list of sub- agents. Has intelligent components (knowledge, capabilities, goals) that allow a reactive or proactive behavior.

CLAIM In CLAIM, agents can be defined using defineAgent agentName { authority=null; | agentName ; parent=null; | agentName ; knowledge=null; | { (knowledge;)+} goals=null; | { (goal;)+} messages=null; | { (queueMessage;)+} capabilities=null; | { (capability;)+} processes=null; | { (process | )* process } agents=null; | { (agentName;)+} }

CLAIM[2] A Case Study: Age of Empires Figure 1: Age of Empires – Seak order

CLAIM[2] A Case Study: Age of Empires The Creator agent: Creates (using newAgent) a Seeker agent. Finds out the list of the existing sites. Tells to the Seeker to migrate to each of them (using move). When the Seeker arrives on a site: He “counts” the available resources. He asks (using send) specialized agents from the Creator, who will create (using newAgent) one specialized agent for each type of resource, agents that migrate to the specific resource agents on the site.

CLAIM[2] A Case Study: Age of Empires After gathering the resources, they return to the village, give the resources to the Creator and wait for other calls. Meanwhile, the Seeker moves to other sites, searches for resources and asks for specialized agents. If there is no specialized agent available at the Creator when a new ask for help arrives, a new specialized agent is created.

Some Tools and Languages FLUX [3] MINERVA [4] DALI [5] ReSpecT [6]

2- Imperative MAS programming languages [6] In this paradigm, a program is a series of instructions for the computer. This is one of the earliest paradigms to emerge, as it is close to what actually occurs inside the computer. The fundamental tool that makes imperative programming possible is the conditional jump. In practice, we pretty up our conditional jumps with loops and if syntax. Fast execution

Imperative is inappropriate! [7] Imperative languages are in essence inappropriate for expressing the high-level abstractions associated with agent systems design; however, agent-oriented programming languages should (and indeed tend to) allow for easy integration with (legacy) code written in imperative languages.

Examples of imperative languages JACK Intelligent Agents® (JACK) [1] is an Agent Oriented development environment built on top of and integrated with the Java programming language. It includes all components of the Java development environment as well as offering specific extensions to implement agent behaviour.

Examples of imperative languages JADE (Java Agent Development Framework) [8] is a software development framework aimed at developing multi-agent systems and applications conforming to FIPA standards for intelligent agents.

Jade architecture [8] Figure 2: Jade architecture

Live example I'll show you an example of multi- agent system which is developed in JADE framework. The example shows how to implement a simple ContractNet multi-agent system. Figure 3: ContractNet protocol

3- Hybrid approaches in MAS programming languages 1 Introduction: Various well-known agent languages combine declarative and imperative features. In this section we describe agent programming languages which are declarative while at the same time providing some specific constructs allowing for the use of code implemented in some external imperative language

Examples of Hybrid languages Jason Jason is available Open Source, and is distributed under GNU LGPL at: 3APL (An abstract Agent Programming Language) User guide for 3APL available at:

Examples of Hybrid languages IMPACT IMPACT is a system developed by subrahmanian et al. with the main purpose of providing a framework to build agents on top of heterogeneous sources of knowledge. Information on the Impact platform is available at:

Examples of Hybrid languages GO! GO! Is a multi agent programming language with a declarative subset of function and relation definitions, an imperative subset comprising action procedure definition and rich program structuring mechanisme.

Examples of Hybrid languages (JASON) Jason is an interpreter for an extended version of AgentSpeak. It implements the operational semantics of that language, and provides a platform for the development of multi-agent systems, with many user-customizable features.

Examples of Hybrid languages (JASON) Features of JASON 9 : Some of the features available in Jason are: 1. speech-act based inter-agent communication (and annotation of beliefs with information sources); 2. annotations on plan labels, which can be used by elaborate (e.g., decision theoretic) selection functions; 3. the possibility to run a multi-agent system distributed over a network (using SACI, but other middleware can be used);

4. fully customizable (in Java) selection functions, trust functions, and overall agent architecture (perception, belief-revision, inter-agent communication, and acting); 5. straightforward extensibility (and use of ) by means of user-defined “internal actions”; 6. clear notion of multi-agent environments, which can be implemented in Java (this can be a simulation of a real environment, e.g., for testing purposes before the system is actually deployed). Features of JASON:

Examples of applications developed by Jason Gold Miners (Jomi Hübner and Rafael Bordini) 10 A team of gold-mining agents has to retrieve pieces of gold scatters in a grid- like territory, finding suitable paths to then take the retrieved gold to a depot. In the actual competition, two team of agents compete against each other.

Examples of applications developed by Jason Gold Miners (Jomi Hübner and Rafael Bordini)

Examples of applications developed by Jason Gold Miners (Jomi Hübner and Rafael Bordini)

Sample code for the MAS leader /* negotiation for found gold */ +!allocate_miner(Gold) <-.findall(op(Dist,A),bid(Gold,Dist,A),LD);.min(LD,op(DistCloser,Closer)); DistCloser < 10000;.print("Gold ",Gold," was allocated to ",Closer, " options were ",LD);.broadcast(tell,allocated(Gold,Closer)). //-Gold[source(_)].

Sample code for the MAS miner /* negotiation for found gold */ // if I see gold and I'm not free but also not carrying gold yet // (I'm probably going towards one), abort handle(gold) and pick up // this one which is +cell(X,Y,gold) : not carrying_gold & not free &.desire(handle(gold(OldX,OldY))) & // I desire to handle another gold which pos(AgX,AgY) & jia.dist(X, Y, AgX,AgY,DNewG) & jia.dist(OldX,OldY,AgX,AgY,DOldG) & DNewG < DOldG // is farther than the one just perceived <- +gold(X,Y);.drop_desire(handle(gold(OldX,OldY)));.print("Giving up current gold ",gold(OldX,OldY), " to handle ",gold(X,Y)," which I am seeing!");.print("Announcing ",gold(OldX,OldY)," to others");.broadcast(tell,gold(OldX,OldY));.broadcast(untell, committed_to(gold(OldX,OldY))); !init_handle(gold(X,Y)).

Sample code for the MAS miner /* negotiation for found gold */ // I am not free, just add gold belief and announce to others +cell(X,Y,gold) : not gold(X,Y) & not committed(gold(X,Y)) <- +gold(X,Y);.print("Announcing ",gold(X,Y)," to others");.broadcast(tell,gold(X,Y)).

Sample code for the MAS miner /* negotiation for found gold */ // someone else sent me a gold location +gold(X1,Y1)[source(A)] : A \== self & not allocated(gold(X1,Y1),_) & // The gold was not allocated yet not carrying_gold & // I am not carrying gold free & // and I am free pos(X2,Y2) &.my_name(Me) <- jia.dist(X1,Y1,X2,Y2,D); // bid.send(leader,tell,bid(gold(X1,Y1),D,Me)).

References 1. Rafael H. Bordini, Lars Braubach, Mehdi Dastani, Amal El Fallah Seghrouchni, Jorge J. Gomez-Sanz, Joao leite, Gregory O’Hare, Alexander Pokahr, Alessandro Ricci “A Survey of programming Languages and platforms for Multi-Agent Systems” Informatica 30 (2006)

2. A. El Fallah Seghrouchni and A. Suna. Claim: A computational language for autonomous, intelligent and mobile agents. Proceedings of ProMAS’03 Workshop of AAMAS, LNAI, 3067:90–110, M. Thielscher. FLUX: A logic programming method for reasoning agents. Theory and Practice of Logic Programming, To appear. K. V. Hindriks, F. S. D. Boer, W. V. der Hoek, and J.-J. C. Meyer. Agent programming in 3APL. AAMAS Journal, 2(4):357–401, J. A. Leite. Evolving Knowledge Bases, volume 81 of Frontiers in Artificial Intelligence and Applications. IOS Press, S. Costantini and A. Tocchio. A logic programming language for multi-agent systems. In S. Flesca, S. Greco, N. Leone, and G. Ianni, editors, Proceedings of the 8th European Conference on Logics in Artificial Intelligence (JELIA’02), volume 2424 of LNAI, pages 1–13. Springer, References

References 6. Michael Stevens (2011). "Programming paradigms and an overview of C - COMP Principles of Programming Languages: Object-Oriented programming". Australian National University. p. 5. Archived from the original on Retrieved "Object oriented programming extends the concept of modularity by introducing objects" 7. R. H. Bordini, M. Dastani, J. Dix, A. El Fallah Seghrouchni (Eds.), Multi-Agent Programming: Languages, Platforms and Applications, Springer, Bellifemine, Fabio, Agostino Poggi, and Giovanni Rimassa. "JADE–A FIPA- compliant agent framework." In Proceedings of PAAM, vol. 99, no , p “ 9. Rafael H. Bordini,1 Jomi F. Hübner,2 and Renata Vieira3 “JASON AND THE GOLDEN FLEECE OF AGENT-ORIENTED PROGRAMMING” 10. Jmoi F. Hubner and Rafael H. Bordini “Developing Team of Gold Miners Using Jason”