Title: Swarm Intelligence Part 1 Ants Algorithm
1Swarm IntelligencePart 1Ants Algorithm
2BIONICS
- ????? ???? ????? ? ???? ????? ???? ?????? ??
??????? ? ?????? ??? ???? ???? ??? - ?? ????? ????
- ???????? ??? ????? Genetic Algorithms
- ???? ??? ???? Neural Networks
- ????? ??? ????????? ?? Self-organizing Systems
- ????? ?? ??? ????? ?? ???? ????? ???? ?? ?????
??? ????? ?? ? ????? ??? ?? ????? ??????? ?????
???? ??? - ?? ????? ???? ?? ??? ???? ???????? ??? ????????
???? ?????????? ??? ???????? ? ????? ??? ?????
??? ??? - BIONICS Application of biological principles to
the study and design of engineering systems.
3Swarm Intelligence
any attempt to design algorithms or distributed
problem-solving devices inspired by the
collective behavior of social insect colonies and
other animal societies Bonabeau, Dorigo,
Theraulaz Swarm Intelligence, p. 7
4??? ???? ? ????? ????????
5Ants ????? ??
- ????? ?? ??? ?? ???? ????????? ??????? ????
?????. - ????? ?? ?? ???? ????? ?????? ??? ?????? ?? ??
????? ?? ???? - ??? ? ?????? ??? ?? ??? ?? ?? ????
- ????? ???? ???
- ???? ???? ??????
- ???????? ????
- ?????? ?? ??? ??
- ????? ?? ???? ???? ?? ??
- ???????
- ??? ????
- .........
6????? ?????
- ?? ?? ????? ?? ?????? ???? ? ???? ???? ??? ???
????? ?? ???? - ??? ?? ????? ?? ?????? ????? ???? ???? ??? ?????
????? ?????? ???? ?? ???. - ??? ??? ????? ? ????? ?? ??? ??? ????? ?????.
7Emergence
Unique global behavior arising from the
interaction of many agents ????? ??? ?? ?? ??????
????? ????? ????? ?? ????? ??? ???? ?? ???
- Emergence ???? ????? ?? ???? ?? ?????? ????? ????
????? ?? ?? ?? ???? ?? ?????? ??? ?? ???? ?? ????
?? ????? ?????? ?????? ?? ?? ???. - ??? ?? ?????? ?? ????? ?? ???? ??? Emergence ??
??? ????? ????? ???? ?? ??? ? ??????? ????? ?
??????? ?? ?? ???? ??? ????.
8Emergence
Unique global behavior arising from the
interaction of many agents ????? ??? ?? ?? ??????
????? ????? ????? ?? ????? ??? ???? ?? ???
- Emergence ?? ????? ??? ?????? ????? ?? ????
????? ???? ??????? ? ???? ???? ?? ?????? ???
?????? ????? ????? ??? ?????????????? ???????
????? ??? ???? ??????? ? ????? ???? ????? ?..... - ?? ?? ?? ?? ??? ????? ?? ????? ????? ?? ?? ???
???? ?? ???? ????? ?? ????? ?? ??? ?????? ?? ????.
"EMERGENCE The connected lives of ants, brains,
cities, and software" by Steven Johnson
9????? ????? ??
- ?? ????? ???????? ???? ?? ?? ???? ?? ???
- ???????? ????? ?????? ??? ?? ??? ?????? ????????
????? ?? ???? ?? ???
10Swarm Intelligence
- Swarm Intelligence ?? ??? ???? ????? ???? ?????
????? ????? ???? ???? ???? ?? ??? ??? ??? - ??????? ??? ???? ??????? ??
- ????? ???? ???
- ????? ?? ???? ????????? ?? ?? ?????? ?????? ??
???? - ????? ??? ?????? ?? ???????? ???? ???? ????? ????
?? ??? - ??? ??????? ????????
- ?? ?? ????? ?? ???? ????? ??? ?? ???????
11???? ???????? ???? ????? ??
- ????? ?? ????? ?? ??? ???? ??????? ????? ???? ??
??? ???? ? ?? ?? ?? ??? ?? ??? ?? ???? - ??? ??? ?? ??? ????? ???? ?? ???
- ?? ????? ???? ?? ???? ?? ???? ?????? ? ?? ??? ??
??? ???? ?? ??? - ??? ????? ?? ?? ??? ????? ?????? ??? ?? ?? ?? ??
???? - ????? ?? ???? ?????? ??? ????? ?? ???
- ??? ????? ?? ?? ??? ????? ???????? ??? ???? ?? ??
???? ?? ???? ?? ??? - ? ??? ?? ???? ??? ????? ?? ???
- ??? ?? ???? ?????? ?? ??? ?? ????? ?? ?? ????
???? ???? ??? ??? ???.
12Ant Colony Optimization
- Marco Dorigo is research director of the IRIDIA
lab at the Université Libre de Bruxelles - Inspired by the remarkable ability of social
insects to solve problems, Dorigo and Stützle
introduce new technological design principles for
seeking optimized solutions to difficult
real-world problems, such as network routing and
task scheduling.
13Ant Colony Optimization
- Ant Colony Optimization ?? ?????? ????? ?? ????
???? ???? ??????? ????? ?? ????? ???? ?????? ????
???????? ?? ???? ??????? ?? ???
14????? ?? ????? ?? ?????? ????? ???? ???? ?? ????
???? ?
15????? ????? ?? ?????? ?????? ?? ????
- ????? ?? ??????? ???? ? ????? ?? ?????? ? ??? ??
?? ?????? ??????? ?? ???? - ????? ?? ??? ??? ??????
- ?? ??? ????? ????? ?? ??? ?????? ?? ??? ? ?????
?? ?? ?????? ????? ???? - ??? ?? ??????? ?? ?? ?????? ?? ?????? ??????? ??
????? ???? - ??? ??? ?????? ?? stigmergy ?? ?????
- ????? ?? ?? ??? ????? ?? ?? ?? ?? ?????? ?? ???
???? ????? - ?? ??? ???? pheromone ???? ?? ???
- ????? ?? pheromone ?? ?? ????? ?? ???? ????? ??
?? ?? ?? ???? - ????? ????? ????? ?? ??? ??? pheromone ?? ???
????? ?? ????
16The Shortest Path (1)
- Two ants start their random walk
- They both eventually find the food
- The one taking the shorter path finds the food
first - Each ant leaves a trail of pheromones behind
- Once taken the food the ants follow their
pheromone trail towards the nest
17The Shortest Path (2)
- The one taken the shorter path returns first and
arrives back to the nest first
18The Shortest Path (3)
- Now a third ants wants to search for food
- The ant realizes the trials left behind by its
predecessors - Most likely it follows one of the existing trials
rather than initiating a new trial - Most likely it follows the trial with the higher
density of pheromones
19The Shortest Path (4)
- This results in even denser pheromone trial on
the shorter path - In long term this results in most ants using the
shortest path
20(No Transcript)
21Simple Stochastic Algorithm
- ???? ?? ????? ???? ?? ???? ?? ???
- ?? ?????? ????? ?? ???? ???? ?? ???? ?? ???.
- ?? ?????? ?????? ??? ?? ??????? ????? ?????
pheromone ?? ?????? ?? ???. - ??? ?? ?????? ??????? ????? ?? ?? ??? pheromone
?? ????????? ???? ?????? ?????? ?? ??? ??????
????? ???.
22??? ??????? ?????
- ????? ??? ???? ?????? ????? ???? ?????? ??????
????? ??? - ?????? ??????? ???? ?? ????? ???? ?? ?????
??????? ????? ?? ???? - ?? ????? ??? ????? ?? ????? ????? ???? ???? ?? ???
23pheromone ????? ? ??? ??????
- Pheromone ?? ????? ????? ?? ???.
- ??? ??? ?? ??????? ???? ???? ???????? ???.
- ?????? ?? ??????? ????? ?? ??????? ????? ?? ????
????? pheromone ?? ??????? ????? ????? ????
?????? ???.
24???????? ????
- ???????? ?? ???? ???? ??? ?? ???.
- ??? ??? ??? ?????? ???? ??????? ???? ? ?????
?????? ?? ??????? ???? ???.
25?????? ?? ????? ? ??????? ????
- ???????? ?? ???? ????? ???? ? ???? ?? ????? ??
???? ???? ????? ?? ???? ?? ????? ???? ??????? ??
?? ?????? ???. - ?????? ??? ????? ?? ???? ????? ??? ???????? ???
?? ?? ??????? ?????? ?? ???. - ???? ???? ??? ???? ?? ???? ????? ?? ???? ???? ???
????? ?? ?? ?? ??? ??? ? ???? ????? ????? ?? ??
???? ?? ???? ?? ????.
Disclaimer May not work with a cube of ice
26??? ?????
- ????? ?? ?? ??? ?????? ????? ?? ???? ????? ????
????? ????? ???? ???? ?? ????? ?? ????. - ??? ?? ??? ????? ???????? ???
- ??? ????? ?? ????? ????????? ????? ????? ????
27StarLogo
- http//education.mit.edu/starlogo/
- StarLogo is a programmable modeling environment
for exploring the behaviors of decentralized
systems, such as ant colonies. - In decentralized systems, orderly patterns can
arise without centralized control. - Increasingly, researchers are choosing
decentralized models for the organizations and
technologies that they construct in the world,
and for the theories that they construct about
the world. - StarLogo visualizes the behavior of the
decentralized system
28StarLogo
- StarLogo consists of graphic turtles and an
environment - The behavior of the turtles can be programmed
- All turtles run the same program in parallel
- A turtle can represent almost any type of object
an ant in a colony, a car in a traffic jam, an
antibody in an immune system, a molecule in a gas
- Also the effect of the environment on turtles can
be programmed - You can write programs for thousands of "patches"
that make up the turtles' environment. - Turtles and patches can interact with one another
- Turtles can be programmed to "sniff" around the
environment, and change their behaviors based on
what they sense in the patches
29Modeling the Ants Behavior
DEMO
Dont go away We will continue after the demo
30Part 2Ants in Networks
31History
- ABC routing (Schoonderwoerd et al., 96)
- Regular and Uniform ant routing (Subramanian et
al., 97) - Antnet (Dorigo et al., 98)
- Antnet (Dorigo et al., 02)
- Improved Antnet (Boyan et al., 02)
- Modified Antnet (Tekiner et al., 04)
- Antnet with evaporation (Tekiner et al., 04)
- Ants algorithm with QoS (Carrillo et al., 04)
32What Are Ants
- Ants are emulated by mobile agents
- Mobile agents are carried by packets
- Especial packets can be used as mobile agents
(ants)
initialize_ant () while (current_state ?
target_state) A read_local_pheromone-table() P
compute_transition_probabilities (A, M,
problem_constraints) next_state
apply_ant_decision_policy (P, problem_constraints)
move_to_next_state (next_state) if
(step-by-step_pheromone_update) update_pheromone_t
able() // deposit pheromone on visited
arc update_ant_memory() if (delayed_pheromone_upda
te) evaluate_solution() update_pheromone_tables()
// deposit pheromone on ALL visited arcs die()
33What About Pheromones?
- Pheromones pass the information about the length
of the path (time) to other ants - The agents can pass the same information to data
packets at the nodes - Ants decide based on the density of the
pheromones and some probability values - The probability values can be calculated based on
the path information and listed in routing tables
in the nodes
34AntNet
- First application of ants algorithm for routing
in (datagram) packet networks - Ants are sent between source-destination pairs to
create a test and feedback signal system - Ants discover and maintain routes
- Inter-node trip times are used to adjust next-hop
probabilities - Packets are forwarded based on next-hop
probabilities
35Routing Table
- Start with a static routing table for each node.
- Each routing table stores the probabilities of
using the next hops to reach all possible
destinations - Sum of probabilities at each row equals one
Ports (Neighboring Nodes)
Destinations
36Routing Table Updates
- To create a dynamic routing table, create ants
as agents that will go back and forth to random
destinations. - These ants will then update the probabilities in
the routing table. - Packets will be transferred to paths based on the
probabilities listed in the routing table
37The Agents
- Two types of agents (ants)
- Forward Ants (to collect information)
- Backward Ants (to update probability table)
- Two types of queues
- Low priority queue (data packets and forward
ants) - High priority queue (backward ants)
- Forward ants are routed at the same priority as
data packets - Forward Ants experience the same congestion and
delay as data - Backward ants are routed with higher priority
than other packets
38Forward Ants
- At regular intervals every node creates a forward
ant to randomly selected destinations. - Destinations are selected to match current
traffic patterns - Forward ant uses probabilistic routing tables at
every intermediate node to choose output port
from unvisited list of nodes. - Elapsed time and node identifier is pushed to
ants stack. - If a cycle is detected , cycle is deleted from
ants memory. - When a forward ant reaches to its destination It
transforms itself to a backward ant
39Backward Ants
- A backward ant visits the list of the nodes in
its stack in a reverse order, - Updates corresponding entries in the routing
tables and array on its way back to source by
using its values stored on its stack.
40Example
41Statistics
- Except for the routing table, each node also
keeps a table with records of the mean and
variance of the trip time to every destination - At each node, backward ants update the trip time
statistics to the destination in addition to the
next-hop probability
42Routing Table Updates
- Reinforcement Factor (Based on the trip time and
the statistics) - r f (1 - Wbest/T) g (mean,var)
- 0 lt r lt 1,
- Increase the probability of the channel that
backward ant comes from - P P r (1 - P) P (1 r) r
- Decrease the probability of the other channels
- P P (1 - r)
43Data Packets
- Data packets are routed using the next-hop
probabilities - The packets are distributed over the paths
proportional to their probabilities - A probability threshold level can be used to
avoid selection of not-so-good paths - Achieve some degree of load balancing over all
existing good paths
44Performance
- AntNet reports better performance in terms of
- Delay
- Throughput
- Robustness
- Reaction to changes
- Traffic overhead is higher than OSPF
45Variations
- Different varieties of the antnet routing
algorithm will be resulted depending on the - Forward ant routing mechanism
- Routing table update mechanism
- Packet forwarding criterion
46Router Architecture
47Evaporation
- Link usage statistics are used to evaporate the
pheromone laid by the ants. - It is the proportion of number of forward ants
destined to the node x over the total ants
received by the current node in the given time
window. - By evaporating the links probabilities in a
predefined rate, average delay experienced per
packet is reduced
Improved antnet routing algorithm with link
probability evaporation F. Tekiner, F. Z.
Gassemlooy, and S. Al-Khayatt
48Congestion
- Agents are delayed if congestion occurs
- Has the same effect of a longer path
- Pheromones evaporate more
- Less pheromone if agent is delayed more
49Quality of Service
- M-Class ants are used for M-class type of
services - Probabilities in the routing table represent the
probability that packets can reach the required
level of QoS - The probabilities are updated based on the delay
statistics per QoS class and the available
bandwidth - Considering other QoS parameters, such as
availability etc., can be studied
A Quality of Service Routing Scheme for Packet
Switched Networks based on Ant Colony Behavior
Liliana Carrillo and J.L. Marzo
50Security Issues
- Threats
- Untrustworthy hosts
- Forward data/ant packets to a wrong direction
- Delay data packets
- Generate bursts of ant packets
- Malicious Agents
- Carry false trip time information
- Attack Goals
- Increase the packet latency
- Mislead packets to a longer path
- Break down a critical node
- Mislead packets to a certain node to overload it
- Drop Data Packets
- Mislead packets to a malicious node
Security Issues in Ant Routing Weilin Zhong
51Conclusion
- Application of swarm intelligence in network
routing problems - Inspired by the stigmergy model in ant colonies
- Using mobile multi-agent systems
- A distributed adaptive routing algorithm
- Autonomous
52THE END