lakeside labs, klagenfurt, 14/07/2010 1 engineering self-organising applications giovanna di marzo...

52
Lakeside Labs, Klagenfurt, 14/07/2010 1 Engineering Self-Organising Applications Giovanna Di Marzo Serugendo Birkbeck College, University of London [email protected] http://www.dcs.bbk.ac.uk/~dimarzo

Upload: kerrie-copeland

Post on 27-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Lakeside Labs, Klagenfurt, 14/07/20101

Engineering Self-Organising Applications

Giovanna Di Marzo SerugendoBirkbeck College, University of London

[email protected]

http://www.dcs.bbk.ac.uk/~dimarzo

Lakeside Labs, Klagenfurt, 14/07/20102

Outline

Some definitions … Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues

Lakeside Labs, Klagenfurt, 14/07/20103

Concepts

Self-organisation Self-organisation is the process enabling a

system to change its organisation in case of environmental changes without explicit external command

Weak Self-Organisation: internal central control Strong Self-Organisation: no internal central control [Dimarzo et al. 05]

Lakeside Labs, Klagenfurt, 14/07/20104

Concepts

Emergent phenomena A structure (pattern, property or function),

not explicitly represented at the level of the individual components (lower level), and which appears at the level of the system (higher level).”

Positive / negative feedback Positive: reinforcement of perturbation

leading to amplification of perturbation Negative: leads towards stabilisation by

avoiding fluctuations caused by perturbation

Lakeside Labs, Klagenfurt, 14/07/20105

Concepts

Adaptation Adaptation to long-term environmental

changes Adaptation to immediate environmental

changes• Individual components behave autonomously• Local information (“up-to-date”)• Immediate response of system Adaptation expected for engineered systems

Lakeside Labs, Klagenfurt, 14/07/20106

Concepts

Decentralised Control Coordination of work without central decisions

Self-organisation mechanisms are (mostly) based on decentralised architectures of information flow

• No instruction issued from leaders• Individuals gather information (directly or not) and

decides what to do

Lakeside Labs, Klagenfurt, 14/07/20107 7

Orders - Agent

Artificial AdaptiveSystems

NaturalAdaptive Systems

AdaptationMechanisms

ModelState st

Analysis andSimulation

Engineering Adaptive Systems

Overall Picture

Lakeside Labs, Klagenfurt, 14/07/20108 8

Engineering Adaptive Systems

Agents MiddlewareInfrastructure

Adaptation Mechanisms

MethodologiesTools

OpenIssues

Engineering Overview

Lakeside Labs, Klagenfurt, 14/07/20109

Outline

Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues

Lakeside Labs, Klagenfurt, 14/07/201010 10

Software Agents Definition [Wooldridge 01]

“An agent is a computer system situated in some environment, and that is capable of autonomous action in this environment in order to meet its design objectives”

Characteristics Executing program Acts on behalf of a user or a program Autonomous Proactive (take initiative) Distributed Maintain information about own resources Intelligent Mobile

Lakeside Labs, Klagenfurt, 14/07/201011 11

Software Agents Agents

Situated in an environment Sensors (to sense environment’s state) Actuators (to perform some action based on environment’s state

and own tasks)

Reactive Agents Act in response to some event/change occurring in the environment

Autonomous Agents Make independent decisions Take initiatives

Intelligent Agents Adapt and learn Reasoning (Belief-Desire-Intention BDI)

Mobile Agents Move from one computer to another one

Lakeside Labs, Klagenfurt, 14/07/201012 12

Software Agents

Agents’ Interactions Communication (exchange of messages)

• Inform, request, confirm, etc. Coordination (of individual agent’s tasks)

• “Managing inter-dependencies between the activities of the agents”

• Resource sharing • Dependencies (tasks scheduling)

Collaboration Competition Transactions

Agent-oriented software engineering

Lakeside Labs, Klagenfurt, 14/07/201013

Outline

Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues

Lakeside Labs, Klagenfurt, 14/07/201014

Adaptation Mechanisms

Interaction (SO) Mechanisms Fixed rules

• Fixed parameters• Adaptable parameters

Self-modifying / Adaptive rules• Learning, Immune Systems• Evolutionary techniques

Self-building rules• Reflective systems? Cognition?

Rules constrained by policies

Lakeside Labs, Klagenfurt, 14/07/201015 15

