Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Agent Programming in G OAL Multi-agent Systems & Communication Koen Hindriks Delft University of.

Slides:



Advertisements
Similar presentations
Operating Systems Semaphores II
Advertisements

Introduction to C Programming
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Modelling Features as Statecharts Pourya Shaker and Joanne M. Atlee.
Birna van Riemsdijk & Koen HindriksMulti-Agent Systems 2013 Introduction Agent Programming Birna van Riemsdijk and Koen Hindriks Delft University of Technology,
Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-agent Systems, Communication and Coordination Koen Hindriks Delft University of Technology,
Multi-agent Systems Project.
Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-agent Systems & Coordination Maaike Harbers Delft University of Technology, The Netherlands.
Use Case Diagrams Damian Gordon.
Intelligent Architectures for Electronic Commerce Part 1.5: Symbolic Reasoning Agents.
Planning with Non-Deterministic Uncertainty (Where failure is not an option) R&N: Chap. 12, Sect (+ Chap. 10, Sect 10.7)
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
Formal Semantics for an Abstract Agent Programming Language K.V. Hindriks, Ch. Mayer et al. Lecture Notes In Computer Science, Vol. 1365, 1997
White Box and Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
Use Case & Use Case Diagram
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Faculty of Management and Organization Emergence of social constructs and organizational behaviour How cognitive modelling enriches social simulation Martin.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
CS 582 / CMPE 481 Distributed Systems
A Summary of the Article “Intelligence Without Representation” by Rodney A. Brooks (1987) Presented by Dain Finn.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Brent Dingle Marco A. Morales Texas A&M University, Spring 2002
Linux+ Guide to Linux Certification, Second Edition
Lecture 23: Software Architectures
Modeling Belief Reasoning in Multi-Agent Systems* Thomas R. Ioerger Department of Computer Science Texas A&M University *funding provided by a MURI grant.
Agent programming in Dribble from beliefs to goals with plans Birna van Riemsdijk Wiebe van der Hoek John-Jules Ch. Meyer.
Distributed Robot Agent Brent Dingle Marco A. Morales.
June is an easy way to communicate. It costs nothing to send an , but it does require a connection to the Internet. You can.
C++ fundamentals.
On a Device Information Model for devices in oneM2M
Automating Tasks with Macros. Macro Essentials  A macro is a list of actions that happen when you run the macro.  Creating a Macro: − Choose Create.
Microsoft ® Office 2007 Training Security II: Turn off the Message Bar and run code safely John Deere presents:
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Advanced User Guide to Outlook and all its features.
Computer Architecture Computational Models Ola Flygt V ä xj ö University
Vermelding onderdeel organisatie September 12, Intro Multi-Agent Systemen Multi-Agent Systemen Koen Hindriks, Birna van Riemsdijk Man-machine interaction.
2APL A Practical Agent Programming Language March 6, 2007 Cathy Yen.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
CMSC 414 Computer (and Network) Security Lecture 14 Jonathan Katz.
 Communication Tasks  Protocols  Protocol Architecture  Characteristics of a Protocol.
