Chapter 15:Agents
Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005
Chapter 15 2Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Highlights of this Chapter
Agents Introduced Agent Environments Agent Descriptions Abstractions for Composition Describing Compositions Composition as Planning Rules
Chapter 15 3Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agents and MAS for SOC
Why the interest in agents for Web services? Need for autonomy, heterogeneity, dynamism
Unlike conventional services, agents Know about themselves, their users, and
their competitors Use and reconcile ontologies Are proactive and communicative Are autonomous about their commitments Can be cooperative
Chapter 15 4Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
What is an Agent?
The term agent in computing covers a wide range of behavior and functionality.
In general, an agent is an active computational entity with a persistent identity that can perceive, reason about, and initiate
activities in its environment that can communicate (with other agents)
and change their behavior based on others These features make agents a worthwhile
metaphor in computing
Chapter 15 5Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Dimensions of MAS: AgentAdaptivity (the ability of an agent to learn):
Autonomy:
Interactions:
Sociability (awareness):
Fixed Teachable Autodidactic
Controlled Independent
Simple Complex
Interdependent
Autistic CollaborativeCommitting
Chapter 15 6Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Abstractions/1
The traditional abstractions are from AI and are mentalistic beliefs: agent’s representation of the
world knowledge: (usually) true beliefs desires: preferred states of the world goals: consistent desires intentions: goals adopted for action
Chapter 15 7Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Abstractions/2
The agent-specific abstractions are inherently interactional social: about collections of agents organizational: about teams and
groups ethical: about right and wrong actions legal: about contracts and compliance
Chapter 15 8Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Abstractions/3
Agents, when properly understood lead naturally to multiagent
systems provide a means to capture the
fundamental abstractions that apply in all major applications and which are otherwise ignored by system builders
Chapter 15 9Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agents versus AI
Traditional AI Agents
Entities Stand-alone Social: flexibleautonomy, communities,responsibility
Actions(in terms of)
Cause and effect Ethical concepts of rightand wrong
Contracts(in terms of)
Simplisticobligations
Directed relationshipscapturing rights, duties,powers, and liabilities.
Chapter 15 10Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
How to Apply the Abstractions
Consider how the components of a large and dynamic software system in a practical situation Dynamism => autonomy Openness and compliance => ability
to enter into and obey contracts Trustworthiness => ethical behavior
Chapter 15 11Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Why Do These Abstractions Matter?
Because of modern applications that demand going beyond traditional metaphors and models Virtual enterprises: manufacturing
supply chains, autonomous logistics, Electronic commerce: utility
management Communityware: social user
interfaces Problem-solving by teams
Chapter 15 12Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Environments
Communication Infrastructure Shared memory (blackboard) Connected or Connectionless (email) Point-to-Point, Multicast, or Broadcast Directory Service
Communication Protocol FIPA ACL HTTP and HTML RMI, OLE, CORBA, DCOM, etc.
Interaction Protocol, i.e, conversations such as contracting
Mediation Services Security Services (timestamps/authentication/currency) Remittance Services Operations Support
(archiving/billing/redundancy/restoration/accounting)
Chapter 15 13Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
A Reactive Agent in an Environment
PerceiveEnvironment
Select Action
Environment
Condition-Action Rules
Effectors
Sensors
percepts
action
worldmodel
outputs
inputs
ReactiveAgent
Environment e;RuleSet r;while (true) { state = senseEnvironment(e); a = chooseAction(state, r); e.applyAction(a);}
Chapter 15 14Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Characteristics of Agent Environments
Observability: can all aspects relative to actions be sensed?
Determinism: is next state completely determined by current state + agent’s action?
History Freedom: does action choice depend on previous episodes or just current episode?
Dynamism: can environment change while agent is deliberating?
Continuity: do the agent actions, environment state variables, and time points have a continuous range of values?
Multiagent: is the agent aware of others that can affect the environment?
Chapter 15 16Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Architectures
Logic-Based Reactive Belief-Desire-Intention (BDI) Layered Architecture
Chapter 15 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Logic Based Agents Decision making is realized through
logical deduction View the agents as particular type of
knowledge based system Contains an explicitly represented symbolic
model of the world Takes decisions via symbolic reasoning
Problems: Translating the real world into an accurate
adequate symbolic description, in real-time How to represent information symbolically
about complex real-world entities
Chapter 15 18Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
A Rational Agent
Rationality depends on... The performance measure for success What the agent has perceived so far What the agent knows about the
environment The actions the agent can performAn ideal rational agent: for each possible
percept sequence, it acts to maximize its expected utility, on the basis of its knowledge and the evidence from the percept sequence
Chapter 15 19Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cognitive Architecture for an Agent
Beliefs, Desires, Intentions
Reasoner
Effectors
Sensors
Perceptions
Actions
Agent Alice
Beliefs, Desires, Intentions
Reasoner
Effectors
Sensors
Perceptions
Actions
Agent Bob
CommunicationInfrastructure
CommunicationInterfaces
Chapter 15 20Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Reactive Architecture
Does not rely on symbol manipulation, e.g., Rodney Brooks’ subsumption architecture
Intelligent behavior can be generated without explicit representations proposed by symbolic AI
Intelligent behavior can be generated without explicit abstract reasoning
Intelligence is an emergent property of certain complex systems
Chapter 15 21Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Subsumption Architecture
A hierarchy of task-accomplishing behaviors
Each behavior is a rather simple rule-like structure
Each behavior competes with others to exercise control over the agent
Lower layers present more primitive kinds of behavior
In terms of computation, the resulting systems are extremely simple
Chapter 15 22Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
BDI
Deciding on what goals to achieve and how to achieve them Beliefs – the information an agent has about
its surroundings Desires – the things that agent would like to
see achieved Intentions – things that an agent is
committed to doing A BDI architecture addresses how
beliefs, desires and intentions are represented, updated and processed
Chapter 15 23Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Action
output
brf
Generate options
filter
action
Sensor
input
beliefs
desires
intentions
Generic BDI Architecture
Chapter 15 24Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Architecture of BDI-Based Agent
Execution Cycle:1. New information arrives
that updates beliefs and goals
2. Actions are triggered by new beliefs or goals
3. A triggered action is intended
4. An intended action is selected
5. That intention is activated
6. An action is performed7. New beliefs or goals are
stored8. Intentions are updated
+run()+currentIntentionIsOK() : boolean(idl)+stopCurrentIntention()+chooseIntention()+perceiveEnvironment()+takeAction()
-B : BeliefSet-D : DesireSet-P : IntentionSet-I : Intention-e : Environment-name: String-a : Action
Agent
+run()+applyAction(in a : Action)
-a : AgentSet
Environment
+add(in a : Agent)+remove(in a : Agent)
-elements: Vector
AgentSet
+includeObservation()
-elements: Vector
BeliefSet
+getApplicable(in B : BeliefSet) : DesireSet
-elements: Vector
DesireSet
+getApplicable(in D : DesireSet, in B : BeliefSet) : IntentionSet
-elements: Vector
IntentionSet
+satisfies(in d : Desire) : boolean(idl)+execute(in a : Agent) : boolean(idl)+context(in B : BeliefSet) : boolean(idl)+stopExecuting()
-id: String-priority: int-d: Desire-a : Agent
Intention
-id: String-value: String
Belief
+context(in B : BeliefSet) : boolean(idl)
-id: String-priority: int
Desire
Action
Chapter 15 27Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Web Ontology Language – Services (OWL-S)
An OWL-S service description provides Declarative ads for properties and
capabilities, used for discovery Declarative APIs, used for execution A declarative description of services --
based on their inputs, outputs, preconditions, and effects -- used for composition and interoperation
Chapter 15 28Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
OWL-S Service Ontology
Service
ServiceGrounding
Resource
ServiceModel
ServiceProfile
provides
supports presents
describedBy
Chapter 15 29Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
OWL-S Compared to UDDI
Chapter 15 30Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
OWL-S Service ModelResource Service
ServiceProfile ServiceGrounding
ProfileProcess
AtomicProcess SimpleProcess CompositeProcess
ControlConstruct
ServiceModel
ProcessComponent
input
precondition
output
effect
provides
presents describedBy supports
hasProfile
realizes expand
components
computedInput
computedEffectinvocable
computedOutput
composedBy
computedPrecondition
Sequence Split RepeatUnit. . .
QualityRating
ServiceCategoryActor
ParameterDescription
ServiceParameter
Chapter 15 31Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
OWL-S Example: Processing Book Orders
CreateAccount
LoadAccount
ChooseBook
Add toOrder
SelectCredit Card
ChargeCredit Card
Book StoreSequence Process
Selection Process Iteration Process Choice Process
Choice Process
Chapter 15 32Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
OWL-S IOPE’s for Bookstore Example
Chapter 15 33Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Composition as Planning
Chapter 15 34Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Rules
Chapter 15 35Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Chapter 15 Summary