Adaptation Mechanisms Stigmergy [Bonabeau 99, Camazine 01]

Indirect communication with environment• Occurs through modifications brought by individual

components to their local environment

Digital pheromone• Chemical volatile substance (Ants)• Intensity, evaporation rate

Work-in-progress• Stimulus provided by previous work (wasps)• Mapping table: configuration – action

Lakeside Labs, Klagenfurt, 14/07/201016 16

Adaptation Mechanisms

Schools of Fish / Flocks of Birds Direct communication among components of self-organising system

• Wave of reaction: communicated progressively to all components of school, or flock

• Monitoring of position and speed of neighbours• Adaptation of own position and speed

Mechanism (attraction and repulsion rules)1. Maintain a minimum distance from other objects in the environment, including other fishes/birds.

2. Match velocities with neighbours.

3. Move toward the perceived centre of mass of fishes/birds in its neighbourhood.

Lakeside Labs, Klagenfurt, 14/07/201017 17

Adaptation Mechanisms

Gossiping [Jelasity 05] Periodic information exchange All nodes communicate with (randomly) selected peer

nodes Information dissemination, information aggregation,

overlay topology construction

Lakeside Labs, Klagenfurt, 14/07/201018 18

Adaptation Mechanisms

Trust [Cahill 03]Human trust in peers

• Trust values, calculation of risk, decision of action

• Updated on basis of positive/negative evidence

Immune System [Hofmeyr 00]B Cells + antibodies (learning / detection and

marking) / T cells (destruction)Bit strings / String values (anomaly to detect)Mobile agents

Lakeside Labs, Klagenfurt, 14/07/201019 19

Adaptive MechanismsTags [Hales 06]

Markings attached to individuals (agents) and observable by others

Agents change behaviour on basis of utility function value observed in peers (tag)

Dynamically updated MetadataAdditional information (metadata) about functional /

non-functional informationMiddleware processes metadata and components

adapt to policies

Lakeside Labs, Klagenfurt, 14/07/201020

Outline

Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructure Method and Tools Issues

Lakeside Labs, Klagenfurt, 14/07/201021 21

Middleware Infrastructures

MiddlewareIntermediary software layer

• Allows communication and coordination among agents

Interest for decentralised adaptive systems• Shared environment

• Agents coordinate their work through this environment

• No need for central control

• May support adaptation mechanism

Lakeside Labs, Klagenfurt, 14/07/201022 22

Middleware Infrastructures

Coordination spaces “Blackboard”

• Repository of tuples (n-uples) accessed concurrently• Producers and consumers of tuples• Associative memory

• Retrieval of tuples based on “pattern matching”

Swarm-based infrastructures• SwarmLinda [Charles 04]• Anthill [Babaoglu 02]

Field-based infrastructures• Co-fields / TOTA

Lakeside Labs, Klagenfurt, 14/07/201023 23

Coordination Spaces

Linda [Gelernter 85]Coordination language/model based on

shared tuple spaces

Indirect communication• Insertion of tuples in the shared data space (out)• Retrieval of tuples from the shared data space (in or rd)

• Retrieval is based on matching a given template

Lakeside Labs, Klagenfurt, 14/07/201024 24

Shared Tuple Space

A

B

(“name”, “John”, “surname”, “Smith”, “age”, 5) out

(“name”,?x, “surname”, “Smith”, “age”, ?i) rd

(“name”, “Arthur”, “surname”, “Smith”, “age”, 7)

(“name”, “Arthur”, “surname”, “Smith”, “age”, 7)

Coordination Spaces

Lakeside Labs, Klagenfurt, 14/07/201025 25

Coordination Spaces

Coordination spaces as middleware layersUncoupled interactionsLimited form of self-organisation

• Decentralised control, anonymous and indirect interactions among agents

• No specific support for adaptation mechanism

Languages• Linda• JavaSpaces (Sun)• Tspaces (IBM)

Lakeside Labs, Klagenfurt, 14/07/201026 26

Field-Based Infrastructures

Co-Fields (Computational Fields) [Mamei 02, Mamei 06]

Principle – Force Fields Agents generate application-specific fields Propagation of fields in environment according to field-

specific laws Composition of different fields (coordination field) Agents follow field gradient (downhill / uphill) Agents movements are driven by fields (no central control) Coordination emerges from

• Interrelated effects of agents following the fields• Dynamic fields reshaping due to agents movements• Composition of different fields at each point

Lakeside Labs, Klagenfurt, 14/07/201027 27

Field-Based Infrastructures

Abstraction Different types of environments, different types of

coordination tasks Same approach for modelling/developing different

types of systems

Application Development Generation of fields, Definition of fields propagation,

Agent reaction to fields

Examples Ants foraging, birds flocking, traffic modelling

Lakeside Labs, Klagenfurt, 14/07/20102828

Field-Based Infrastructures

Co-Fields Modelling of Ants Foraging Two fields: Home and Food fields

• Generated and spread by environment Ants follow home or food field Environment change fields according to ants

movements • Wrinkling of fields where ants are located• Wrinkle = Abstraction for the pheromone

Fields = channels • Food-fields: down to food • Home-fields: down to home

Pheromone evaporation• Environment removes the wrinkle

after elapsed time

Lakeside Labs, Klagenfurt, 14/07/201029

Outline

Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues

Lakeside Labs, Klagenfurt, 14/07/201030

Methodologies and tools

(Middleware Infrastructures) Patterns Formal techniques Simulation Tools Development methods

Lakeside Labs, Klagenfurt, 14/07/201031

Patterns

Architectural Patterns Observer/controller (Organic Computing) MAPE (IBM / Autonomic Computing) Shared communication environment MetaSelf [Dimarzo 10]

Interaction patterns Diffusion, repulsion, replication, …

Coordination patterns Firefly sync, gossip, trust, flocking, …

Lakeside Labs, Klagenfurt, 14/07/201032

32

Simulation Tools

ReferenceMartijn C. Schut [Schut]

• Tutorial on collective intelligence simulations• http://sci.collectivae.net/

Lakeside Labs, Klagenfurt, 14/07/201033

NetLogo / StarLogo StarLogo

Study of decentralised systems Many active agents Research / Educational purposes http://education.mit.edu/starlogo

NetLogo Based on StarLogo Make an applet with the simulations HubNet

Distributed participatory simulations

http://ccl.northwestern.edu/netlogo

33

Lakeside Labs, Klagenfurt, 14/07/201034

Swarm / RePast

Swarm Platform for agent-based models Objective-C / Java http://www.swarm.org

RePast Inspired by Swarm Agent-based models and simulations Built-in features (e.g. genetic algorithms) Java, .net, Python http://repast.sourceforge.net/

34

Lakeside Labs, Klagenfurt, 14/07/201035

35

New Ties / Mason

New Ties Grow a large scale artificial society Individual / Social learning Large scale experiments using distributed P2P

infrastructure http://www.new-ties.org/

MASON Java based, very large number of agents (10000+) Visualisation 2D / 3D http://cs.gmu.edu/~eclab/projects/mason/

Lakeside Labs, Klagenfurt, 14/07/201036

36

Breve / Cormas

Breve 3D simulator Multi-agents systems, artificial life Python / Steve scripting language http://www.spiderland.org/breve

Cormas Modelling of natural resources by groups Multi-agent systems SmallTalk http://cormas.cirad.fr/indexeng.htm

Lakeside Labs, Klagenfurt, 14/07/201037

LEADSTO / SDML LEADSTO

Dynamic processes modelling LEADSTO formal language

Temporal language

Simulations of LEADSTO specifications e.g. human reasoning process http://www.few.vu.nl/~wai/TTL

SDML Strictly Declarative Modelling Language MAS modelling logic based on autoepistemic logic

To express facts, knowledge and lack of knowledge about facts

Supports cognitive theories within agents http://cfpm.org/sdml

Lakeside Labs, Klagenfurt, 14/07/201038

38

AgentSheets

AgentSheets Agents with behaviour and missions /

Reactive to messages Interactive simulations Authoring tool supporting non programmer to

create agents Commercial product http://www.agentsheets.com

Lakeside Labs, Klagenfurt, 14/07/201039

Formal Techniques

Formal methodsProbabilistic Finite State Machines

(Martinoli)Temporal logic (Fisher et al.)Process Algebra (Hinchey)

Mathematical methodsDifferential equations Numerical analysis

Lakeside Labs, Klagenfurt, 14/07/201040 40

Methodologies

Software engineering methodology Set of practices

• training materials, educational programs, worksheets, diagrams

• repeatedly carried out to produce software

Disciplines• Project management • Analysis• Specification• Design• Implementation• Test

Survey of SOS Methods [Puviani et al. 09]

Lakeside Labs, Klagenfurt, 14/07/201041

ADELFE [Bernon 02] Guide + help designer Determination of type of system Based on AMAS Theory

• Cooperative agents• Avoiding non cooperative situations

Lakeside Labs, Klagenfurt, 14/07/201042

MetaSelf [Dimarzo 10] Identification of self-* requirements Design

• Self-* mechanisms and policies Run-time infrastructure

• Agents / Artefacts / Metadata / Policies• Enforcement of policies on basis of metadata

Identification of faults

Lakeside Labs, Klagenfurt, 14/07/201043

General Methodology [Gershenson 07]

Representation Modelling

• Adaptive Control • Mediator (reduce frictions / increase synergies)

Simulation• Test different scenarios

Application Evaluation

Lakeside Labs, Klagenfurt, 14/07/201044

Customised Unified Process [De Wolf 07] Requirements Analysis

• Macroscopic properties Design

• Architectural design / Patterns• Abstractions: Localities and Information flow

Implementation• Microscopic issues

Testing and verification• Numerical analysis for dynamical systems

Lakeside Labs, Klagenfurt, 14/07/201045

Simulation Driven Approach [Gardelli 07]

Active entities: agents Passive entities: artefacts Environmental agents: manage artefacts Middle phase (simulations) integrated between

analysis and design

Lakeside Labs, Klagenfurt, 14/07/201046

Outline

Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods / Methodologies Issues

Lakeside Labs, Klagenfurt, 14/07/201047 47

Open Issues

Issues Interactions Management of uncertainty Sensitivity to initial conditions / system's

parameters Design and development

• Micro- / Macro-behaviour• Macro-to-micro programming• Prediction of good/bad behaviour

Control

Mind Map

Engineering SO Systems

Agents

InteractionMechanisms

Methods andTools

Issues

Mobile

Intelligent

Stigmergy

Gossip

Fixed rulesFixed / Var. param.

Flocking

Immune Systems

Reinforcement Learning

Refl.

MetaSelfArchitecture

Self-modifying rules

Self-Building Rules

Autonomous

Trust

Rules controlled byPolicies and constraints

Patterns

Analysis / Verification

Simulations

Methodologies

InteractionMechanisms

Formal Methods

StatisticalMechanics

Differential Equations

TemporalLogic

CCSCSP

PFSMAdelfe

MetaSelf

CUPGeneral

Methodology

SimulationBased

StarlogoNetlogo

Swarm

Repast

Interoperability

Control

Micro/Macro

ParametersSensitivity Prediction

Middleware Infrastructure

TOTA

Swarm Linda

ArchitecturalPatterns

Evolutionary

Lakeside Labs, Klagenfurt, 14/07/201049

Questions?

Lakeside Labs, Klagenfurt, 14/07/201050

References

[Babaoglu 02] Özalp Babaoglu, Hein Meling, Alberto Montresor: Anthill: A Framework for the Development of Agent-Based Peer-to-Peer Systems. ICDCS 2002: 15-22

[Bernon 02] Bernon C., Gleizes M-P., Peyruqueou S., Picard G.r - ADELFE, a Methodology for adaptive Multi-Agent Systems Engineering - Third International Workshop "Engineering Societies in the Agents World" (ESAW-2002), 16-17 September 2002, Madrid. Petta P., Tolksdorf R., Zambonelli F., Eds., Springer-Verlag, LNAI 2577, p. 156-169.

[Bonabeau 99] E. Bonabeau, M. Dorigo, and G. Théraulaz. Swarm Intelligence:From Natural to Artificial Systems Santa Fe Institute Studies on the Sciences of Complexity. Oxford University Press, UK, 1999.

[Cahill 03] V. Cahill, B. Shand, et al.: "Using Trust for Secure Collaboration in Uncertain Environments", IEEE Pervasive Computing Magazine, special issue Dealing with Uncertainty, Volume 2, Number 3, pp. 52-61, Jul-Sep 2003.

