Xem mẫu

Patterns for Designing Agent-Based E-Business Systems Figure 2. Role diagram for the USER AGENT pattern DJHQWVFDQEHFODVVL¿HGDVdelegates, representing a single user and acting on his behalf, ormediators or intermediaries acting on behalf of a group of users, facilitating between them. It is important to point out that objects cannot achieve these goals directly. A differentiating characteristic between agents and objects is their autonomy. Autonomy is here used in an extended sense. It not only comprises the notion that agents operate in their own thread of control, but also implies that agents are long-lived (they execute unattended for long periods), take initiative (they do not simply act in response to their environ-ment), react to stimuli from the environment as guided by their goals (the receiving agent decides whether and how to respond to a stimulus), and interact with other agents to leverage their abilities in support of their own as well as collective goals. Activeobjects, on the other hand, are autonomous RQO\LQWKH¿UVWRIWKHVHVHQVHV A society of agents can be viewed from two dual perspectives: either a society of agents emerges as a result of the interaction of agents, or the society imposes constraintsandpolicies on its component agents. Both perspectives, which we can refer to as micro and macro view of the society, respectively, mutually reinforce each other, as shown in Figure 3. For example, emer-gent behaviors such as specialization of agents leads to the notion of roles that agents play, which allow us to codify expectations about an agent. Roles, in turn, impose restrictions on the possible behaviors of agents (Ferber, 1999). This suggests two approaches to systematically GHVLJQLQJDJHQWVRFLHWLHV,QWKH¿UVWDSSURDFK we identify top-level goals for the system and decompose them recursively, until we can assign them to individual agents. In the second approach, we construct an agent society incrementally from a catalog of interaction patterns (Kendall et al., 1999). These interaction patterns are described in terms of roles that agents can play and their interactions and may also specify any societal FRQVWUDLQWVRUSROLFLHVWKDWQHHGWREHVDWLV¿HG Roles are abstract loci of control (Ferber, 1999; Kendall, 1999; Riehle & Gross, 1998). Protocols (or patterns of interaction) describe the way the UROHVLQWHUDFW3ROLFLHVGH¿QHFRQVWUDLQWVLPSRVHG by the society on these roles (Weiss, Gray, & Diaz, 1997; Zambonelli, Jennings, et al., 2001). As an example of a policy, consider an agent-mediated DXFWLRQ ZKLFK VSHFL¿HV FRQYHQWLRQV VSHFL¿F to its auction type (for example, regarding the order of bids; ascending in an English auction, descending in a Dutch auction) that participating agents must comply with in order for the auction to function correctly. Many types of applications, including elec-tronic commerce systems, can be modeled using User, Task, Service, and Resource roles, and their subtypes. Figure 4 depicts these roles and their subtypes used in this chapter in a role diagram, using the notation introduced in Kendall (1999). Role diagrams are more abstract than class GLDJUDPV(DFKUROHLQWKHGLDJUDPGH¿QHVD 2374 Patterns for Designing Agent-Based E-Business Systems Figure 3. Micro-macro view of an agent society Figure 4. Top-level roles and their subtypes in this pattern language position and a set of responsibilities. A role has collaborators—other roles that it interacts with. Arrows between roles indicate dynamic interac-tions between roles; their direction represents the direction in which messages are sent. The triangle indicates a subtyping relationship between roles; subtypes inherit the responsibilities of their parent roles and add responsibilities of their own (e.g., Buyer from Trader). The User role encapsulates the behavior of managing a user’s task agents, providing a presentation interface to the user and collecting SUR¿OHLQIRUPDWLRQDERXWWKHXVHUDPRQJRWKHU responsibilities. A Task role represents users LQDVSHFL¿FWDVNW\SLFDOO\DORQJOLYHGUDWKHU than one-shot transaction. In this context, we only consider Trader agents, which can either represent the user as a Buyer or Seller. The com- mon functionality of both roles (for example, they represent the negotiation strategies of their users) is represented in the trader role. Another example of a Task role would be a search role that encapsulates the behavior of making queries WRWKH:HERQWKHXVHU¶VEHKDOIDQG¿OWHULQJWKH results. One could also model transactions as a separate Transaction role as proposed by Ulmer (2004), representing the transactions a Task agent engages in. A Mediator role typically provides a service to a group of users. It mediates the interaction between two or more agents through this service. One example is a directory agent that provides a reference to an agent given its name (white pages agent), or references to agents that can provide a certain product or service (yellow pages agent). More advanced services facilitate more complex 2375 Patterns for Designing Agent-Based E-Business Systems interactions between agents, for example, enforc-ing an auction protocol. For example, see the recommender agents described in Weiss (2004) or the direction and auction agents in Fonseca, Griss, and Letsinger (2001). The Resource role abstracts information sources. These can be legacy data sources wrapped E\³JOXH´FRGHWKDWFRQYHUWVJHQHULFUHTXHVWVIURP other agents to the API of the data source. These Problem How do you instruct assistants? How much dis-cretion should you give to assistants? How do you manage the assistants that perform tasks on your behalf? Forces can be agents that process more complex queries E\¿UVWEUHDNLQJWKHPGRZQLQWRVXETXHULHVDQG then collating the results. Resource agents are • Information overload • Search costs a form of Indirection Layer (Avgeriou & Zdun, 1RWL¿HUDJHQWVDOVREHORQJLQWKLVFDWHJRU\ they can be instructed to generate an alert when a certain condition in a data source is being met. For example, the Amazon Deliver’s agent sends e-PDLOVWRXVHUVZKHQDERRNPHHWLQJXVHUVSHFL¿HG criteria (such as author) is added to a catalog. Resulting Context For members of an agent society to understand each other, they need to agree on common ex-change formats, as described inCOMMON VOCABU-LAR . For agents that act on behalf of a single user, which is what e-business front-end system are concerned with, consult AGENT AS DELEGATE. For agents that facilitate between a group of users and their agents, refer toAGENT AS MEDIATOR described in more detail in Weiss (2004). AGENT AS DELEGATE Context You are designing your system as a society of autonomous agents (AGENT SOCIETY) and want to delegate a user’s time-consuming, peripheral tasks to software assistants. Solution Use agents to act on behalf of the user. They are the system’s interface to the user and manage WDVNVSHFL¿FDJHQWVVXFKDVEX\HURUVHOOHUDJHQWV on the user’s behalf. User agents can also learn about the needs of the user by building a user SUR¿OHIURPDKLVWRU\RILQWHUDFWLRQV7KLVXVHU SUR¿OHDOORZVVHOOHUVWRFXVWRPL]HWKHLURIIHULQJV WRVSHFL¿FXVHUWDVWHVZKLOHWKHXVHUDJHQWVFRQWURO ZKDWSDUWRIDSUR¿OHVHOOHUVFDQDFFHVV The structure of this pattern is shown in Figure 5. This role diagram shows the roles agents need WR¿OOLQWKHSDWWHUQ1RWHWKDWZHLQWURGXFHG the role of a Trader agent, as discussed in AGENT SOCIET , which contains the beliefs and behavior common to both Buyer and Seller agents. For example, both Buyer and Seller agents have a belief for the desired price and make offers and counter-offers to other agents. Resulting Context For the interaction with the user to gather their requirements and feedback on the quality of the service received by a seller and for managing Task agents, consult USER AGENT. Also consult USER AGENT for measures to control access to user SUR¿OHV)RUWKHGHVLJQRI7UDGHUDJHQWVVHH UYER AGENT and SELLER AGENT 2376 Patterns for Designing Agent-Based E-Business Systems Figure 5. Role diagram for AGENT AS DELEGATE COMMON VOCABULARY Context When agents in an AGENT SOCIETY interact, they need to agree on common exchange formats. One scenario is that you are using agents to represent customers and sellers in individual transac-tions—BUYER AGENT andSELLER AGENT Buyer and seller agents need to understand each other in order to exchange messages with one other. Another VFHQDULRLVWKDW\RXQHHGWRGHULYHDXVHUSUR¿OH from user interactions —USERPROFILING—and you require your information sources such as product catalogs to be well structured. Problem How do you enable agents (for example, buyer and seller agents) to interact? How can you make it easier for a comparison-shopping agent to extract data from a catalog? Forces related concepts that each party must use during interaction, their attributes, and valid value ranges. On receiving a message, the seller agent translates WKHUHTXHVWWRDVHOOHUVSHFL¿FIRUPDWDQGIHWFKHV the contents of the product database. ,WLVJHQHUDOO\LPSUDFWLFDOWRGH¿QHDJHQHUDO purpose ontology for agent interaction. These are unlikely to include the intricacies of all possible domains. Instead, the common ontology will be DSSOLFDWLRQVSHFL¿F*LYHQVXFKDVKDUHGRQWRO-ogy, the communicating agents need to map their internal representations to the shared ontology. Much progress has been made on XML-based ontologies for electronic commerce, for example, xCBL, cXML, and RosettaNet, in recent years. Given that buyer and seller agents adopt one of these standards as their internal representation of domain concepts, the problem remains of building inter-ontology translators. One prag-matic approach to ontology mapping using XSLT (XML stylesheet language transformation) is described in Carlson (2001). However, refer to the references in the Resulting Context for more complex mappings. The structure of this pattern is shown in Fig- • Multiple interfaces XUH7KLV¿JXUHZDVDGDSWHGIURP&ROOLVDQG Lee (1999). Solution In the example, for buyer and seller agents to understand each other, they need to agree on a common message format that is grounded in a FRPPRQRQWRORJ\7KHRQWRORJ\GH¿QHVSURGXFW Resulting Context This pattern does not itself lead to other patterns in this pattern language. But patterns for ontologies have been documented elsewhere (Aranguren, 2005; Reich, 2000). A current overview on tech- 2377 Patterns for Designing Agent-Based E-Business Systems Figure 6. Role diagram for COMMON VOCABULARY niques for ontology mapping, which could be mined for further ontology mapping patterns, can be found in Staab and Stuckenschmidt (2006). USER AGENT Context You are delegating tasks to an agent—AGENT AS DELEGATE—which autonomously performs the task on behalf of the user. Now you want to cre-ate a locus of control through which the users can interact with the agents created on their behalf. Problem +RZGR\RXPDQDJHWKHXVHU¶VSUR¿OHDQGFRQWURO access to it and the various (concurrent) transac-tions in which the user participates? Forces on behalf of its user. The user agent manages the XVHU¶VSUR¿OHDQGFRQWUROVZKRFDQDFFHVVLW7KH 2SHQ3UR¿OLQJ6WDQGDUG:&ZDVDQHDUO\ example of employing user agents in this way. In WKLVSURSRVDOSUR¿OHLQIRUPDWLRQIRUGLIIHUHQW VHOOHUVZDVVWRUHGLQDSHUVRQDOSUR¿OHUHSRVLWRU\ 6HFWLRQVRIWKHSUR¿OHFRXOGEHUHVWULFWHGWRD subset of the sellers. In the SOaP system (Voss & Kreifelts, 1997), user agents track all task agents for tasks in which a user is engaged. The structure of this pattern is shown in Figure 7. Resulting Context A user can subscribe to the progress of a query or an order by instructing a NOTIFICATION AGENT to monitor its status. For more on modeling the user that requires explicit user input is kept at a minimum; consult USER PROFILING. BUYER AGENT • Privacy concerns • Ensuring quality Context Solution User agents form the interface between the user and the system receive the user’s queries and feedback, and present information tailored to users. A user agent delegates the user’s queries or orders (offers to buy/sell an item) to a trader agent and manages the various buyer and seller agents You are delegating tasks to an agent—AGENT AS DELEGATE—and provide a locus of control where users can interact with their agents—USER AGENT You need an agent to represent a user as a cus-tomer in a transaction with sellers in an electronic marketplace. 2378 ... - tailieumienphi.vn
nguon tai.lieu . vn