Sunteți pe pagina 1din 47

Adaptive Systems

Lecture 9: Artificial Adaptive Systems (2)


Dr Giovanna Di Marzo Serugendo
Department of Computer Science
and Information Systems Birkbeck College, University of London

Email: dimarzo@dcs.bbk.ac.uk Web Page: http://www.dcs.bbk.ac.uk/~dimarzo

Lecture 8: Review
Taxonomy / Classification Static Optimisation Problems
Ant-Colony Optimisation Particle Swarm Optimisation

Dynamic Optimisation Problems Trust-based access control

Adaptive Systems - Spring 2008 - Giovanna Di Marzo Serugendo

Lecture 9: Overview
Swarms
Robots Spiders-based systems

Manufacturing Control Immune Computer P2P Systems Autonomic Computing


Adaptive Systems - Giovanna Di Marzo Serugendo 3

Swarms of Robots
Cooperative prey transport by social insects
Ants recruit other ants for collaborative transport of preys too heavy to be carried by a single ant
E.g. 100 ants transporting a worm (5000 times bigger than each single ant)

Resistance to traction decides ants to recruit nestmates Size of group is adapted to size of prey Pheromone used to recruit nestmates Coordination for transporting prey occurs through indirect communication (stigmergy) Actual transport involves:
re-alignment and re-positioning
Adaptive Systems - Giovanna Di Marzo Serugendo 4

Swarms of Robots
Application
Swarms of robots [Bonabeau 99]
Collaborative box-pushing
Indirect communication Decentralised control

Goal:
Localise a box in a given space and push it towards an edge

Subsumption architecture:
Every behaviour is subdivided into atomic sub-behaviours activated when necessary (reactive approach) Each sub-behaviour has its own sensors inputs and actuators outputs Hierarchy of behaviours with priority Arbitration module controls actual activation of sub-behaviour
Adaptive Systems - Giovanna Di Marzo Serugendo 5

Swarms of Robots
Sensors
Left/Right infrared (obstacles) and photocells sensors (box)

Steering actuator
Left/Right wheel motors

Behaviours definition
Find (box) lowest priority Follow (other robot) Slow (neighbour collision) Goal (move towards box) Avoid (obstacle collision change direction) highest priority
6

Adaptive Systems - Giovanna Di Marzo Serugendo

Swarms of Robots
Scenario
Goal activated Follow and Goal: set motion Avoid: stop current process (Goal deactivated) -> re-alignment and re-positioning Goal of one robot is re-activated

No direct communication (stigmergy) Robots implementation


Model and simulation of ants prey transports
Adaptive Systems - Giovanna Di Marzo Serugendo 7

Swarms of Robots
Adaptation
Different configurations
Box positioning, robots placements

Adaptive Systems - Giovanna Di Marzo Serugendo

Region Detection
Metaphor: Social Spiders
Few species of spiders are social
Sharing of web Collaboration (preys, web weaving) Stigmergy based on silk
Spiders follow silk or move to points where silk is fixed

Adaptive Systems - Giovanna Di Marzo Serugendo

Region Detection

http://media.star-telegram.com/Multimedia/News/Photos/Bigweb.jpg Adaptive Systems - Giovanna Di Marzo Serugendo 10

Region detection
Region detection (grey levels) [Bourjot 03]
Partition of image into subsets of separate objects Determination of sets of connected pixels (regions)

Idea:
Webs weaving determines the region

Algorithm
Spider has to detect a given region (grey level)
Several spiders explore image and fix silk on relevant pixels Silk attraction Resulting web is fixed on interesting pixels
Adaptive Systems - Giovanna Di Marzo Serugendo 11

Region Detection

Adaptive Systems - Giovanna Di Marzo Serugendo

12

Region Detection

Adaptive Systems - Giovanna Di Marzo Serugendo

13

Manufacturing Control
Manufacturing control
Management of internal logistic and of production system Routing of product instances Assignment of workers Assignment of raw material Operations begin and end

Dynamic environment
Failures, new products, equipment upgrades, etc.

Idea:
Decentralised control with self-organising behaviour
Adaptive Systems - Giovanna Di Marzo Serugendo 14

Manufacturing Control
Metaphor: Ant foraging PROSA Architecture [Hadeli 03] Agents:
Orders agents (logistics for managing products), products agents (processes tasks), resources agents (raw material, machines, etc)

Mapping of control and production system into agents


Actual production system is reflected into an agents structure Each resource/product/order has a corresponding resource/product/order agent (local information only) Links among agents (e.g. order agents know about location of resources agents to products agents necessary to complete order) Agents creates ant-agents (mobile agents) that explore the cyber production system and deposit/sense pheromone
Adaptive Systems - Giovanna Di Marzo Serugendo 15

Manufacturing Control
Ant-agents behaviour
Feasibility information ants
Information related to the resource locations (availability, speed, etc.)

Exploring ants
Order agents create several ants each exploring a way of realising the order (gives back a report with followed route)

Intention propagation ants


Order agents create ants that propagate information about the orders intentions (chosen best route). Ant has a fixed route, and makes bookings.

Manufacturing control
Obtained from the choices made by order agents
On the basis of the above information

Actually executed by resources agents


Adaptive Systems - Giovanna Di Marzo Serugendo 16

Manufacturing Control
Exploring Ants (EA)
Tries to find solutions Searching for solutions is guided by local pheromones Reports result of solution to the corresponding Order Agent

Rd Rc Rb Ra

Rd Rc

Orders - Agent
Rd Rc Rb Ra

Rb Ra

EA3 EA2

EA1

t1

t2

t3

time
17

Adaptive Systems - Giovanna Di Marzo Serugendo

Manufacturing Control
Adaptation
Actual factory status Current orders

Adaptive Systems - Giovanna Di Marzo Serugendo

18

Artificial Immune System


Design of an artificial immune system
Representation for the components of the system Mechanisms to evaluate the interaction of individuals with environment and with each other Procedures of adaptation dynamics of system

Used for:
Modelling immune systems

Solving problems using artificial immune systems

Artificial Immune System


Representation
Abstract model of immune cells and molecules Recognition of antigen by cell (antibody) receptor
Occurs through shape complementarity or shape similarity Model of shape recognition Data structure: attribute string
Real-valued vector / Integer vector / ... Shape recognition is based on: Similarity/affinity measure between attribute strings of antigen and antibody Ab = (Ab1, ..., AbL) Ag = (Ag1, ..., AgL) Affinity D: SL x SL RL (degree of matching)

Artificial Immune System


Evaluating interactions
Affinity measure
Affinity D: SL x SL RL http://en.wikipedia.org/wiki/Immune_system Complementary / Similarity A distance: (Euclidian, Manhattan, Hamming)
D

i 1 ( Abi Ag i )2
L

D i 1 ( Abi Agi )
L

Ab = [1 0 0 0 1 1 0 0 1] Ag = [1 1 0 0 0 1 0 1 0] Match(Ab, Ag) = 0 1 0 0 1 0 0 1 1 Complementarity: affinity = 4 (how different) Similarity: affinity = 5 (how similar)
http://en.wikipedia.org/wiki/Immune_system

Artificial Immune Systems


Immune Algorithms
Bone marrow
Generate populations of immune cells and molecules (to be used in artificial immune system)

Negative selection
Learning phase (avoid matching self) Define set of detectors (for anomaly detection)

Clonal selection
Generate additional immune cells driven by detected antigens

Immune networks
Simulate immune networks

Artificial Immune System


Bone Marrow
Generation of antibodies Model 1:
Generation of attribute string of length L with random values

Model 2
Generation of antibodies from gene library Concatenation of genes from gene library

Artificial Immune System


Negative Selection Algorithms
T cells mature in Thymus Learn to distinguish self from non-self T cells that cannot distinguish self properly must be destroyed Model
Create T cells bit strings of length L Test T cells against known set of self-patterns (S) Discard the ones that match the self-patterns (affinity measure) Otherwise allow T cell to enter set of detectors Monitoring/Protection: test detectors against set of strings to protect If matching then an anomaly (non-self) has been detected

Applications
Computational security

Artificial Immune Systems


Clonal selection
Proliferation of cells that recognise specific antigen Proportional to degree of affinity (higher affinity, higher proliferation)

Intrusion Detection
Metaphor: Mammalian Immune System (Lecture 2) Self/Non-Self recognition
Each cell has a marker (self) Cells without marker (non-self) are considered antigen
Immune system attacks antigen

Agents of Immune System


B cells - Detection
Wait for antigen, replicate and release antibodies Antibodies mark antigen (intruders)

T cells - Response
Destroy marked cells

B and T cells
Transported by blood and lymphatic vessels across the whole body

Adaptive Systems - Giovanna Di Marzo Serugendo

26

Intrusion Detection
Characteristics of Immune System
Robust
Decentralised and distributed (no central control) Dynamic (new components created, destroyed, circulated) Tolerant to errors (failure of single components has a minimal impact)

Adaptable
Learn to recognise new infections Memory of past infections

Autonomous
No outside control
Adaptive Systems - Giovanna Di Marzo Serugendo 27

Intrusion Detection
Intrusion Detection - ARTIS [Forrest 99]
ARTificial Immune System (Mobile) detectors circulating in the system
Stand for the T, B cells and antibodies

Detection
Bit strings stand for proteins to detect Random generation of detectors (random string)
Look for matching portions of strings (anomaly)

Training:
If detector matches a self string then detector is destroyed and new one regenerated

(Associative) Memory
Mapping of identified non-self strings to responses

Adaptive Systems - Giovanna Di Marzo Serugendo

28

Intrusion Detection
Applied to:
Computer virus detection Host-based intrusion detection Network intrusion detection
Proteins = network traffic
Strings = (Source IP address, Destination IP address, TCP Port Service) Anomaly detection = high frequency of connections

Environment
Network of computers Each computer runs a detector node

Experiments
Off-line with actual data, no mobile detectors Detection of attacks
Adaptive Systems - Giovanna Di Marzo Serugendo 29

Intrusion Detection
Adaptation
Learning Memory:
Quick reaction for further identical intrusion

Adaptation to changes in normal behaviour

Adaptive Systems - Giovanna Di Marzo Serugendo

30

Network Intrusion Detection and Response


Combination of Metaphors [Foukia 05]:
Intrusion Detection
Metaphor: Immune System
Implementation: mobile agents Anomaly: bad sequence of events Alert: triggers the diffusion of pheromone

Intrusion Response
Metaphor: Ants foraging
Implementation: mobile agents Mobile agents trace the source of the attack (machine) as ants follow a trail for food

Mobile Agents
Software able to change its location (keeping its execution state)
Adaptive Systems - Giovanna Di Marzo Serugendo 31

P2P / Networks
T-Man Algorithm [Jelasity 05].
Generic protocol based on gossip communication model Goal: network topology management problem
Nodes randomly connected Re-organisation of connections to produce desirable topology

Nodes become neighbours based on information such as: geographic position, content, storage capacity

Metaphor: Gossip
Periodic exchange and update of information among members of a group Allows: aggregation of global information inside a population, social learning Parameters: neighbourhood, level of precision of information

P2P / Networks
Principle

Nodes maintain local list of of (logical) neighbours a fixed number of neighbours, say c For each neighbour a profile is stored

Profile is relevant for the topology to achieve (type of data stored, ID, location, etc)

Ranking function defines the target topology (e.g. distance)

Serves for reorganising the set of neighbours Based on profile of the nodes (distance between profiles)
Choice of closest neighbour based on ranking function Local exchange / combination of neighbours profile

Gossip message exchange


Merging of neighbours profile Keep c closest neighbours Drop the rest

Nodes become closer and closer

Allows adaptation of neighbours list Re-organisation of the network topology

P2P / Networks
Applications
Overlay networks supporting P2P systems
Maintenance or establishment of P2P topology

Sorting, Clustering, Distributed Hash table

Autonomic Computing

Autonomic computing computing systems that can manage themselves given high-level objectives from administrators [Kephart03]

35

Autonomic Computing
Metaphor: human nervous system
Regulation of vital functions:
Breath, blood pressure, heart beating, Seamlessly for human being

Autonomic Computing
Goal:
Machines that manages themselves (self-management)
With highest performances 24/7

Human Nervous System metaphor


Not used for implementation! Artificial mechanisms employed
Adaptive Systems - Giovanna Di Marzo Serugendo 36

