Engineering SelfOrganising Applications Giovanna Di Marzo Serugendo Birkbeck
Engineering Self-Organising Applications Giovanna Di Marzo Serugendo Birkbeck College, University of London dimarzo@dcs. bbk. ac. uk http: //www. dcs. bbk. ac. uk/~dimarzo 1 Lakeside Labs, Klagenfurt, 14/07/2010
Outline Some definitions … Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues 2 Lakeside Labs, Klagenfurt, 14/07/2010
Concepts Self-organisation l 3 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/2010
Concepts Emergent phenomena l Positive / negative feedback l l 4 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: reinforcement of perturbation leading to amplification of perturbation Negative: leads towards stabilisation by avoiding fluctuations caused by perturbation Lakeside Labs, Klagenfurt, 14/07/2010
Concepts Adaptation l l 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 5 Lakeside Labs, Klagenfurt, 14/07/2010
Concepts Decentralised Control l Coordination of work without central decisions l 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 6 Lakeside Labs, Klagenfurt, 14/07/2010
Overall Picture Adaptation Mechanisms Natural Adaptive Systems Engineering Adaptive Systems Model State st Analysis and Simulation Artificial Adaptive Systems Orders - Agent 7 Lakeside Labs, Klagenfurt, 14/07/2010 7
Engineering Overview Adaptation Mechanisms Agents Open Issues 8 Middleware Infrastructure Engineering Adaptive Systems Methodologies Tools Lakeside Labs, Klagenfurt, 14/07/2010 8
Outline Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues 9 Lakeside Labs, Klagenfurt, 14/07/2010
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 10 l l l l 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/2010 10
Software Agents l l l Reactive Agents l l l Adapt and learn Reasoning (Belief-Desire-Intention BDI) Mobile Agents l 11 Make independent decisions Take initiatives Intelligent Agents l Act in response to some event/change occurring in the environment Autonomous Agents l Situated in an environment Sensors (to sense environment’s state) Actuators (to perform some action based on environment’s state and own tasks) Move from one computer to another one Lakeside Labs, Klagenfurt, 14/07/2010 11
Software Agents’ Interactions l Communication (exchange of messages) • Inform, request, confirm, etc. l Coordination (of individual agent’s tasks) • “Managing inter-dependencies between the activities of the agents” • Resource sharing • Dependencies (tasks scheduling) l l l 12 Collaboration Competition Transactions Agent-oriented software engineering Lakeside Labs, Klagenfurt, 14/07/2010 12
Outline Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues 13 Lakeside Labs, Klagenfurt, 14/07/2010
Adaptation Mechanisms Interaction (SO) Mechanisms l Fixed rules • Fixed parameters • Adaptable parameters l Self-modifying / Adaptive rules • Learning, Immune Systems • Evolutionary techniques l Self-building rules • Reflective systems? Cognition? l 14 Rules constrained by policies Lakeside Labs, Klagenfurt, 14/07/2010
Adaptation Mechanisms Stigmergy [Bonabeau 99, Camazine 01] l Indirect communication with environment • l Digital pheromone • • l Chemical volatile substance (Ants) Intensity, evaporation rate Work-in-progress • • 15 Occurs through modifications brought by individual components to their local environment Stimulus provided by previous work (wasps) Mapping table: configuration – action Lakeside Labs, Klagenfurt, 14/07/2010 15
Adaptation Mechanisms Schools of Fish / Flocks of Birds l Direct communication among components of self-organising system • l 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. 16 Lakeside Labs, Klagenfurt, 14/07/2010 16
Adaptation Mechanisms Gossiping [Jelasity 05] l l Periodic information exchange All nodes communicate with (randomly) selected peer nodes Ø 17 Information dissemination, information aggregation, overlay topology construction Lakeside Labs, Klagenfurt, 14/07/2010 17
Adaptation Mechanisms Trust [Cahill 03] l 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) l Bit strings / String values (anomaly to detect) l Mobile agents l 18 Lakeside Labs, Klagenfurt, 14/07/2010 18
Adaptive Mechanisms Tags [Hales 06] Markings attached to individuals (agents) and observable by others l Agents change behaviour on basis of utility function value observed in peers (tag) l Dynamically updated Metadata Additional information (metadata) about functional / non-functional information l Middleware processes metadata and components adapt to policies l 19 Lakeside Labs, Klagenfurt, 14/07/2010 19
Outline Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructure Method and Tools Issues 20 Lakeside Labs, Klagenfurt, 14/07/2010
Middleware Infrastructures Middleware l Intermediary software layer • Allows communication and coordination among agents l Interest for decentralised adaptive systems • Shared environment • Agents coordinate their work through this environment • No need for central control • May support adaptation mechanism 21 Lakeside Labs, Klagenfurt, 14/07/2010 21
Middleware Infrastructures Coordination spaces l “Blackboard” • Repository of tuples (n-uples) accessed concurrently • Producers and consumers of tuples • Associative memory • Retrieval of tuples based on “pattern matching” l Swarm-based infrastructures • Swarm. Linda [Charles 04] • Anthill [Babaoglu 02] l Field-based infrastructures • Co-fields / TOTA 22 Lakeside Labs, Klagenfurt, 14/07/2010 22
Coordination Spaces Linda [Gelernter 85] l Coordination language/model based on shared tuple spaces l 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 23 Lakeside Labs, Klagenfurt, 14/07/2010 23
Coordination Spaces Shared Tuple Space out (“name”, “John”, “surname”, “Smith”, “age”, 5) A (“name”, “Arthur”, “surname”, “Smith”, “age”, 7) rd (“name”, ? x, “surname”, “Smith”, “age”, ? i) B (“name”, “Arthur”, “surname”, “Smith”, “age”, 7) 24 Lakeside Labs, Klagenfurt, 14/07/2010 24
Coordination Spaces Coordination spaces as middleware layers l Uncoupled interactions l Limited form of self-organisation • Decentralised control, anonymous and indirect interactions among agents • No specific support for adaptation mechanism l Languages • Linda • Java. Spaces (Sun) • Tspaces (IBM) 25 Lakeside Labs, Klagenfurt, 14/07/2010 25
Field-Based Infrastructures Co-Fields (Computational Fields) [Mamei 02, Mamei 06] Principle – Force Fields l l l Agents generate application-specific fields Propagation of fields in environment according to fieldspecific 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 26 Lakeside Labs, Klagenfurt, 14/07/2010 26
Field-Based Infrastructures Abstraction l Different types of environments, different types of coordination tasks l Same approach for modelling/developing different types of systems Application Development l Generation of fields, Definition of fields propagation, Agent reaction to fields Examples l Ants foraging, birds flocking, traffic modelling 27 Lakeside Labs, Klagenfurt, 14/07/2010 27
Field-Based Infrastructures Co-Fields Modelling of Ants Foraging l Two fields: Home and Food fields • Generated and spread by environment l l 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 l Fields = channels • Food-fields: down to food • Home-fields: down to home l Pheromone evaporation • Environment removes the wrinkle after elapsed time 28 Lakeside Labs, Klagenfurt, 14/07/2010 28
Outline Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods and Tools Issues 29 Lakeside Labs, Klagenfurt, 14/07/2010
Methodologies and tools (Middleware Infrastructures) Patterns Formal techniques Simulation Tools Development methods 30 Lakeside Labs, Klagenfurt, 14/07/2010
Patterns Architectural Patterns l l Interaction patterns l Diffusion, repulsion, replication, … Coordination patterns l 31 Observer/controller (Organic Computing) MAPE (IBM / Autonomic Computing) Shared communication environment Meta. Self [Dimarzo 10] Firefly sync, gossip, trust, flocking, … Lakeside Labs, Klagenfurt, 14/07/2010
Simulation Tools Reference l Martijn C. Schut [Schut] • Tutorial on collective intelligence simulations • http: //sci. collectivae. net/ 32 32 Lakeside Labs, Klagenfurt, 14/07/2010
Net. Logo / Star. Logo Study of decentralised systems Many active agents Research / Educational purposes http: //education. mit. edu/starlogo Net. Logo Based on Star. Logo Make an applet with the simulations Hub. Net Distributed participatory simulations http: //ccl. northwestern. edu/netlogo 33 Lakeside Labs, Klagenfurt, 14/07/2010 33
Swarm / Re. Past Swarm Platform for agent-based models Objective-C / Java http: //www. swarm. org Re. Past Inspired by Swarm Agent-based models and simulations Built-in features (e. g. genetic algorithms) Java, . net, Python http: //repast. sourceforge. net/ 34 34 Lakeside Labs, Klagenfurt, 14/07/2010
New Ties / Mason New Ties l Grow a large scale artificial society l Individual / Social learning l Large scale experiments using distributed P 2 P infrastructure l http: //www. new-ties. org/ MASON l Java based, very large number of agents (10000+) l Visualisation 2 D / 3 D l http: //cs. gmu. edu/~eclab/projects/mason/ 35 35 Lakeside Labs, Klagenfurt, 14/07/2010
Breve / Cormas Breve l 3 D simulator l Multi-agents systems, artificial life l Python / Steve scripting language l http: //www. spiderland. org/breve Cormas l Modelling of natural resources by groups l Multi-agent systems l Small. Talk l http: //cormas. cirad. fr/indexeng. htm 36 36 Lakeside Labs, Klagenfurt, 14/07/2010
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 37 Lakeside Labs, Klagenfurt, 14/07/2010
Agent. Sheets l l l Agents with behaviour and missions / Reactive to messages Interactive simulations Authoring tool supporting non programmer to create agents Commercial product http: //www. agentsheets. com 38 38 Lakeside Labs, Klagenfurt, 14/07/2010
Formal Techniques Formal methods Probabilistic Finite State Machines (Martinoli) l Temporal logic (Fisher et al. ) l Process Algebra (Hinchey) l Mathematical methods Differential equations l Numerical analysis l 39 Lakeside Labs, Klagenfurt, 14/07/2010
Methodologies Software engineering methodology l Set of practices • training materials, educational programs, worksheets, diagrams • repeatedly carried out to produce software l Disciplines • • • 40 Project management Analysis Specification Design Implementation Test Survey of SOS Methods [Puviani et al. 09] Lakeside Labs, Klagenfurt, 14/07/2010 40
ADELFE [Bernon 02] l l l Guide + help designer Determination of type of system Based on AMAS Theory • Cooperative agents • Avoiding non cooperative situations 41 Lakeside Labs, Klagenfurt, 14/07/2010
Meta. Self [Dimarzo 10] l l Identification of self-* requirements Design • Self-* mechanisms and policies l Run-time infrastructure • Agents / Artefacts / Metadata / Policies • Enforcement of policies on basis of metadata l 42 Identification of faults Lakeside Labs, Klagenfurt, 14/07/2010
General Methodology [Gershenson 07] l l Representation Modelling • Adaptive Control • Mediator (reduce frictions / increase synergies) l Simulation • Test different scenarios l l 43 Application Evaluation Lakeside Labs, Klagenfurt, 14/07/2010
Customised Unified Process [De Wolf 07] l Requirements Analysis • Macroscopic properties l Design • Architectural design / Patterns • Abstractions: Localities and Information flow l Implementation • Microscopic issues l Testing and verification • Numerical analysis for dynamical systems 44 Lakeside Labs, Klagenfurt, 14/07/2010
Simulation Driven Approach [Gardelli 07] 45 Active entities: agents Passive entities: artefacts Environmental agents: manage artefacts Middle phase (simulations) integrated between analysis and design Lakeside Labs, Klagenfurt, 14/07/2010
Outline Overview and Concepts Agents Adaptation Mechanisms Middleware Infrastructures Methods / Methodologies Issues 46 Lakeside Labs, Klagenfurt, 14/07/2010
Open Issues l l 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 l 47 Control Lakeside Labs, Klagenfurt, 14/07/2010 47
Trust Mind Map Flocking Gossip Intelligent Fixed rules Fixed / Var. param. Mobile Immune Systems Evolutionary Stigmergy Reinforcement Learning Self-modifying rules Autonomous Interaction Mechanisms Refl. Self-Building Rules Agents Interoperability Rules controlled by Policies and constraints Control Micro/Macro Parameters Sensitivity Meta. Self Architecture Engineering SO Systems Issues TOTA Middleware Infrastructure Prediction Methods and Tools Swarm Linda Interaction Mechanisms Patterns Simulations Repast Methodologies Analysis / Verification Architectural Patterns Swarm CUP Starlogo Netlogo Meta. Self Adelfe General Methodology Simulation Based Differential Equations Formal Methods Statistical Mechanics Temporal Logic CCS CSP PFSM
Questions? 49 Lakeside Labs, Klagenfurt, 14/07/2010
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 Swarm. Linda – A Linda System Based on Swarm Intelligence. CS-2004 -03. Florida Tech, Computer Science, 2004. [de. Castro 06] L. M. de Castro: Fundamentals of Natural Computing – Basic Concepts, Algorithms, and Applications. Chapman & Hall/CRC. 2006. 50 Lakeside Labs, Klagenfurt, 14/07/2010
References [De. Wolf 04] T. De Wolf, T. Holvoet. Emergence versus Self-Organisation: different concepts but promising when combined. LNCS 3464. 2004. [De Wolf 07] T. De Wolf, Analysing and engineering self-organising emergent applications, Ph. D. Thesis, Department of Computer Science, K. U. 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, 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 P 2 P Networks. IEEE Intelligent Systems, 21(2): 29 -35, March / April 2006. 51 Lakeside Labs, Klagenfurt, 14/07/2010
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. 2 nd 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 selforganising systems: a SPEM approach. , 2009, IEEE/WIC/ACM International Conference on Intelligent Agent Technology (IAT 09), Milan, Italy. ) [Schut] M. Schut. Scientific Handbook for Simulation of Collective Intelligence. http: //www. scisci. org/ [Self. Star 05] 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 Lakeside Labs, Klagenfurt, 14/07/2010 52
- Slides: 52