350 likes | 501 Views
Chapter 15: Agents. Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005. Highlights of this Chapter. Agents Introduced Agent Environments Agent Descriptions Abstractions for Composition Describing Compositions
E N D
Chapter 15:Agents Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005
Highlights of this Chapter • Agents Introduced • Agent Environments • Agent Descriptions • Abstractions for Composition • Describing Compositions • Service Composition as Planning • Rules Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Agents and MAS for SOC Why the interest in agents for services? • Need for autonomy, heterogeneity, dynamism • Need for high-level abstractions for engineering Unlike objects, agents • Know about themselves, their users, and their competitors • Use and reconcile ontologies • Are proactive and autonomous • Form commitments and communicate • Can be cooperative Service-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. • An agent is an active computational entity (could be implemented as an object with a thread) • With a persistent identity • Perceives, reasons about, and initiates activities in its environment • Communicates (with other agents) and changes its behavior based on others • These features make agents a worthwhile metaphor in computing Service-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 just) true beliefs Justifications are sometimes considered Desires: preferred states of the world Goals: consistent desires Intentions: goals adopted for action Service-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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Agent Abstractions: 3 Agents, when properly understood • Lead naturally to multiagent systems • Contrary to the traditional economic man, Robinson Crusoe, who thinks of everything else (even people) as just a resource • Provide a means to capture the fundamental abstractions that apply in all major applications and which are otherwise ignored by system builders Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Agents versus AI Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
How to Apply the Agent Abstractions Consider the components of a large and dynamic software system in a practical setting (such as business) • Dynamism => autonomy • Openness and compliance => ability to enter into and obey contracts • Trustworthiness => ethical behavior and social models of reputation Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Why Do Agent Abstractions Matter? Open, interactive applications demand going beyond traditional metaphors and models Potential SOC applications include • E-business: manufacturing supply chains, autonomous logistics • Dynamic markets: utility management • Communityware: social user interfaces • Problem-solving by teams (assisting humans; decision-support and business intelligence) Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
A Reactive Agent in an Environment Environment e; RuleSet r; while (true) { state = senseEnvironment(e); a = chooseAction(state, r); e.applyAction(a); } Service-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 the next state completely determined by the current state and the agent’s action? • History Freedom: does action choice depend on previous episodes or just the 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? Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Agent Architectures, Abstractly • Set of environmental states, S={s1,s2….} • Set of actions (of an agent), A = {a1,a2….} • Agent: a function S*A, which maps a sequence of environment states to an action • Behavior (evolution) of an environment: a function, Env: S x A Powerset(S) • An agent’s interaction with its environment corresponds to a history h, whereh = (a0, s0 ) ( a1,s1 ) ( a2,s2 )…(au, su) (au+1,su+1 ) … Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Agent Architectures • Logic-Based • Reactive • Belief-Desire-Intention (BDI) Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Logic-Based Agents • An agent is a knowledge-based system • Contains an explicitly represented symbolic model of the world • Takes decisions via symbolic reasoning (logical deduction) • Problems: • Maintaining accurate adequate symbolic descriptions of the real world in real-time • Representing information symbolically about complex real-world entities Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
A Rational Agent Rationality depends on... • The performance measure for success, usually taken as utility • What the agent has perceived so far • What the agent knows about the environment • The actions the agent can perform An 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Cognitive Architecture for an Agent Called a BDI (beliefs, desires, intentions) architecture • Like the reactive architecture at a coarse level, but with two differences: • Cognitive representations • Deeper reasoning based on the above representations Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Reactive Architecture • Seeks to produce intelligent behavior without explicit • Symbolic representations • Abstract reasoning • Intelligence is an emergent property of certain complex systems (depends on the environment too, not just the agent) • Cannot plan to drive a car to full detail • Reactively avoiding collisions while heading toward an attractor indicates intelligence Service-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 an agent would like to see achieved • Intentions: the desires that an agent is working on; also involves a deeper personal commitment • A BDI architecture addresses how beliefs, desires and intentions are represented, updated and processed Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Sensor input brf beliefs Generate options desires filter intentions action Generic BDI Architecture brf: belief revision function Generating options and filtering options are together called deliberation Action output Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Architecture of BDI-Based Agent Execution Cycle: • New information arrives that updates beliefs and goals • Actions are triggered by new beliefs or goals • A triggered action is intended • An intended action is selected • The selected intention is activated • An action is performed • New beliefs or goals are stored • Intentions are updated Service-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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
OWL-S Service Ontology Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
OWL-S Compared to UDDI Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
OWL-S Compared to BPEL4WS • Both OWL-S and BPEL4WS are orchestration languages: they provide a centralized characterization of a process • Unlike BPEL4WS, OWL-S cannot be executed Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
OWL-S Service Model The part from Process on down is how OWL-S captures the process model of a service Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
OWL-S Example: Processing Book Orders Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
OWL-S IOPEs for Bookstore Example Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Service Composition as Planning • Service composition can be framed as an automatic planning problem: • States of the world (current and desired or goal) can be represented formally • Each service invocation corresponds to an action, modeled with inputs, outputs, preconditions, and effects • A composed service is a plan that invokes the constituent services under suitable constraints of control and data flow Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Rules • A logical, fairly declarative, representation of decision making • Capture policies of individual participants • Capture requirements for interaction • Rules are desirable because they are • Modular: easier to read and maintain • Inspectable: easy to understand • Executable: no further translation needed • Expressive: (commonly) Turing complete and can capture knowledge that would otherwise not be captured declaratively • Compare with relational calculus (SQL) and description logics (OWL) Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Kinds of Rules • Reaction or (ECA) • On event if condition then perform action • Derivation rules: special case of above • Integrity constraints derive false if error • Inference rules • If antecedent then consequent • Supports multiple computational strategies • Forward chaining: conclusions derived • Backward chaining: premises needed for given conclusions Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Applying Reaction Rules • Capture protocols, policies, and heuristics as rules • Examples? • Often, combine reaction with inference rules (to check if a condition obtains) • Modeling challenge • What defines an event? • How to capture composite events by pushing event detection to lower layers Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Applying Inference Rules • Inference rules capture general requirements well • Need to be nonmonotonic or defeasible (over-ridable) in practice • Rules must be specialized to account for context • Easy enough operationally but difficult to characterize mathematically • Details get into logic programming with negation Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Use of Variables • Need free variables to make the rules generic in how they apply • In event and condition for ECA rules • In antecedent for inference rules • Should generally not have free variables in consequent to ensure “safety” • Free variable in action indicates perform action for each binding • Free variable in consequent means assert it for each binding Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Chapter 15 Summary • Agents provide the flexibility that realizes the benefits of SOC • Agents come with sophisticated abstractions that are closer to humanly expressed and understood requirements • Agents go beyond objects and procedural programming, and are supported by various programming methods • Self-study Jess Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns