<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>On the Use of Patterns in Agent System Design</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michael Weiss</string-name>
          <email>weiss@scs.carleton.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computer Science, Carleton University</institution>
          ,
          <addr-line>Ottawa</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>In this paper we make a case for a pattern-driven approach to agent system design that
complements the goal-driven approach of most design methodologies.</p>
      <p>
        Current approaches to agent system design such as Gaia [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], and MASSIVE [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
are generally goal-driven. This is understandable given the nature of agents as
goaldriven entities. Therefore, in these design approaches, an agent system is designed by
iteratively decomposing system goals until they can be assigned to individual agents.
      </p>
      <p>However, this may lead developers to solve the same design problems over and
over without benefiting from how they were resolved in the past, resulting in
duplicated effort, and inconsistent designs. A more effective and less ad hoc approach is to
build an agent system incrementally from well-documented interaction patterns.</p>
      <p>
        In the sections below we introduce the notions of patterns and agent patterns, and
discuss the role of patterns in agent system design. Following that we outline the
steps of a pattern-based methodology, and relate it to our current work on formalizing
agent patterns using the non-functional requirements (NFR) framework [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Patterns are reusable solutions to recurring design problems, and provide a vocabulary
for communicating these solutions to others. The documentation of a pattern goes
beyond documenting a problem and its solution. It also describes the forces or design
constraints that give rise to the proposed solution [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. These are the undocumented and
generally misunderstood features of a design. Forces can be thought of as pushing or
pulling the problem towards different solutions. A good pattern balances the forces.
      </p>
      <p>Patterns are not used in isolation. Although individual patterns are useful at
solving specific design problems, we can benefit further from positioning them among
one another to form a pattern language. Each pattern occupies a position in a network
of related patterns, in which each pattern contributes to the completion of patterns
“preceding” it in the network, and is completed by patterns “succeeding” it.</p>
      <p>
        A pattern language guides developers through the process of generating a system.
Beck and Johnson [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] describe this generative quality of patterns: “Describing an
architecture with patterns is like the process of cell division and specialization that drives
growth in biological organisms. The design starts as a fuzzy cloud representing the
system to be realized. As patterns are applied to the cloud, parts of it come into focus.
When no more patterns are applicable, the design is finished.”
      </p>
      <p>
        There is by now a growing literature on the use of patterns to capture common
design practices for agent systems [
        <xref ref-type="bibr" rid="ref3 ref7 ref8">3, 8, 7</xref>
        ]. Aridor and Lange [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] describe a set of
domain-independent patterns for the design of mobile agent systems. They classify
mobile agent patterns into traveling, task, and interaction patterns. Kendall et al [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
capture common building blocks for the internal architecture of agents in patterns.
      </p>
      <p>
        Deugo and Weiss [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] identify a set of patterns for agent coordination, which are,
again, domain-independent. They classify agent patterns into architectural,
communication, traveling, and coordination patterns. They also describe an initial set of global
forces that push and pull solutions for coordination. Kendall [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] reports on work on a
domain-specific catalog of patterns developed at BT. Weiss [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] describes a pattern
language for agent-based e-commerce. In related work, Kolp and Giorgini [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
document organizational styles for multi-agent systems using the Tropos framework.
      </p>
      <p>
        The separate notion of an agent pattern can be justified by differences between the
way agents and objects communicate, their level of autonomy, and social ability [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
Agent patterns are documented in a similar manner as patterns, except for the structure
of an agent pattern where we will make use of role models [
        <xref ref-type="bibr" rid="ref13 ref9">13, 9</xref>
        ] instead of
collaboration diagrams. The distinction between role models and collaboration diagrams is the
level of abstraction: a collaboration diagram shows the interaction of instances,
whereas a role model shows the interaction of roles to be filled.
3
      </p>
    </sec>
    <sec id="sec-2">
      <title>Pattern-driven Agent System Design</title>
      <p>Instead of proceeding from high-level goals and arriving at an implementation through
iterative refinement, in a pattern-driven approach we start from proven solutions, and
compose our system by systematically instantiating patterns. The goal-driven and
pattern-driven approaches to design are, of course, complementary. Our experience
building agent systems suggests that the design approach that proceeds in both a
topdown and a bottom-up direction in parallel will lead to the best results</p>
      <p>
        The implementation of the pattern-directed approach involves the following steps.
We are currently building a tool that assists the designer with this process.
Identify Domain Forces. For a given domain identify the core design trade-offs
(called forces in patterns) that push and pull the design into different directions. For
example, for the e-commerce domain, these include information overload, search costs,
privacy, ensuring quality, and identity (see [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] for more detail). In addition, there are
forces motivating the use of agents (such as autonomy, need to interact, multiple
interfaces, and adaptability) to be considered for all domains.
      </p>
      <p>
        Document Roles. Document the roles and their subtypes used in the pattern
language. Individual patterns document how these roles interact in a given design
context. The task of the designer is, by selecting patterns, to assign roles to agents. In
the example of the e-commerce domain, we identified four top-level roles as User,
Task, Service, and Resource; these should be applicable to other domains, as well.
Document Patterns and their Dependencies. Document the patterns and their
dependencies in the form of a pattern language. Each pattern should document the
forces it helps resolve, and how instantiating the pattern will change the system. This
includes the resulting role model and the forces that still need to be resolved.
Semiformal methods can be used to document the forces in a pattern. In Araujo and Weiss
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] we have investigated the use of the NFR framework to document patterns.
Identify the Overall Design Goals. Identify the overall design goals, both
functional and non-functional. Generally, the identification of patterns based on merely
functional goals is rather straightforward. However, although multiple patterns may
satisfy the same functional goals, their implications on the design in terms of
nonfunctional goals must be carefully considered. The main thrust of our semi-formal
pattern representation is geared towards matching on non-functional goals.
Select Patterns. In a first pass, select patterns based on how well they match the
functional goals of the system, and then refine the selection by considering
nonfunctional design goals. Compare the patterns and rank them on basis of their
compatibility with these goals. In our tool we will use the algorithm described in
McPhail and Deugo [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Repeat this step until all forces have been resolved.
4
      </p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>In this paper we described a pattern-driven approach to agent system design. This
approach is complementary to the goal-driven approach that most published
methodologies use. The combined design approach proceeds, in parallel, in a top-down
(goaldriven) and a bottom-up (pattern-driven) direction.</p>
      <p>Work on agent patterns is still at an initial stage. Before patterns can play the same
role for agent system design as in the object-oriented world, further work is required.
One problem is that only a relatively small number of agent patterns have been
documented to date, when compared to the number of object patterns.</p>
      <p>More work is required to document the forces that govern agent system design, and
to understand their interactions. A related open problem is the selection of a pattern
that is compatible with the stated functional and non-functional goals of an
application. We are working on a new pattern representation using the NFR framework.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Alexander</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>A Pattern</given-names>
            <surname>Language</surname>
          </string-name>
          , Oxford University Press,
          <year>1977</year>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Araujo</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Weiss</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <article-title>Using the NFR Framework for Representing Patterns, submitted to Pattern Languages of Programming (PLoP-02</article-title>
          ),
          <year>2002</year>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Aridor</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lange</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Agent Design Patterns:
          <article-title>Elements of Agent Application Design</article-title>
          , Second Intl. Conference on Autonomous Agents, IEEE,
          <year>1998</year>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Beck</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , and Johnson, R.,
          <source>Patterns Generate Architectures, European Conference o n Object Oriented Programming (ECOOP-94)</source>
          ,
          <fpage>139</fpage>
          -
          <lpage>149</lpage>
          ,
          <year>1994</year>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Chung</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Representing</surname>
            and
            <given-names>Using</given-names>
          </string-name>
          <string-name>
            <surname>Non-Functional Requirements</surname>
            :
            <given-names>A</given-names>
          </string-name>
          <string-name>
            <surname>Process-Oriented</surname>
            <given-names>Approach</given-names>
          </string-name>
          , Department of Computer Science University of Toronto,
          <year>1993</year>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Deugo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oppacher</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , et al,!
          <article-title>Patterns as a Means for Intelligent Software Engineering</article-title>
          , Intl.
          <source>Conference on Artificial Intelligence (IC-AI 99)</source>
          , CSREA Press,
          <fpage>605</fpage>
          -
          <lpage>611</lpage>
          ,
          <year>1999</year>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Deugo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weiss</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Kendall</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <article-title>Reusable Patterns for Agent Coordination</article-title>
          , in: Omicini,
          <string-name>
            <surname>A.</surname>
          </string-name>
          , et al (eds.),
          <source>Coordination of Internet Agents</source>
          , Springer,
          <year>2001</year>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kendall</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murali</surname>
            <given-names>Krishna</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Pathak</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          et al,
          <source>Patterns of Intelligent and Mobile Agents</source>
          , Second Intl. Conference on Autonomous Agents, IEEE,
          <year>1998</year>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kendall</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Role</surname>
            <given-names>Models</given-names>
          </string-name>
          :
          <article-title>Patterns of Agent System Analysis and Design, Agent Systems</article-title>
          and Applications/Mobile Agents (ASA/MA-99), ACM,
          <year>1999</year>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Kolp</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giorgini</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <article-title>A Goal-Based Organizational Perspective o n Multi-Agent Architectures</article-title>
          , Eighth Intl. Workshop on Agent Theories, Architectures, and
          <string-name>
            <surname>Languages (ATAL-2001)</surname>
          </string-name>
          ,
          <year>2001</year>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Lind</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <source>Iterative Software Engineering for Multi-Agent Systems: The MASSIVE Method, LNCS 1994</source>
          , Springer,
          <year>2001</year>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>McPhail</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Deugo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <source>Deciding on a Pattern, 14th Intl. Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems (IEA/AIE-01) LNCS</source>
          <year>2070</year>
          , Springer,
          <year>2001</year>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Riehle</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Gross</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <source>Role Model Based Framework Design and Integration</source>
          , Conference on Object- Oriented
          <string-name>
            <surname>Programs</surname>
          </string-name>
          ,
          <source>Systems, Languages, and Applications (OOPSLA-98)</source>
          ,
          <fpage>117</fpage>
          -
          <lpage>133</lpage>
          , ACM,
          <year>1998</year>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Weiss</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <article-title>Patterns for e-Commerce Agent Architectures: Using Agents as Delegates</article-title>
          ,
          <source>Pattern Languages of Programming (PLoP-01)</source>
          ,
          <year>2001</year>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Wooldridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jennings</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Kinny</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <article-title>The Gaia Methodology for Agentoriented Analysis and Design</article-title>
          , Journal of Autonomous Agents and
          <string-name>
            <surname>Multi-Agent</surname>
            <given-names>Systems</given-names>
          </string-name>
          ,
          <year>2002</year>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>