Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-agent Systems, Communication and Coordination Koen Hindriks Delft University of Technology,

Slides:



Advertisements
Similar presentations
Objectives Identify the differences between Analytical Decision Making and Intuitive Decision Making Demonstrate basic design and delivery requirements.
Advertisements

Management, Leadership, & Internal Organization………..
Multi-agent Systems Project.
Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Agent Programming in G OAL Multi-agent Systems & Communication Koen Hindriks Delft University of.
Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-agent Systems & Coordination Maaike Harbers Delft University of Technology, The Netherlands.
Use Case Diagrams Damian Gordon.
COS 461 Fall 1997 Group Communication u communicate to a group of processes rather than point-to-point u uses –replicated service –efficient dissemination.
ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 14: Simulations 1.
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)
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Use Case & Use Case Diagram
The AGILO Autonomous Robot Soccer Team: Computational Principles, Experiences, and Perspectives Michael Beetz, Sebastian Buck, Robert Hanek, Thorsten Schmitt,
Yiannis Demiris and Anthony Dearden By James Gilbert.
Joost Westra, Frank Dignum,Virginia Dignum Scalable Adaptive Serious Games using Agent Organizations.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Faculty of Management and Organization Emergence of social constructs and organizational behaviour How cognitive modelling enriches social simulation Martin.
Game-Theoretic Approaches to Multi-Agent Systems Bernhard Nebel.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
Use-case Modeling.
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.
Brent Dingle Marco A. Morales Texas A&M University, Spring 2002
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
Distributed Robot Agent Brent Dingle Marco A. Morales.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Identify the differences between Analytical Decision Making and Intuitive Decision Making Describe basic design and delivery requirements for Tactical.
Task decomposition, dynamic role assignment and low-bandwidth communication for real-time strategic teamwork Peter Stone, Manuela Veloso Presented by Radu.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
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.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Protocols and the TCP/IP Suite
L 9 : Collaborations Why? Terminology Coherence Coordination Reference s :
 Communication Tasks  Protocols  Protocol Architecture  Characteristics of a Protocol.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Logic Programming Module 2AIT202 Website Lecturer: Dave Sharp Room: AG15