Technical Advisor - Mr. Roni Stern Academic Advisor - Dr. Meir Kelah Members: Shimrit Yacobi Yuval Binenboim Moran Lev Lehman Sharon Shabtai.
Introduction to AgentSpeak and Jason for Programming Multi-agent Systems (1) Dr Fuhua (Oscar) Lin SCIS Athabasca University June 19, 2009.
Linux+ Guide to Linux Certification, Third Edition
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
+ Simulation Design. + Types event-advance and unit-time advance. Both these designs are event-based but utilize different ways of advancing the time.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Presented by: Suparita Parakarn Kinzang Wangdi Research Report Presentation Computer Network Security.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
Proxy, Observer, Symbolic Links Rebecca Chernoff.
1 © 2005 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Cisco Public Cisco Unity Connection Notification Jane Rygg Core Services.
Simulator Protocol. coordinator simulator Component tN tN. tL After each transition tN = t + ta(), tL = t simulator Component tN tN. tL simulator Component.
Planning and Scheduling Meetings in Outlook 2010 Using your Outlook Calendar.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
Koen HindriksMulti-Agent Systems 2012 Introduction Agent Programming Koen Hindriks Delft University of Technology, The Netherlands Learning to program.
A framework of safe robot planning Roland Pihlakas Institute of Technology in University of Tartu august 2008.
1 Using Rational Rose ® to construct UML diagrams.
Koen HindriksMulti-Agent Systems Environments and Sensing Multi-Agent Systems Course Koen Hindriks Delft University of Technology, The Netherlands.
Brandon Packard. Why make? So far, you have probably worked on relatively small projects Coding projects can become huge My research consists of 1600.
1 Project 5: Leap Years. 222 Leap Years Write a program that reads an integer value from the user representing a year and determines if the year is a.
Internet Computing Module II. Syllabus Creating & Using classes in Java – Methods and Classes – Inheritance – Super Class – Method Overriding – Packages.
REAL SUCCESS UNIVERSITY COACHING CERTIFICATE PROGRAM The Art, Skill & Practice of Professional Coaching.
Linux Administration Working with the BASH Shell.
Koen HindriksMulti-Agent Systems Environments, Rules, Architectures Koen Hindriks Delft University of Technology, The Netherlands.
Proposal on system description, reference model and draft outline
Computer Programming.
Object Oriented Analysis and Design
Architecture Competency Group
Presentation transcript:

Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Agent Programming in G OAL Multi-agent Systems & Communication Koen Hindriks Delft University of Technology, The Netherlands

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen G OAL So Far mental states (beliefs, goals) mental state conditions & macros action specifications, built-in actions action rules environment & perception modules

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Outline (today) Intro Multi-Agent Systems (MAS) Specifying a MAS in G OAL Communication in G OAL Coordination in MAS

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-Agent Systems (MAS)

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-Agent System Environment A1 Agents A2 A3 A4 Intersecting spheres of influence of multiple agents acting in an environment Intersecting spheres: Action perspective: may interfere, change same parts of environment Perception perspective: agents may have different views on environment

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-Agent System Environment A1 Agents A2 A3 A4 Various approaches to coordinate activity of multiple agents Various coordination techniques have been proposed, main ideas: Communication protocols impose structure on agent communication Add organization structure on top of multi-agent system Note: Without explicit agent communication still implicit communication possible via environment if perception spheres overlap

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-Agent System Environment A1 Agents A2 A3 A4 Not all agents need to be ‘connected’ to the environment

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Specifying a MAS

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification In G OAL, a.mas file is a recipe for launching a multi-agent system, specifying: which environment will be launched, how many agents will be launched, the agent names for agent processes which agents are connected to environment which.goal file is used to create an agent.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification A.mas file is a recipe for launching a MAS: which environment will be launched environment started by jar file, some of which may be initialized using the init command (check out environment doc). environment{ "blocksworld.jar". init[configuration="bwconfigEx1.txt"]. }

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification A.mas file is a recipe for launching a MAS: which agent files will be used agent file defines a possible agent type. agentfiles { "coffeemaker.goal". "coffeegrinder.goal". }

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification A.mas file is a recipe for launching a MAS: which agent processes will be created a launch policy specifies when, which and how many agent processes will be created. launch maker:coffeemaker. launches one agent process called maker using the agent file referenced by coffeemaker (coffeemaker.goal). does not connect agent to an environment. launchpolicy { launch maker:coffeemaker. launch grinder:coffeegrinder. }

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification A.mas file is a recipe for launching a MAS: which agent processes will be created a conditional launch rule is triggered by the environment: whenever a controllable entity becomes available in the environment, an event is generated. the agent created by the launch part of the rule is connected to that entity. launchpolicy { when do launch elevator:file1. }

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification A.mas file is a recipe for launching a MAS: additional checks in launch rule this launch rule can only be applied if there is an available entity of type car, and the rule can be applied at most 3 times. Remark: launch rules are applied in linear order. launchpolicy { when do launch elevator:file1. }

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen MAS Specification: Example A.mas file is a recipe for launching a MAS: environment section may be empty, in that case mas is run without an environment. agentfiles and launchpolicy must be non-empty. agentfiles { "coffeemaker.goal". "coffeegrinder.goal". } launchpolicy { launch maker:coffeemaker. launch grinder:coffeegrinder. }

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Agent Identity and Other Agents How does an agent know it is not alone? The names of all agents generated by GOAL are inserted in the belief base of all other agents. For example, agent(tarzan) is inserted in the belief base of agent jane when tarzan is created. How is an agent able to differentiate itself from other agents? I.e. how does agent jane know she is not tarzan? Upon creation, the fact me( ) where name is the agent’s name is inserted in the belief base of that agent.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Communication in G OAL

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Communication: Primitives Communication primitives: –send(, ) –sendonce(, ) Example: Tarzan sends Jane a message: –send(jane, meeting(date(1,2,2010), time(12,0), duration(1,0), [jane, tarzan]))

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen GOAL Agent Architecture The basis of communication in GOAL is a simple mailbox semantics. Agent Environment Real or simulated world of events action percept Beliefs Goals Action Rules Process percepts message Process message

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Communication: Semantics Action: send(, ) ground send action can always be performed, i.e. precondition is true, assume agent sender sends message to recipients then GOAL puts sent(, ) in the mailbox of sender, agents that receive message put received(sender, ) in their mailbox. NB: keep in mind it may take some time before agent b receives the message.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Communication: Semantics Action: sendonce(, ) same as send(, ), but sendonce action can only be performed if the mailbox of the sending agent does not contain: sent(, ) i.e. precondition is: not(sent(, )

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Using Messages in Mailbox The facts in the mailbox can be used like any other facts in the belief base of an agent. That is, sent(, ) and received(name, ) can be used in: –in conditions in action rules –c lauses in the knowledge or beliefs section

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Using Messages in Mailbox After receiving a message from tarzan, agent jane will have: received(tarzan, meeting(date(1,2,2010), time(12,0), duration(1,0), [jane,tarzan])) in her mailbox. Consequently, jane will believe: bel(received(tarzan, meeting(date(1,2,2010), …, …, [jane,tarzan])))

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Processing Message Pattern Inserting received information into belief base and removing received message: Removing received message cleans up the mailbox and makes sure that the action rule is not applied repeatedly (even after the received info is outdated). Using received messages in mental state conditions other than for processing the message, and using them in knowledge base, gives less readable code. if bel(received(A,Proposition)) then insert(Proposition) + delete(received(A,Proposition))

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Using Messages in Mailbox More complex conditions may be defined. For example: #define not_yet_invited(Person,Date,Time,Duration,Attendees) goal(meeting(Date, Time, Duration, Attendees)), bel(member(Person, Attendees), me(Me), not(Person = Me)), not(bel(sent(Person, meeting(Date,Time,Duration, Attendees)))). which informally means: I want to have a meeting with Attendees, Person is one of the Attendees (different from myself), and I did not send that person an invitation for the meeting I want yet.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Message Types GOAL supports three message types, called moods: –declarative, typically used to inform Example: The time is 2 o'clock operator: ‘:’ : send(jane, :time(14,0)) –imperative, typically used to indicate a goal Example: I want the door to be closed! operator: ‘!’ : send(jane, !door(closed)) –interrogative, typically used to ask a question Example: How much milk is left? operator: ‘? : send(jane, ?amountMilk(_))

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Message Types Mood operators are translated to Prolog predicates in mailbox: –declarative: no predicate received(tarzan, time(14,0)) –imperative: imp received(tarzan, imp(door(closed))) –interrogative: int received(tarzan, int(amountMilk(_))) See programming guide, section 6.5.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Agent Selectors First argument of a send action is called an agent selector, which can be: An agent name: send(jane, …) A variable (to be instantiated): send(Person, …) A list of selectors: send([jane,tarzan,Person], …) A quantor: –send(self, …) : message sent to agent itself –send(all, …) : message sent to all agents (incl. itself) –send(allother, …) : message sent to all other agents

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Sending messages to oneself Messages sent to oneself change the agent’s own mental state! Sending messages to oneself has special meaning. Changes are different for different moods: –send(self, :fact) inserts fact in belief base –send(self, !fact) adopts fact as goal and deletes fact from belief base. –send(self, ?fact) deletes fact from belief base N.B.: Do not use messages to self as an alternative way of updating the agent’s beliefs and goals!

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Selecting agents to send to Suppose agent wants to send to all other agents that are producers of milk that it wants to have milk. Q: Write an action rule which achieves this: –Use predicates have/1 and producerOf/2. A: if a-goal(have(milk)), bel(agent(X), producerOf(X, milk)) then send(X, !have(milk))