Agent-Oriented Software Engineering

10 downloads 506 Views 787KB Size Report
Software engineering provides models & techniques ... The Case for Agent-Oriented Software Engineering. III. ... Every manager will pay lip service to it. Every.
Agent-Oriented Software Engineering Nick Jennings Dept of Electronics and Computer Science University of Southampton, UK. [email protected] http://www.ecs.soton.ac.uk/~nrj/

Software Development is Difficult ♦ One of most complex construction task humans undertake “Computer science is the first engineering discipline ever in which the complexity of the objects created is limited by the skill of the creator and not limited by the strength of the raw materials. If steel beams were infinitely strong and couldn’t ever bend no matter what you did, then skyscrapers could be as complicated as computers.” Brian K. Reid

♦ True whatever models and techniques are applied “the essential complexity of software” Fred Brooks ♦ Software engineering provides models & techniques that make it easier to handle this essential complexity 2

Software Development is Getting Harder ♦Shorter development lifecycles ♦More ambitious requirements ♦Less certain requirements

• Greater scope for change ♦More challenging environments

• Greater dynamism • Greater openness 3

Software Engineering: Continually Playing Catch Up ♦Better Models

• components • design patterns • software architectures • interacting agents

♦Better Processes

• light methods • heavier methods

“Our ability to imagine complex applications will always exceed our ability to develop them” Grady Booch 4

The Adequacy Hypothesis

Agent-oriented approaches can enhance our ability to model, design and build complex distributed software systems.

5

Talk Outline I.

The Essence of Agent-Based Computing

II.

The Case for Agent-Oriented Software Engineering

III.

Potential Drawbacks

IV.

Conclusions

6

Talk Outline I.

The Essence of Agent-Based Computing

II.

The Case for Agent-Oriented Software Engineering

III.

Potential Drawbacks

IV.

Conclusions “The intolerable wrestle with words and meanings.” T. S. Eliot 7

Agent “encapsulated computer system, situated in some environment, and capable of flexible autonomous action in that environment in order to meet its design objectives” (Wooldridge)

8

Agent “encapsulated computer system, situated in some environment, and capable of flexible autonomous action in that environment in order to meet its design objectives” (Wooldridge)

♦ control over internal state and over own behaviour

9

Agent “encapsulated computer system, situated in some environment, environment and capable of flexible autonomous action in that environment in order to meet its design objectives” (Wooldridge)

♦ control over internal state and over own behaviour ♦ experiences environment through sensors and acts through effectors

10

Agent “encapsulated computer system, situated in some environment, and capable of flexible autonomous action in that environment in order to meet its design objectives” (Wooldridge)

♦ control over internal state and over own behaviour ♦ experiences environment through sensors and acts through effectors

♦ reactive: respond in timely fashion to environmental change ♦ proactive: act in anticipation of future goals

11

Definitional Malaise “My guess is that object-oriented programming will be what structured programming was in the 1970s. Everybody will be in favour of it. Every manufacturer will promote his product as supporting it. Every manager will pay lip service to it. Every programmer will practice it (differently). And no one will know just what it is.” (Rentsch, 82)

“My guess is that agent-based computing will be what objectoriented programming was in the 1980s. Everybody will be in favour of it. Every manufacturer will promote his product as supporting it. Every manager will pay lip service to it. Every programmer will practice it (differently). And no one will know just what it is.” (Jennings, 00) 12

Multiple Agents In most cases, single agent is insufficient

• no such thing as a single agent system (!?) • multiple agents are the norm, to represent: n n n n

natural decentralisation multiple loci of control multiple perspectives competing interests 13

Agent Interactions ♦ Interaction between agents is inevitable



to achieve individual objectives, to manage interdependencies

♦ Conceptualised as taking place at knowledge-level



which goals, at what time, by whom, what for

♦ Flexible run-time initiation and responses



cf. design-time, hard-wired nature of extant approaches

paradigm shift from previous perceptions of computational interaction 14

Agent-Based Manufacturing Control Store of Part B’s

O

O

Store of Part C’s

O

O

O3 Orders A:O2; B:O 3; C:O 8

O1

O

O3, O4

O7, O8

O O2 O6

O2 Store of Part A’s O5

O9

O1, O2 Redo Buffer

O6

15

Agent-Based Manufacturing Control Store of Part B’s

O4

O O3 O

Store of Part C’s

O

O

O3 Orders A:O1; B:O 4; C:O 7

O1

O

O O21

O3, O4

O2

O7, O8

O6

O2 Store of Part A’s O5

O9

O1, O2 Redo Buffer

O6

16

Agent-Based Manufacturing Control Store of Part B’s

O4

O1

O O1

Store of Part C’s

O

O

O3

O1

O

O O3 O O4

O2

O3, O4

O2

O7, O8

O6

O2 Store of Part A’s O5

O9

O1, O2 Redo Buffer

O6

17

Agent-Based Manufacturing Control Store of Part B’s

O

O

Store of Part C’s

O

O

O4 O1

O3, O4

O7, O8

O5 O

O5

O

O6

O2 Store of Part A’s O5

O9

O1, O2 Redo O2

Buffer

O6

18

Agent-Based Manufacturing Control Store of Part B’s

O1

O

O

O

Store of Part C’s

O3, O4

O

O

O7, O8

O5

O

O6

O2 Store of Part A’s

O4 O5 O5

O9

O1, O2 Redo O2

Buffer

O6

19

Agent-Based Manufacturing Control Store of Part B’s

O1

O

O

O

Store of Part C’s

O3, O4

O

O

O7, O8

O5

O

O6

O2 Store of Part A’s

O6 O6 O2

O5

O9

O1, O2 Redo Buffer

O6

20

Agent-Based Manufacturing Control Store of Part B’s

O

O

Store of Part C’s

O

O

O7 O1

O

O3, O4

O6 O6

O5

O

O7, O8

O6

O2 Store of Part A’s O2

O5

O9

O1, O2 Redo Buffer

O6

21

Agent-Based Manufacturing Control Store of Part B’s

O1

O

O

O

Store of Part C’s

O3, O4

O7

O

O7, O8

O6 O6

O

O6

O2 Store of Part A’s

O5 O5 O5

O9

O1, O2 Redo Buffer

O6

22

Agent-Based Manufacturing Control Store of Part B’s

O

O

Store of Part C’s

O

O

O7 O1

O

O3, O4

O7, O8

O O6

O2 Store of Part A’s

O6 O6

O9 O9

O5

O9

O1, O2 Redo Buffer

O6

23

Agent-Based Manufacturing Control Store of Part B’s

O

O

Store of Part C’s

O

O

O8 O1

O

O3, O4

O7, O8

O6 O6

O

O6

O2 Store of Part A’s

O9 O9 O9 O5

O9

O1, O2 Redo Buffer

O6

24

Agent-Based Manufacturing Control Store of Part B’s

O1

O

O

O

Store of Part C’s

O3, O4

O8

O

O7, O8

O6 O6

O

O6

O2 Store of Part A’s O5

O9

O1, O2

O9 O9 O9

Redo Buffer

O6

25

Agent-Based Manufacturing Control Store of Part B’s

O

O

Store of Part C’s

O

O

O8 O1

O

O3, O4

O7, O8

O O6

O2 Store of Part A’s

O9 O9 O5

O9

O1, O2

O9 O9 O9

Redo Buffer

O6

26

Agent-Based Manufacturing Control Store of Part B’s

O1

O

O

O

Store of Part C’s

O3, O4

O

O

O7, O8

O O6

O2 Store of Part A’s

O9 O9 O9 O5

O9

O1, O2

O9 O9 O9

Redo Buffer

O6

27

Agent-Based Manufacturing Control Store of Part B’s

O1

O

O

O

Store of Part C’s

O3, O4

O

O

O7, O8

O O6

O2 Store of Part A’s O5

O9

O1, O2

O9 O9 O9

Redo Buffer

O6

O9 O9 28 O9

Organisations Agents act/interact to achieve objectives:

• on behalf of individuals/companies • part of a wider problem solving initiative underlying organisational relationship between the agents

29

Organisations This organisational context:



influences agents’ behaviour n

relationships need to be made explicit – peers – teams, coalitions – authority relationships

• is subject to ongoing change n

provide computational apparatus for creating, maintaining and disbanding structures 30

A Canonical View Agent Interactions

Sphere of influence

Organisational relationships

Environment (see also: Castelfranchi, Ferber, Gasser, Lesser, …..) 31

Talk Outline

ü I.

The Essence of Agent-Based Computing

II.

The Case for Agent-Oriented Software Engineering

III.

Potential Drawbacks

IV.

Conclusions

32

Making the Case: Quantitatively Software Metrics 50 40 30 20 10 0 Productivity

Reliability Objects

Maintainability

Agents

“There are 3 kinds of lies: lies, damned lies and statistics” Disraeli 33

Making the Case: Qualitatively

34

Making the Case: Qualitatively Software techniques for tackling complexity

35

Tackling Complexity ♦Decomposition ♦Abstraction ♦Organisation

36

Making the Case: Qualitatively Software techniques for tackling complexity

Nature of complex systems 37

Complex Systems

(Herb Simon)

♦ Complexity takes form of “hierarchy” • not a control hierarchy • collection of related sub-systems at different levels of abstraction ♦ Can distinguish between interactions among subsystems and interactions within sub-systems • latter more frequent & predictable: “nearly decomposable systems” ♦ Arbitrary choice about which components are primitive ♦ Systems that support evolutionary growth develop more quickly than those that do not: “stable intermediate forms” 38

Making the Case: Qualitatively Software techniques for tackling complexity Agent-based computing

Nature of complex systems 39

Making the Case: Qualitatively Software techniques for tackling complexity

Degree of Match

Agent-based computing

Nature of complex systems 40

The Match Process 1. Show agent-oriented decomposition is effective way of partitioning problem space of complex system 2. Show key abstractions of agent-oriented mindset are natural means of modelling complex systems

41

The Match Process 1. Show agent-oriented decomposition is effective way of partitioning problem space of complex system 2. Show key abstractions of agent-oriented mindset are natural means of modelling complex systems

42

Decomposition: Agents ♦ In terms of entities that have: • own persistent thread of control (active: “say go”) • control over their own destiny (autonomous: “say no”)

♦ Makes engineering of complex systems easier:

• natural representation of multiple loci of control n

“real systems have no top” (Meyer)

• allows competing objectives to be represented and reconciled in context sensitive fashion 43

Decomposition: Interactions ♦ Agents make decisions about nature & scope of interactions at run time ♦ Makes engineering of complex systems easier:

• unexpected interaction is expected n

not all interactions need be set at design time

• simplified management of control relationships between components n

coordination occurs on as-needed basis between continuously active entities 44

The Match Process

ü

1. Show agent-oriented decomposition is effective way of partitioning problem space of complex system 2. Show key abstractions of agent-oriented mindset are natural means of modelling complex systems

45

Suitability of Abstractions ♦ Design is about having right models

♦ In software, minimise gap between units of analysis and constructs of solution paradigm



OO techniques natural way of modelling world 46

Complex System

Agent-Based System

Sub-systems

Sub-system components

Interactions between sub-systems and sub-system components Relationships between sub-systems and sub-system components

47

Complex System

Agent-Based System

Sub-systems

Agent organisations

Sub-system components

Interactions between sub-systems and sub-system components Relationships between sub-systems and sub-system components

48

Complex System

