Title: Adaptive Systems Lecture 10: Engineering Adaptive Systems
1Adaptive SystemsLecture 10 Engineering
Adaptive Systems
- Dr Giovanna Di Marzo Serugendo
- Department of Computer Science
- and Information Systems
- Birkbeck College, University of London
- Email dimarzo_at_dcs.bbk.ac.uk
- Web Page http//www.dcs.bbk.ac.uk/dimarzo
2Lectures 8/9 Review
- Taxonomy / Classification
- Optimisation Problems (Static/Dynamic)
- Cultural Heritage (Bees)
- Trust-based access control
- Swarms of Robot (Ants)
- Region detection (Spiders)
- Manufacturing Control (Ants)
- Immune Computer
- P2P Systems Protocols (Gossip)
- Autonomic Computing
3Lecture 10 Overview
- Overall picture
- Software Agents
- Autonomous Agents
- Mobile Agents
- Adaptation Mechanisms
- Translation of natural mechanisms
- Artificial mechanisms
- Middleware infrastructures
- Swarm-based
- Field-based (Lecture 11)
- Methodologies and tools
- Open Issues
4Overall Picture
Adaptation Mechanisms
Natural Adaptive Systems
Engineering Adaptive Systems
Model State st
Artificial Adaptive Systems
Analysis and Simulation
5Engineering Overview
Engineering Adaptive Systems
6Software 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
7Software Agents
- Agents
- Situated in an environment
- Sensors (to sense environments state)
- Actuators (to perform some action based on
environments 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
8Software Agents
- Agents Interactions
- Communication (exchange of messages)
- Inform, request, confirm, etc.
- Coordination (of individual agents tasks)
- Managing inter-dependencies between the
activities of the agents - Resource sharing
- Dependencies (tasks scheduling)
- Collaboration
- Competition
- Transactions
- Agent-oriented software engineering
9Multi-Agent Systems
- Multi-Agent Systems
- Systems composed of several agents
- Reaching goals difficult to achieve for single
agent - May
- include humans
- exhibit self-organising behaviour
10Multi-Agent Systems
- Applications
- Distributed Systems
- Multi-agent system carries out some task / Nodes
of systems agents - Distributed sensing
- Vehicles monitoring using distributed cooperating
sensors - Information retrieval and management (web)
- Control air-traffic control, spacecraft control
- Personal Software Assistants
- Individual agents
- Proactive assistant helping user with some
application - Calendar assistant, e-mail assistant
- E-commerce
- Shopping agents, auction bots
- Virtual environments
11Multi-Agent Systems
- Applications
- Simulation and Modelling
- Social systems (human societies)
- Complex systems
12Mobile Agents
- Software Agents
- Move from one machine to another
- Types of Mobility
- Strong Mobility
- Code execution stack are moved
- Execution continues where it stopped
- Weak Mobility
- Code only is moved
- Possibly data
- Execution starts at the beginning
13Mobile Agents
- Elements of mobility
- Components
- Resources
- Source Code
- Data
- Hardware (CPU)
- Calculus
- Process, threads execution state, links
- Execution
- Interactions
- Message exchange
- Execution sites (hosts)
14Mobile Agents
- Execution of a service
- Requirements
- Know-how (code)
- Data
- Physical resources (CPU)
- Process
- Need to be at the same place
15Mobile Agents
- Mobility Paradigms Carzaniga 97, Fuggetta 98
- Client/Server
- Remote Evaluation
- Code on Demand
- Mobile Agent
16Mobility Paradigms
17Mobility Paradigms
18Mobility Paradigms
19Mobility Paradigms
20Mobile Agents
- Technology
- Programming Languages
- Run-time
- Execution support
- Platforms/Virtual Machines
21Mobile Agents
- Run-time environment
- Mobility primitives
- Submit / clone / etc
- Interaction Mechanisms
- Agents coordination
- Type of mobility
- Programming
- Aware of execution site
- Mobility is under programmers control
22Mobile Agents
- Applications
- History
- Load balancing in OS
- Remote batch processes
- Postscript files
- Independent initiatives for building virtual
machines - Java
- Applets, Aglets (Java mobile code)
- Active networks
- programs in network nodes
23Adaptation Mechanisms
- Translation of Natural Mechanisms
- Stigmergy
- Indirect communication through the environment
- Digital pheromone
- intensity, evaporation rate
- Work-in-progress
- mapping table configurations action
- Gossiping
- Informal discussion among entities
- Local exchange of information (neighbours list)
24Adaptation Mechanisms
- Translation of Natural Mechanisms
- Trust
- Human trust in peers
- Trust values, calculation of risk, decision of
actions - Updated on basis of positive/negative evidence
- Immune System
- B cells antibodies (detection and marking)T
cells (destruction) - Bit strings (anomaly to detect)
- Mobile agents (B and T cells)
25Adaptive Mechanisms
- Implementation of Artificial Mechanisms
- Tags
- Markings attached to individuals (agents) and
observable by others - Agents change behaviour on basis of utility
function value observed in peers (tag) - Metadata
- Additional information (metadata) about
functional / non-functional information /
policies - Middleware processes metadata and components
adapt to policies
26Adaptive Mechanisms
- Middleware infrastructure
- Supporting adaptive mechanism
- Built-in adaptation features
27Middleware Infrastructures
- Middleware
- Intermediary software layer
- Allow communication and coordination among agents
(entities) - Interest for decentralised adaptive systems
- Shared environment
- Agents coordinate their work through this
environment - No need for central control
- May support adaptation mechanism
28Middleware 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
- AntHill
- Field-Based Infrastructures
- Co-Fields
- TOTA
29Coordination 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
30Coordination Spaces
Shared Tuple Space
A
(name, Arthur, surname, Smith, age, 7)
rd
B
(name,?x, surname, Smith, age, ?i)
31Coordination Spaces
- Coordination spaces as middleware layers
- Uncoupled interactions
- Limited form of self-organisation
- Decentralised control, anonymous and indirect
interactions among agents - No specific support for adaptation mechanism
- Languages
- Linda
- JavaSpaces (Sun)
- TSpaces (IBM)
32SwarmLinda
- SwarmLinda System Charles 04
- Network of tuple space nodes
- Nodes communicate with each other
- Node exchange tuples
- Goal
- Optimisation distribution and retrieval of tuples
- Dynamically determining storage locations for
tuples - Tuples of same type stored in clusters (clusters
emerge) - Interest
- makes Linda scalable and distributed
33SwarmLinda
- Principle Ant Metaphor
- Ants
- Template-ant search for food (matching tuple)
- Tuple-ant (store food store tuples)
- Ants environment
- Network of tuple spaces nodes
- Content tuples and scent (likelihood of matching
templates) - Scent stands for the pheromone
- Tuple Storage (out)
- Storage ant sorting (Tuple-ant)
- Tuple-ants carry tuple and drop tuple at specific
nodes - Tuple Retrieval (in / rd)
- Requests ants looking for food (Template-ant)
- Template-ants carry request and test at each node
for matching tuples - http//cs.fit.edu/rmenezes/SwarmLinda
34SwarmLinda
- Implementation
- Scent is volatile and disappears with time
- Storage
- Node N augments  scent for the same kind of
tuple - If sufficient  scent then keeps the tuple
- If not, looks for more suitable neighbour
(highest concentration of that scent). - Tuple is sent to that node (that will do the same
with the tuple keep or send elsewhere). - Tuple is dropped after some time even if no
matching scent - Retrieval
- Node N determines if a local tuple matches the
template - If no matching tuple looks for highest scent for
that kind of tuple in its neighbourhood. - Request is sent to that node (that will do the
same with the request)
35SwarmLinda
- Algorithms
- Retrieval
- Initial spreading of scent close to nest
- Loop
- Template-ant checks for matching tuple at current
location - Found - go back at origin - leave scent
at each step - Not found - Check neighbour for highest scent
and move there - If no scent, choose randomly
a neighbour
36SwarmLinda
37Anthill
- Anthill System Babaoglu 02
- Dynamic network of peer nodes
- Adaptive agents travel through the network to
solve complex problems - Interact with nodes
- Cooperate with other agents
- P2P Applications
38Anthill
- Principle - Ant metaphor
- Anthill system network of interconnected nests
- Nest peer entity sharing computational and
storage resources - Nests handle requests of local applications
(user) - Generate one or more ants roaming the network to
satisfy the request - Ants
- Observe environment
- Perform local computation
- Move from nest to nest until finds information
- Leave information on visited nests (e.g. routing
info for retrieving files) - Indirectly communicate with each other
(stigmergy) - Service for applications
- Implemented through the ants work
- E.g. file-sharing application / distributed file
index search service - Applications interactions with Services
- Application perform service requests to local
node - Wait for replies through local node
39Anthill
File Sharing Service
Files Storage
Grid Service
Data Storage
40Readings
- 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 - Carzaniga97 A. Carzaniga, G.-P. Picco, G.
Vigna Designing Distributed Applications with
Mobile Code Paradigms. International Conference
on Software Engineering (ICSE97), pp. 22 - 32,
1997. - 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. - Fuggetta98 Alfonso Fuggetta, Gian Pietro Picco,
Giovanni Vigna. Understanding Code Mobility.
IEEE Transactions on Software Engineering 24(5),
pp. 342 361, 1998. - Gelernter 85 D. Gelernter. Generative
communication in Linda. ACM Transactions on
Programming Languages and Systems, 7(1)80--112,
January 1985. - Wooldridge 01 M. Wooldridge. An Introduction
to Multi-Agent Systems. Wiley. 2001.