330 likes | 452 Vues
This chapter explores the concept of agents in service-oriented computing, highlighting their role as active computational entities that perceive, reason, and act within dynamic environments. It discusses agent properties, such as autonomy, communication, and cooperation, emphasizing their relevance in various applications, including multi-agent systems (MAS). The chapter also covers agent architectures like BDI (Belief-Desire-Intention), logic-based systems, and reactive models, addressing the challenges of representing knowledge and decision-making in real-time scenarios, while emphasizing the importance of ethical behavior and compliance in agent interactions.
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
What is an Agent? The term agent in computing covers a wide range of behavior and functionality • An agent is an active computational entity • With a persistent identity • Perceives, reasons about, and initiates activities in its environment • Communicates (with other agents) and changes its behavior based on others • Agents model business partners naturally and fit into open environments Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Agents and MAS for SOC Relevance of agents for services? • Need for autonomy, heterogeneity, dynamism Unlike objects, agents • Are proactive and autonomous • Form commitments and communicate Moreover, agents can • Cooperate or compete • Model themselves, their users, and their competitors • Use and reconcile ontologies Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Modeling Agents: AI Traditionally, emphasize mental concepts 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Modeling Agents: MAS • Emphasize interaction • Social: about collections of agents • Organizational: about teams and groups • Ethical: about right and wrong actions • Legal: about contracts and compliance • Apply in all major applications • Support autonomy and communication, which are otherwise ignored 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
Mapping the Agent Abstractions Agents as components of an open system • Loose coupling => communication • Dynamism => autonomy • Openness and compliance => ability to enter into and obey contracts • Trustworthiness => ethical behavior 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 aspects relevant to actions be sensed? • Determinism: is the history completely determined by the initial state and the agent’s actions? • History Freedom: does action choice depend on previous episodes or just the current episode? • Dynamism: can the 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 decision 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) • Layered Architecture 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 ... • A performance measure for success (e.g., expected 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Reactive Architecture • Does not rely on symbol manipulation • Seeks to produce intelligent behavior without explicit • Symbolic representations • Abstract reasoning • Intelligence is an emergent property of certain complex systems • 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
Subsumption Architecture A kind of reactive 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 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 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 for 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 Service Model 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 IOPE’s for Bookstore Example Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Composition as Planning • Service composition can be framed as an automatic planning problem: • States of the world (current and desired) can be represented formally • Each service invocation corresponds to an action, modeled with inputs, outputs, preconditions, and effects • A composed service is like 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: Logical Representations • Rules are desirable because they are • Modular: easy 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) or description logics (OWL) • Declarative, although imperfectly so 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 • Support multiple computational strategies • Forward chaining; backward chaining 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 holds) • 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 • Elaboration tolerance requires defeasibility • Write general rules • Override them as need to specialize them to account for context • Leads to logical nonmonotonicity • 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