Agent-Based System

Sub-systems

Agent organisations

Sub-system components

Agents

Interactions between sub-systems and sub-system components Relationships between sub-systems and sub-system components

49

Complex System

Agent-Based System

Sub-systems

Agent organisations

Sub-system components

Agents

Interactions between sub-systems and sub-system components:

“cooperating to achieve common objectives”

“at

any given level of abstraction, find meaningful collections of entities that collaborate to achieve some higher level view” (Booch)

“coordinating their actions” “negotiating to resolve conflicts”

Relationships between sub-systems and sub-system components

50

Complex System

Agent-Based System

Sub-systems

Agent organisations

Sub-system components

Agents

Interactions between sub-systems and sub-system components Relationships between sub-systems and sub-system components - change over time - treat collections as single coherent unit

“cooperating to achieve common objectives” “coordinating their actions” “negotiating to resolve conflicts” Explicit mechanisms for representing & managing organisational relationships Structures for modelling collectives

51

The Adequacy Hypothesis

ü

Agent-oriented approaches can enhance our ability to model, design and build complex distributed software systems.

52

The Establishment Hypothesis As well as being suitable for designing and building complex systems,

agents will succeed as a software engineering paradigm [NB: will be complementary to existing software models like OO, patterns, components, …] 53

Agents Consistent with Trends in Software Engineering ♦ Conceptual basis rooted in problem domain



world contains autonomous entities that interact to get things done

54

Agents Consistent with Trends in Software Engineering ♦ Conceptual basis rooted in problem domain ♦ Increasing localisation and encapsulation



apply to control, as well as state and behaviour

55

Agents Consistent with Trends in Software Engineering ♦ Conceptual basis rooted in problem domain ♦ Increasing localisation and encapsulation ♦ Greater support for re-use of designs and programs



whole sub-system components (cf. components, patterns) n



e.g. agent architectures, system structures

flexible interactions (cf. patterns, architectures) n

e.g. contract net protocol, auction protocols

56

Agents Support System Development by Synthesis An agent is a stable intermediate form



able to operate to achieve its objectives and interact with others in flexible ways construct “system” by bringing agents together and watching overall functionality emerge from their interplay



well suited to developments in: n n

open systems (e.g. Internet) e-commerce

57

Talk Outline

ü ü I.

The Essence of Agent-Based Computing

II.

The Case for Agent-Oriented Software Engineering

III.

Potential Drawbacks

IV.

Conclusions

“The moment we want to believe something, we suddenly see all the arguments for it, and become blind to the arguments against it” George Bernard Shaw 58

Isn’t autonomous software and making decisions about interactions at run-time a recipe for disaster?

59

♦ Yes • If expect to just throw agents together and have a coherent and efficient system. n

Sometimes this is exactly what is desired – Simulation software

n

Also the default for synthesised systems

♦No

• If engineer system appropriately n n

Interaction Engineering Organisation Engineering 60

BT’s Provide Customer Quote Process

(Jennings et al.)

ide ov Pr e ot Qu Producer

Customer Service Agents

me a eN c i rv Se Consumer 61

BT’s Provide Customer Quote Process

(Jennings et al.)

ide ov Pr e ot Qu

Customer Service Agents VetCustomer

Producer

me a eN c i rv Se Consumer

A

B

C

D

...

n

Customer Vetting Agents

62

BT’s Provide Customer Quote Process

(Jennings et al.)

ide ov Pr e ot Qu

Cos t&D esig nNe two rk

Design Agents ProvideLegalAdvice

Customer Service Agents

Legal Agents VetCustomer

Producer

me a eN c i rv Se Consumer

A

B

C

D

...

n

Customer Vetting Agents

63

BT’s Provide Customer Quote Process

(Jennings et al.)

ide ov Pr

Survey Agents SurveyPremises Design Agents

e ot Qu

Cos t&D esig nNe two rk