Autonomic Computing
Self-Configuration (installation, configuration, integration) Automated configuration of components and systems follow high-level policies. Rest of System adjusts automatically and seamlessly [Kephart03]

Self-Optimisation (parameters) Components and systems continually seek opportunities to improve their own performance and efficiency [Kephart03]

Adaptive Systems - Giovanna Di Marzo Serugendo

37

Autonomic Computing
Self-Healing (error detection, diagnostic, repair) System automatically detects, diagnoses, and repairs localized software and hardware problems [Kephart 03]

Self-protection (detection and response to attacks) System automatically defends against malicious attacks or cascading failures. It uses early warning to anticipate and prevent system wide failures [Kephart 03]

Adaptive Systems - Giovanna Di Marzo Serugendo

38

Autonomic Element
Autonomic Manager

Managed Resource

Adaptive Systems - Giovanna Di Marzo Serugendo

39

Autonomic Elements

Adaptive Systems - Giovanna Di Marzo Serugendo

40

Example
Two Applications Managers (AM1, AM2) handling resources (servers S1, S2)
Resources are dynamically allocated on the basis of policies If application manager cannot apply its policy, it asks a Resource Arbiter (RA) for additional resources
RA

AM1
S1
Adaptive Systems - Giovanna Di Marzo Serugendo

AM2
S2
41

Example
Components
Two application managers (AM1, AM2) Resource Arbiter (RA) Two Servers (S1, S2)

Meta-data
Servers Transaction Time Servers CPU availability
Adaptive Systems - Giovanna Di Marzo Serugendo 42

Example
Policies
AM Policy1
Increase CPU by 5% if response time is above 100ms

AM Policy 2
If transaction time > 100 ms and CPU availability > 98%, ask RA for more CPU

RA Policy
If request for CPU, grant and give priority to AM1

Adaptive Systems - Giovanna Di Marzo Serugendo

43

Unity
Autonomic Elements Application Environment Manager (AM)

Resource Arbiter (RA)

Management of environment resources and Communications Prediction about impact in increasing/decreasing resources Utility function U i ( Si , Di )

Allocation of resources Computation of Optimum Resources (servers)


U (S , D )
i i i i

Registry: Location of autonomic elements Registry policy: High-level policies (utility function) Sentinel: Monitors elements for another element [Chess 04]
Adaptive Systems - Giovanna Di Marzo Serugendo 44

Unity

Adaptive Systems - Giovanna Di Marzo Serugendo

45

Readings
[Bonabeau 99] E. Bonabeau, M. Dorigo, and G. Thraulaz. Swarm Intelligence: From Natural to Artificial Systems Santa Fe Institute Studies on the Sciences of Complexity. Oxford University Press, UK, 1999. [Hadeli 03] Hadeli et al. Self-organising in Multi-Agent Coordination and Control using Stigmergy. LNAI 2977, Springer, pp. 105-123, 2004. [Foukia 05] N. Foukia: IDReAM: Intrusion Detection and Response executed with Agent Mobility Architecture and Implementation. AAMAS05, 2005.

[Hofmeyr 99] S. A. Hofmeyr, S. Forrest: Architecture for an Artificial Immune System. Evolutionary Computation 7(1):45-68, 1999.

Adaptive Systems - Spring 2008 - Giovanna Di Marzo Serugendo

46

Readings
[Bourjot 03] Bourjot, C. Chevrier, V. and Thomas, V.:A new swarm mechanism based on social spiders colonies: from web weaving to region detection. In Web Intelligence and Agent Systems: An International Journal - Vol 1, N.1, pp 47-64 WIAS. 2003. [Chess 04] Chess et al. Unity: Experiences with a prototype Autonomic Computing System. ICAC'04. 2004. [Jelasity 05] Mrk Jelasity and Ozalp Babaoglu: T-Man: Gossipbased overlay topology management. In Proceedings of Engineering Self-Organising Applications (ESOA'05), July 2005.

[Kephart 03] J. Kephart, D. Chess: The Vision of Autonomic Computing, IEEE Computer, January 2003, 36(1):41-50, 2003.

Adaptive Systems - Spring 2008 - Giovanna Di Marzo Serugendo

47

S-ar putea să vă placă și