Transcript
Page 1: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Modeling, Auto-generation and Adaptation ofMulti-Agent Systems

Liang Xiao and Des Greer

School of Computer Science,

Queen's University Belfast,

UK

June 2005

Page 2: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Overview• Introduction and motivation

• Related Work

• The Adaptive Agent Model– Structural model

– Behavioral model

– Tool Support

– Implementation and deployment

– Adaptation

• Conclusion and future work

Page 3: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Introduction and motivationAgent-oriented systems

• Agents are active as opposed to passive objects.

• Agents must have dynamic behaviors and be adaptable.

• Existing agent platforms, like JADE, require to code agent behavior in fixed class methods.

• It is lack of uniformity in developing agent-oriented systems.

• Maintenance cost of such systems is high.

Page 4: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Related work• Agent Patterns - better code encapsulation and

reuse, but the chance that a pattern can be reused without change is low.

• Extensible Agent Behavior Specification Language (XABSL) – good at specifying individual agent behavior, but not sufficient for expressing inter-agent collaboration.

• Agent Behavior Representation Language (ABRL) – a convenient way to compose agent behaviors visually, but no assistance on the overall system modeling, and no agent system generation capability.

Page 5: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Solution – The Adaptive Agent Model (AAM)

• Our approach of AAM generates agent systems from models.

• AAM uses UML diagrams to model agent interactions and XML-based business rules to encode agent behaviors.

• Business customers are empowered to configure the models at run-time using a provided tool.

• Agent systems are easily maintained since AAM continuously reflects new requirements in customer revised models.

Page 6: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Structural Model

• Structural Models are built through Agent Diagrams – the counterpart of Class Diagrams in OO models.

• The models show agents, business rules, business classes and their relationship.

• Agents manage rules and rules manage the invocation of business classes.

• Agent/Rule/Class hierarchy is established.

Page 7: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

constraint

association

Call for proposal

RetailerAgent

……

orderProcessing () ……

CompanyAgent

order:Order ……

saleProcessing (order) ……

{ RetailerAgent. orderProcessing.actionMessage() equals to CompanyAgent. saleProcessing.eventMessage() }

Order

+ Order (b: BusinessInfo) + isOrderAttractive (): boolean + createProposal (): Proposal

• Agent interactions are modeled as message passing between them.

• One rule is responsible for the behavior of an agent in dealing with a particular situation.

• Business objects are used by rules to do the tasks.

A sample Agent Diagram for case study

Computer Science
We could anmate this???
Page 8: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Behavioral Model

• Behavioral Models are based on Structural Models, and built through Agent Communication Diagrams.

• The models organize agents, rules and messages around business processes.

• UML is used to model agent collaborations. Rule elements in UML are connected to form a flow of decision making, process by process, one decision being made at each connection point.

• The models visualize the actual system function in a sequence of agent actions dictated by rules.

Page 9: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Customer Agent

Retailer Agent

Company Agent

isOrderAttractive ()

isProposalSatisfactory ()

Call for proposal R2

R4

R1

R3 Propose

Accept proposal

Acknowledge Acknowledge

Place an order

• User specified agent collaborations in UML diagrams are used to generate the inter-agent part of the rules definition, in XML format.

• It is through these rules that agent systems are adapted both in collaborations and internally without re-code or regeneration.

A sample Agent Communication Diagram for case study

Page 10: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

• A rule defines that on receipt of an event (normally modeled as a message), how an agent would act on it if the condition of the rule is satisfied.

• Note that to make full use of a rule, multiple {condition, action} pairs can be used, so that, in different conditions, agents can take different actions.

Elements of rule

SaleProcessing

Action: If the order is attractive, create a “proposal” object for the order, encode it into a message and send the message to RetailerAgent

M

① Event: “Call for proposal” message received from RetailerAgent

M

Condition: check this “order” object of its attractiveness

order. isOrderAttractive ()

Belief:

RetailerAgent has placed an order at this moment

Processing:

construct a new “order” object from the message

Computer Science
Animate to reveal each bit 1-5
Page 11: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Rule definition in XML (identification section)

• A rule named “saleProcessing” is defined as a rule that controls the behavior of “CompanyAgent” while the agent participates in the “retailer business” process.

Page 12: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Rule definition in XML (business object section)

• Business classes “Order” and “Proposal” will be used by the rule “saleProcessing” with their instantiation “order” and “proposal”.

Page 13: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Rule definition in XML (event section)

• The rule will fire if its owner agent receives a “Call for proposal” message from the “RetailerAgent”.

Page 14: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Rule definition in XML (processing and condition section)

• Construct an “order” object using the information contained in the incoming message.

• Check if isOrderAttractive () method of the created object returns TRUE.

