Artificial Systems 2

Embed Size (px)

Citation preview

  • 8/2/2019 Artificial Systems 2

    1/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: [email protected]

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

    http://www.dcs.bbk.ac.uk/~dimarzohttp://www.dcs.bbk.ac.uk/~dimarzohttp://www.dcs.bbk.ac.uk/~dimarzohttp://www.dcs.bbk.ac.uk/~dimarzo
  • 8/2/2019 Artificial Systems 2

    2/47

    Adaptive Systems - Spring 2008 - Giovanna Di Marzo Serugendo 2

    Lecture 8: Review

    Taxonomy / Classification

    Static Optimisation Problems

    Ant-Colony Optimisation Particle Swarm Optimisation

    Dynamic Optimisation Problems

    Trust-based access control

  • 8/2/2019 Artificial Systems 2

    3/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 3

    Lecture 9: Overview

    Swarms

    Robots

    Spiders-based systems

    Manufacturing Control

    Immune Computer

    P2P Systems Autonomic Computing

  • 8/2/2019 Artificial Systems 2

    4/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 4

    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 recruitnestmates

    Size of group is adapted to size of prey Pheromone used to recruit nestmates

    Coordination for transporting prey occurs throughindirect communication (stigmergy) Actual transport involves:

    re-alignment and re-positioning

  • 8/2/2019 Artificial Systems 2

    5/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 5

    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

  • 8/2/2019 Artificial Systems 2

    6/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 6

    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

  • 8/2/2019 Artificial Systems 2

    7/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 7

    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

  • 8/2/2019 Artificial Systems 2

    8/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 8

    Swarms of Robots

    Adaptation

    Different configurations

    Box positioning, robots placements

  • 8/2/2019 Artificial Systems 2

    9/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 9

    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

  • 8/2/2019 Artificial Systems 2

    10/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 10

    Region Detection

    http://media.star-telegram.com/Multimedia/News/Photos/Bigweb.jpg

  • 8/2/2019 Artificial Systems 2

    11/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 11

    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

  • 8/2/2019 Artificial Systems 2

    12/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 12

    Region Detection

  • 8/2/2019 Artificial Systems 2

    13/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 13

    Region Detection

  • 8/2/2019 Artificial Systems 2

    14/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 14

    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

  • 8/2/2019 Artificial Systems 2

    15/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 15

    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

  • 8/2/2019 Artificial Systems 2

    16/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 16

    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 realisingthe 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, andmakes bookings.

    Manufacturing control Obtained from the choices made by order agents

    On the basis of the above information

    Actually executed by resources agents

  • 8/2/2019 Artificial Systems 2

    17/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 17

    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

    time

    Orders - Agent

    Ra

    Rb

    Rc

    Rd

    t1

    EA1

    Ra

    Rb

    Rc

    Rd

    t2

    EA2

    Ra

    Rb

    Rc

    Rd

    t3

    EA3

  • 8/2/2019 Artificial Systems 2

    18/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 18

    Manufacturing Control

    Adaptation

    Actual factory status

    Current orders

  • 8/2/2019 Artificial Systems 2

    19/47

    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

  • 8/2/2019 Artificial Systems 2

    20/47

    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 ofantigen and antibody

    Ab = (Ab1, ..., Ab

    L) Ag = (Ag

    1, ..., Ag

    L)

    Affinity D: SL x SL RL (degree of matching)

  • 8/2/2019 Artificial Systems 2

    21/47

    Artificial Immune System

    Evaluating interactions

    Affinity measure Affinity D: SL x SL RL

    Complementary / Similarity A distance: (Euclidian, Manhattan, Hamming)

    http://en.wikipedia.org/wiki/Immune_system

    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)

    L

    i iiAgAbD

    1

    2)(

    L

    i iiAgAbD

    1)(

    http://en.wikipedia.org/wiki/Immune_system

  • 8/2/2019 Artificial Systems 2

    22/47

    Artificial Immune Systems

    Immune Algorithms

    Bone marrow

    Generate populations of immune cells and molecules (tobe 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 detectedantigens

    Immune networks

    Simulate immune networks

  • 8/2/2019 Artificial Systems 2

    23/47

    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

  • 8/2/2019 Artificial Systems 2

    24/47

    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

  • 8/2/2019 Artificial Systems 2

    25/47

    Artificial Immune Systems

    Clonal selection

    Proliferation of cells that recognise specificantigen

    Proportional to degree of affinity (higheraffinity, higher proliferation)

  • 8/2/2019 Artificial Systems 2

    26/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 26

    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

  • 8/2/2019 Artificial Systems 2

    27/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 27

    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 minimalimpact)

    Adaptable

    Learn to recognise new infections

    Memory of past infections

    Autonomous

    No outside control

  • 8/2/2019 Artificial Systems 2

    28/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 28

    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 oneregenerated

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

  • 8/2/2019 Artificial Systems 2

    29/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 29

    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

  • 8/2/2019 Artificial Systems 2

    30/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 30

    Intrusion Detection

    Adaptation

    Learning

    Memory:

    Quick reaction for further identical intrusion

    Adaptation to changes in normal behaviour

  • 8/2/2019 Artificial Systems 2

    31/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 31

    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 atrail for food

    Mobile Agents Software able to change its location (keeping its execution state)

  • 8/2/2019 Artificial Systems 2

    32/47

    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

  • 8/2/2019 Artificial Systems 2

    33/47

    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)

    Gossip message exchange Choice of closest neighbour based on ranking function Local exchange / combination of neighbours profile

    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

  • 8/2/2019 Artificial Systems 2

    34/47

    P2P / Networks

    Applications

    Overlay networks supporting P2P systems

    Maintenance or establishment of P2P topology

    Sorting, Clustering, Distributed Hash table

  • 8/2/2019 Artificial Systems 2

    35/47

    Autonomic Computing

    Autonomic computing

    computing systems that can

    manage themselvesgivenhigh-level objectivesfrom

    administrators [Kephart03]

    35

  • 8/2/2019 Artificial Systems 2

    36/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 36

    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

  • 8/2/2019 Artificial Systems 2

    37/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 37

    Autonomic Computing

    Self-Configuration (installation, configuration, integration)

    Automated configuration of components and systems followhigh-level policies. Rest of System adjusts automatically and

    seamlessly [Kephart03]

    Self-Optimisation (parameters)

    Components and systems continually seek opportunities toimprove their own performance and efficiency [Kephart03]

  • 8/2/2019 Artificial Systems 2

    38/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 38

    Autonomic Computing

    Self-Healing (error detection, diagnostic, repair)

    System automatically detects, diagnoses, and repairs localizedsoftware 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 andprevent system wide failures [Kephart 03]

  • 8/2/2019 Artificial Systems 2

    39/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 39

    Autonomic Element

    Autonomic Manager

    Managed Resource

  • 8/2/2019 Artificial Systems 2

    40/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 40

    Autonomic Elements

  • 8/2/2019 Artificial Systems 2

    41/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 41

    Example

    Two Applications Managers (AM1, AM2) handlingresources (servers S1, S2)

    Resources are dynamically allocated on the basis ofpolicies

    If application manager cannot apply its policy, it asks aResource Arbiter (RA) for additional resources

    RA

    AM1 AM2

    S1 S2

  • 8/2/2019 Artificial Systems 2

    42/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 42

    Example

    Components

    Two application managers (AM1, AM2)

    Resource Arbiter (RA)

    Two Servers (S1, S2)

    Meta-data

    Servers Transaction Time

    Servers CPU availability

  • 8/2/2019 Artificial Systems 2

    43/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 43

    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

  • 8/2/2019 Artificial Systems 2

    44/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 44

    Unity

    Autonomic Elements

    Application Environment Manager (AM)

    Management of environment resources and Communications

    Prediction about impact in increasing/decreasing resources

    Utility function

    Resource Arbiter (RA)

    Allocation of resources

    Computation of Optimum

    Resources (servers)

    Registry: Location of autonomic elements Registry policy: High-level policies (utility function)

    Sentinel: Monitors elements for another element

    [Chess 04]

    ),(iii DSU

    i iii DSU ),(

  • 8/2/2019 Artificial Systems 2

    45/47

    Adaptive Systems - Giovanna Di Marzo Serugendo 45

    Unity

  • 8/2/2019 Artificial Systems 2

    46/47

    Adaptive Systems - Spring 2008 - Giovanna Di Marzo Serugendo 46

    Readings

    [Bonabeau 99] E. Bonabeau, M. Dorigo, and G. Thraulaz. SwarmIntelligence: From Natural to Artificial Systems Santa Fe Institute Studies onthe 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 MobilityArchitecture and Implementation.AAMAS05, 2005.

    [Hofmeyr 99] S. A. Hofmeyr, S. Forrest: Architecture for an Artificial

    Immune System. Evolutionary Computation 7(1):45-68, 1999.

  • 8/2/2019 Artificial Systems 2

    47/47

    Adaptive Systems - Spring 2008 - Giovanna Di Marzo Serugendo 47

    Readings

    [Bourjot 03] Bourjot, C. Chevrier, V. and Thomas, V.:A new swarmmechanism based on social spiders colonies: from web weaving toregion detection. In Web Intelligence and Agent Systems: AnInternational 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: Gossip-based overlay topology management. In Proceedings ofEngineering Self-Organising Applications (ESOA'05), July 2005.

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