ProvideLegalAdvice

Customer Service Agents

Legal Agents VetCustomer

Producer

me a eN c i rv Se Consumer

A

B

C

D

...

n

Customer Vetting Agents

64

Interaction Engineering:

Service Provisioning = Negotiation ♦Two agents must agree about conditions under which service will be executed

• price • quality • start and end times • ……… ♦Need to design appropriate negotiation protocol 65

The Vet Customer Negotiation ♦Is a 1:many negotiation

• One buyer, many sellers ♦Structured as a reverse auction

• Efficient means for allowing agent to quickly find •

partner with highest valuations Multi-dimensional English (open cry) auction (Vulkan and Jennings, 00)

66

Multi-Dimensional English Auction Initiation Buyer announces

• • • • •

Auction ♦ Sellers submit offers (on all dimensions)

declared utility function (U) • can lie and speculate maximum price will pay (P) ♦ Offer accepted if: minimum acceptable price • protocol has not terminated time will wait between offers (T) • offer exceeds last accepted one minimum percentage increase by X% that next offer must exceed (X) can lie about U and P

♦ Buyer makes acceptable bid public ♦ Terminates T seconds after last acceptable offer 67

Analysis of the Protocol Can prove that:

• negotiation will terminate • no point in buyer lying about U and P n

truth telling is dominant strategy

• no point in seller speculating about competitors n

bid X% more than current price, up to reservation level is the dominant strategy

• in buyer’s best interest to use suggested protocol n

no other protocol (either auction or direct negotiation) can yield a better result for it 68

Organisation Engineering ♦ Survey Dept is part of Design Division

• •

Have common goals and objectives Design agents have degree of power over survey agents n n

Relationship explicitly represented in both agents Survey agents still autonomous though!

♦ Impact of organisational relationship



Negotiation is cooperative in nature n n

Don’t reject requests unless cannot meet them Quickly move to region of agreement – Agreement produced if one exists

n

Search for win-win negotiation solutions – Using concept of fuzzy similarity (Faratin et al., 2000) 69

Talk Outline

ü ü ü I.

The Essence of Agent-Based Computing

II.

Promise of Agent-Oriented Software Engineering

III.

Potential Drawbacks

IV.

Conclusions

“We seldom attribute good sense, except with those who agree with us.” Duc de la Rouchefoucauld 70

Promise Agent-based computing can: provide powerful metaphors, concepts and techniques for conceptualising, designing and implementing complex distributed systems 71

Realising the Promise ♦ Practical methodologies

• For analysing and designing agent-based systems • Should be useable by practitioners ♦ Industrial strength toolkits

• So that don’t have to start from scratch ♦ Re-useable know-how and technologies

• Libraries of interactions protocols • Organisational patterns 72

Acknowledgements ♦ Cristiano Castelfranchi

♦ Joerg MÜller

♦ Ed Durfee

♦ Simon Parsons

♦ Les Gasser

♦ Van Parunak

♦ Carl Hewitt

♦ Carles Sierra

♦ Mike Huhns

♦ Mike Wooldridge

♦ Vic Lesser

♦ Franco Zambonelli

73

References ♦ P. Faratin, C. Sierra and N. R. Jennings (2000) “Using similarity criteria to make negotiation trade-offs” Proc. 4th Int. Conf on Multi-Agent Systems, Boston, 119-126. ♦ N.R. Jennings (2000) “On Agent-Oriented Software Engineering” Artificial Intelligence 117 (2) 277-296. ♦ N. R. Jennings, P. Faratin, T. J. Norman, P. O’Brien and B. Odgers (2000) “Autonomous agents for business process management” Int. J. of Applied Artificial Intelligence 14 (2) 145-190. ♦ N. Vulkan and N. R. Jennings (2000) “Efficient mechanisms for the supply of services in multi-agent environments” Int J. of Decision Support Systems 28 (1-2) 5-19. 74