Page 15: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Rule definition in XML (action section)

• If TRUE, then generate a “proposal” object (including price for the order, order dispatch time, etc) using the constructed “order”, encode it into a message and send it to “RetailerAgent”.

Page 16: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

AAM Tool Support• UML diagrams are good at showing collaborations

among agents, while XML rules are good at precise definition of agent behaviors.

• An AAM CASE tool is developed for the specification of agent communication models in UML and rule definitions in XML.

• Rules can be defined either in XML text or using a more user-friendly tree structure in the left panel of the tool.

• Part of the <event> and <action> sections of rules can be generated when incoming/outgoing messages are specified in the tool and, <processing>, <condition> and <priority> sections are given afterwards by users.

• XML code is eventually generated from the completed tree structure and saved in a rules document.

Page 17: Modeling , Auto-generation and Adaptation of Multi-Agent Systems
Page 18: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Implementation and deployment• Once business processes are specified graphically

in the tool, agent interaction models, rule reaction patterns and message flows are established accordingly.

• Agent systems are automatically generated such that each rule maps to an agent behavior.

• XML-based rules are plugged in and are subsequently translated by agents at run-time.

• While the system is running, rules can be updated through the tool, so that agent behaviors are continuously updated.

Page 19: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Pseudo code of one agent behavior transformed from a rule

• All agents access a central XML-based rules document via a parsing package.

• A shared module called “Rule” is used by all behaviors with its ability to access the XML definition of rules and assemble corresponding objects.

• The methods getPriority(), getEvent(), and getAction() are provided by “Rule”.

Page 20: Modeling , Auto-generation and Adaptation of Multi-Agent Systems
Page 21: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Adaptation

• Inter-agent collaboration

• Intra-agent behavior

• Agent vocabularies

Page 22: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

• At inter-agent collaboration level, agent behaviors are guided by rules so that they do not need to know who they will contact in advance.

• Change <event>/<message>/<from> and <action>/<message>/<to> sections allows agents in the running system have their partners changed in order to accomplish the updated business processes.

• Suppose now we wish to introduce a new occasion where if the current “CompanyAgent” can not fulfill the order request, it forwards the order to another “CompanyAgent”.

• This new agent communication partnership can thus be established by adding another {condition, action} pair.

• The achievement of this dynamic collaboration is through painless model adjustment rather than expensive code change.

Adaptation - inter-agent collaboration level

Page 23: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

• At intra-agent behavior level, configure rules to invoke other class methods allow agents to take different actions or use different condition evaluation methods.

• By change the <event>, <processing>, <condition>, and <action> fields, alternative methods of the managed business objects can be selected for invocation.

• The rule “saleProcessing” can be re-configured to invoke a new evaluation method of the “Order” class or even a method of a new “Order” class to check the attractiveness of the order.

• It can also be re-configured with two pairs of {condition, action}, so that for ordinary customers and company customers, different ways to generate sale proposals can be used.

Adaptation – Intra-agent behavior level

Page 24: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

• Only business concepts registered through the tool and saved in the rules document may appear in agent messages.

• A new business class with attributes will be generated by the tool once a new business concept with its properties is registered with the tool.

• New vocabularies can become available for the specification of agent rules through the tree structure on the left panel of the tool.

• At run-time these new classes with new methods can become available for invocation by the running agent system.

• All agents will be able to understand the new vocabularies the other agents in the system are using even those registered after the system has been running for a while.

Adaptation – agent vocabularies

Computer Science
Can we omit this slide and explain this verbally when the tool windoiw is shown?
Page 25: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Conclusion• In Adaptive Agent Model, agent behaviors are

modeled and externalized as rules, and represented in UML diagrams.

• They are centrally managed and easy to be changed through the models or the XML-based definitions.

• Because rules are easy to edit, deploying new requirements requires minimal effort.

• The rules are, in effect, executable requirements.

Page 26: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Future work• In the future, we expect to achieve self-adaptivity in

the AAM where, as agents interact with end users they perceive their behaviors and preferences.

• This allows agents to update their beliefs, and so deduce rules that can be added to the central rules document.

• These inferred rules can be shared and executed by all agents and are subject to amendment.

• After some time, a mature and reliable rule set, independent of those acquired through the tool can be established.

Page 27: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

End users

Business people (business infrastructure/architecture designer)

AAM CASE tool

Business Rules Document

(including UML models & rules)

Generation

Business people (business decision maker)

Agent System

Adaptive Information (behaviors)

Feedback

Adaptive Information (requirements)

Agent beliefs

Future vision

Page 28: Modeling , Auto-generation and Adaptation of Multi-Agent Systems

Questions?


Recommended