[Camazine 01] S. Camazine, J.-L. Deneubourg, Nigel R. F., J. Sneyd, G. Téraulaz, and E.Bonabeau. Self-Organisation in Biological Systems. Princeton Studies in Complexity. Princeton University Press, 2001.

[Charles 04] A. Charles, R. Menezes, R. Tolksdorf. On the Implementation of SwarmLinda – A Linda System Based on Swarm Intelligence. CS-2004-03. Florida Tech, Computer Science, 2004.

[deCastro 06] L. M. de Castro: Fundamentals of Natural Computing – Basic Concepts, Algorithms, and Applications. Chapman & Hall/CRC. 2006.

Lakeside Labs, Klagenfurt, 14/07/201051

References[DeWolf 04] T. De Wolf, T. Holvoet. Emergence versus Self-Organisation: different concepts but promising

when combined. LNCS 3464. 2004.

[De Wolf07] T. De Wolf, Analysing and engineering self-organising emergent applications, Ph.D. Thesis, Department of Computer Science, K.U.Leuven, Leuven, Belgium, May, 2007.

[Dimarzo 05] G. Di Marzo Serugendo, M.-P. Gleizes, A. Karageorgos. "Self-Organisation in MAS", Knowledge Engineering Review 20(2):165-189, Cambridge University Press, 2005

[Dimarzo 07] G. Di Marzo Serugendo, J. Fitzgerald, A. Romanovsky, N. Guelfi,  "A Generic Framework for the Engineering of Self-Adaptive and Self-Organising Systems", CS-TR-1018, Technical Report, School of Computing Science, University of Newcastle, Newcastle, UK, April 2007. 

[Dimarzo 10] Di Marzo Serugendo, G., Fitzgerald, J., Romanovsky, A.: Metaself - an architecture and development method for dependable self-* systems. In: ACM Symposium on Applied Computing (SAC’2010), pp. 457–461. ACM, Sierre, Switzerland (2010)

[Gelernter 85] D. Gelernter. Generative communication in Linda. ACM Transactions on Programming Languages and Systems, 7(1):80--112, January 1985.

[Gershenson 07] Design and Control of Self-organizing Systems. Gershenson, Carlos (2007) Design and Control of Self-organizing Systems.

[Hales 06] Hales, D. & Arteconi, S. (2006) SLACER: A Self-Organizing Protocol for Coordination in P2P Networks. IEEE Intelligent Systems, 21(2):29-35, March / April 2006.

Lakeside Labs, Klagenfurt, 14/07/201052

References[Hofmeyr 00] Architecture for an Artificial Immune System. S. Hofmeyr and S. Forrest.

Evolutionary Computation Journal Vol. 8, No. 4, pp. 443-473, 2000.

[Holland 98] J.H. Holland, Emergence – from Chaos to Order. Oxford University Press, 1998

[Jelasity 05] Jelasity, M., Montresor, A., Babaoglu, O.: Gossip-based aggregation in large dynamic networks. ACM Transactions on Computer Systems 23(3), 219–252 (2005).

[Mamei 02] Marco Mamei, Franco Zambonelli, Letizia Leonardi: Co-Fields: Towards a Unifying Approach to the Engineering of Swarm Intelligent Systems. ESAW 2002: 68-81.

[Mamei 06] M. Mamei, F. Zambonelli, Field-based Coordination for Pervasive Multiagent Systems, Springer Verlag (Berlin, D), January 2006

[Picard 05] G. Picard, M.-P. Gleizes. Cooperative Self-Organization to Design Robust and Adaptive Collectives. 2nd International Conference on Informatics in Control, Automation and Robotics (ICINCO'05), Insticc Press, Barcelona, Spain, 14-17 September 2005, pp. 236-241.

[Puviani 09] M. Puviani, G. Di Marzo Serugendo, R. Frei, G. Cabri. Methodologies for self-organising systems: a SPEM approach., 2009, IEEE/WIC/ACM International Conference on Intelligent Agent Technology (IAT09), Milan, Italy.)

[Schut] M. Schut. Scientific Handbook for Simulation of Collective Intelligence. http://www.sci-sci.org/

[SelfStar05] Self-Star Properties in Complex Information Systems. Babaoglu et al. (Eds). LNCS 3460. 2005.

[Wooldridge 01] M. Wooldridge. “An Introduction to Multi-Agent Systems”. Wiley. 2001