CS 415 – A.I. Slide Set 10. Controlling Multiple Robots Different considerations for multiple robots – Inherently dynamic environment – Complex local.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Conflict within Groups. Outline Conflict Competition and Conflict Class Activity Mixed Motive Situations Social Dilemmas Class Activity Threats and.
Proxy, Observer, Symbolic Links Rebecca Chernoff.
Chapter 4 Decision Support System & Artificial Intelligence.
Project Management Workshop James Small. Goals Understand the nature of projects Understand why Project Management is important Get an idea of the key.
Distributed Models for Decision Support Jose Cuena & Sascha Ossowski Pesented by: Gal Moshitch & Rica Gonen.
Chapter 8 Management, Leadership, and Internal Organization Learning Goals Define management and the skills necessary for managerial success. Explain the.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
M1G Introduction to Programming 2 2. Creating Classes: Game and Player.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Kate Perkins for the Ithaca Group. Setting the scene  Where has the CSfW come from?  What is it for? Who is it for? The framework  Skill Areas  Developmental.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lecture # 07 Spring-2016.
Coordination and Agreement
Using Use Case Diagrams
Information Systems in Organizations 2
Working in Groups in Canvas
TÆMS-based Execution Architectures
Role of the Coach GAA Award 1 Course.
CHAPTER 3 Architectures for Distributed Systems
Chap 10 Malicious Software.
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Using Use Case Diagrams
Information Systems in Organizations 2
Chap 10 Malicious Software.
Chapter 5 Architectural Design.
Presentation transcript:

Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Multi-agent Systems, Communication and Coordination Koen Hindriks Delft University of Technology, The Netherlands Multi-Agent Systems Course

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) Coordination in MAS Specifying a MAS in G OAL Communication in G OAL

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 Kinds of multi-agent systems Cooperative versus competitive –Agents have a common goal of solving a problem together or compete for resources. Homogeneous versus heterogeneous –All agents have the same abilities and decision logic, or agents have different abilities. Interaction protocols –Which agents can talk to which other agents? Organizational structure –Agents may be organized in various ways (with a leader, or not, different roles, etc.)

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Example – Search and Rescue Search & Rescue –Unknown environment (map may be unreliable or absent) –Search for victims –Providing aid to victims –Aim to minimize time to provide aid to all victims.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Example – Package Delivery Package delivery –Known environment (map) –Initial and target location of packages known –Aim to minimize delivery time of all packages.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Advantages of MAS Complete tasks quicker through shared effort. Achieve tasks otherwise not possible. A MAS provides solutions in situations where action is spatially and temporally distributed. A MAS can be distributed over machines across a network. A decentralized MAS does not suffer from the "single point of failure" problem.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Cooperation & Coordination Maaike Harbers,

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Examples of Cooperation Maaike Harbers,

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Cooperation Challenges Cooperation yields more effective (e.g., quicker) solutions to a problem… But… 1.Avoid duplication of effort. 2.Avoid interference, i.e. harmful interactions. 3.Avoid communication overhead, i.e., need to share information with as few messages as possible. 4.Need to synchronize behaviors. Coordination needed to address challenges

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen What is coordination?

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Coordination problems Without coordination, what would happen here? What is the problem: duplication of effort, interference, communication overhead, synchronization?

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Coordination problems And what would happen here? What is the problem: duplication of effort, interference, communication overhead, synchronization?

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Coordination problems And what would happen here? What is the problem: duplication of effort, interference, communication overhead, synchronization?

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Coordination problems Player A / Player B DefectCooperate Defect 2, 2 5, 0 Cooperate 0, 53, 3 Outcomes for actors A and B depend on the combination of A's and B's action. Prisoner's dilemma Two persons are being questioned in separate rooms by the police. Each of them can either admit to a crime (defect) or not (cooperate). And what would happen here? What is the problem: duplication of effort, interference, communication overhead, synchronization?

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Need to be smart And what would happen here? What is the problem: duplication of effort, interference, communication overhead, synchronization? The wise men problem A king wishing to know which of his three wise men is the wisest, paints a white spot on each of their foreheads, tells them at least one spot is white, and asks each to determine the color of his spot. …

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Types of coordination Implicit coordination e.g., flocking behavior Explicit coordination exchange of messages

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Klein, G., Feltovich, P., Bradshaw, J. M., & Woods, D. D. (2005). Common ground and coordination in joint activity. Organizational Simulation. W. B. Rouse and K. R. Boff. New York City, NY, John Wiley. Aspects of joint activity Coordinating behavior makes multiple agents act like a team, they perform a joint activity.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen A. Criteria: example Making an assignment together No intention – no assignment or two assignment No interdepencence – each making one half of the assignment without seeing the other half

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Interpredictability –Need to be able to accurately predict what others will do –Not just actions, but the coordination itself Common ground –Pertinent mutual knowledge, beliefs, and assumptions about others’ skills and capabilities –Joint activity is guided by signaling and coordination devices Directability –Capacity for modifying the actions of the other parties as conditions and priorities change –Responsiveness of each participant to the influence of the others B. Requirements for joint activity

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Football team Interpredictability – predict where team members will be on the field and who will be available Common ground – who is keeper, who defends, who attacks Directability – keeper tells others where to stand during a corner B. Requirements: example

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen C. Choreography of joint activity Three phases (functional breakdown) coordinating tasks is coordinating subtasks subtasks have an entry, body and exit phase Signaling transitions within and between phases Coordination devices serve to increase interpredictability examples are organizational structure, convention, communication protocol

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen C. Choreography: example Traffic Three phase actions -entering a road -being on the road -leaving a road Signaling transitions -turn signal Coordination devices -organizational structure, convention, communication protocol -to discuss…

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Coordination structures

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Organizational structure adapted from Bradshaw et al.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Organizational structure in BW4T Notion of ‘role’ is central Possible roles in BW4T? searcher deliverer manager

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Notion of ‘role’ is central organization goals agents agent roles determine performed by Organizational perspective society agent roles agent goals determine performed within Agent perspective

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Conventions Coordination by convention solution

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen A group of agents Each agent is able to solve the BW4T task individually Agents do not take into account that there are other agents What happens? Conventions in BW4T

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Do not enter rooms that are occupied If you know about a block that can be delivered, deliver that block If someone intends to deliver a particular block, do not try to deliver that block as well Example of conventions in BW4T

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Conventions in organizational structure If a searcher finds a block, it must report that to the manager adapted from Bradshaw et al.

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen A group of agents Each agent is able to solve the BW4T task individually Agents take into account that there are other agents Agents do not communicate What happens? Communication in BW4T

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Implicit coordination in BW4T Room 1 Room 2 Robot 1 Robot 2 And what would happen here? Robots do NOT communicate. How do they choose a room?

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(s) is (are) 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{ env = "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 G OAL 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))

Koen Hindriks, Birna van Riemsdijk Multi-agent systemen Koen Hindriks, Birna van RiemsdijkMulti-agent systemen Organisation Tutorial this week: –Assignment 4: team agent for BW4T Exam: –Specification of material to study will be posted on blackboard. –Example exams will be made available.