Upcoming SlideShare
Loading in …5
×

# 香港六合彩-六合彩

1,114 views

Published on

2005/04/1

0 Comments
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

No Downloads
Views
Total views
1,114
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

### 香港六合彩-六合彩

1. 1. Natural Computation CO637 Swarm Intelligence III: Ant Colony Optimisation applications Comparing PSO and ACO Alex Freitas
2. 2. Recap - basic ideas of Ant Colony Optimisation (ACO) algorithms <ul><li>Each path followed by an ant represents a candidate solution to the target problem </li></ul><ul><ul><li>An ant constructs its path (candidate solution) incrementally, typically by adding one component at a time to the solution </li></ul></ul><ul><li>The amount of pheromone that an ant deposits on its path is proportional to the quality of the corresponding candidate solution </li></ul><ul><li>When an ant has to choose between alternative paths, the larger the amount of pheromone on a path, the larger the probability of the ant choosing that path </li></ul>
3. 3. Recap - main elements in the design of an ACO algorithm <ul><li>An appropriate representation of the problem </li></ul><ul><ul><li>components that an ant will use to incrementally construct a solution </li></ul></ul><ul><li>A problem-dependent heuristic function (  ) that measures the quality of each component that can be added to a solution </li></ul><ul><li>A rule for updating the amount of pheromone (  ) associated with each component in a path followed by an ant </li></ul><ul><ul><li>Pheromone increases in proportion to quality of the path (solution) </li></ul></ul><ul><li>A probabilistic transition rule: the probability of choosing a component i is proportional to the product  i   i </li></ul> 1   1  2   2 1 2 ? component 1 component 2
4. 4. Applying Ant Colony Optimisation (ACO) to Data Network Routing: AntNet <ul><li>In a data network each data packet can follow a different route </li></ul><ul><ul><li>E.g., the Internet </li></ul></ul><ul><li>Problem: to find the fastest (minimum cost) path between two nodes, using routing tables at each node of the network </li></ul><ul><li>This is a difficult problem because: </li></ul><ul><ul><li>Traffic load varies (potentially a lot) with time, in unpredictable ways </li></ul></ul><ul><ul><li>Network topology also varies with time (e.g. links break down) </li></ul></ul><ul><ul><li>The problem involves distributed processing – no central coordinator </li></ul></ul><ul><li>All these characteristics suggest that ant colony algorithms are a suitable type of algorithm for this problem </li></ul>
5. 5. AntNet’s main data structure A pheromone matrix T associated with each node i of the network Each element  ijd of T indicates the desirability for an ant in node i and with destination node d to move to node j  i,1,1 . . .  i,1,n  i,N(i),1 . . .  i,N(i),n destination nodes . . . . . . . . . Neighbour nodes Structure of transition matrix at node i : N(i) is the number of neighbours of node i n is the total number of nodes in the network
6. 6. The AntNet Algorithm for Data Network Routing (1) <ul><li>At regular intervals, artificial ants are launched from network nodes towards destination nodes </li></ul><ul><li>Two kinds of ants, forward and backward ants: </li></ul><ul><li>Forward ant searches for fastest path from its source to its destination node </li></ul><ul><ul><li>A forward ant shares the same queues as data packets, collecting information about the time taken to travel to each node visited in its path </li></ul></ul><ul><ul><li>At each node i , each ant having destination d selects the node j to move to with probability P ijd proportional to:  ijd +  ij , where: </li></ul></ul><ul><ul><ul><li> ijd = pheromone (capture current and past status of the network) </li></ul></ul></ul><ul><ul><ul><li> ij = instantaneous state of the queue in the link from node i to node j </li></ul></ul></ul><ul><ul><ul><li>N(i) </li></ul></ul></ul><ul><ul><ul><li> ij = 1 – q ij / (  q ik ) , q ij = number of bits waiting to be sent from i to j </li></ul></ul></ul><ul><ul><ul><li>k=1 </li></ul></ul></ul><ul><ul><ul><li> = parameter specifying the weight of heuristic  w.r.t. pheromone  </li></ul></ul></ul>
7. 7. The AntNet Algorithm for Data Network Routing (2) <ul><li>Once it reaches its destination, a forward ant is transformed into a backward ant , which goes back to the source along the same path (but in the opposite direction) </li></ul><ul><ul><li>When moving backwards, the information stored in the ant (collected in the forward phase) is used to update the pheromone matrix, as a function of the goodness of the path that they followed in the forward phase </li></ul></ul><ul><ul><li>A backward ant does not share the same link queues as data packets; it uses higher-priority queues, to speed up the updating of pheromone matrix </li></ul></ul><ul><ul><li>1 2 3 </li></ul></ul><ul><ul><li>4 5 6 </li></ul></ul><ul><ul><li>At each node i in the forward ant’s path before d , pheromone  ijd (suggesting to choose neighbour j when destination is d ) is incremented by an amount inversely proportional to the forward ant’s trip time from i to d </li></ul></ul>E.g., forward ant 1  6, backward ant 6  1
8. 8. The AntNet Algorithm for Data Network Routing (3) <ul><li>AntNet has been extensively evaluated in experiments/ simulations with models of real networks, e.g.: </li></ul><ul><ul><li>National Science Foundation network (USA), NSFnet </li></ul></ul><ul><ul><li>Japanese NTT company backbone, NTTnet </li></ul></ul><ul><li>AntNet was compared with the best-known routing algorithms </li></ul><ul><li>Overall the performance of AntNet was very competitive with the performance of those routing algorithms </li></ul><ul><li>See sections 6.3 and 6.4 of the ACO book by Dorigo & Stutzle for details </li></ul>
9. 9. An application of ACO in automated customer support (1) <ul><li>An approach to provide customer support on the web consists of a set of FAQs (Frequently Asked Questions), with the corresponding answer </li></ul><ul><li>Manual maintenance of FAQs is expensive and slow in many large-scale applications </li></ul><ul><li>Alternative: providing a dynamic database of FAQs, using some intelligent method to automatically update the FAQs and their relationships </li></ul><ul><li>We will study a system – called RightNow Web– that does that in a way loosely inspired by ant colony principles </li></ul>
10. 10. An Application of ACO in automated customer support (2) <ul><li>Human visitors to the site are the ant colony members </li></ul><ul><li>Assumptions about the behaviour of human visitors: </li></ul><ul><ul><li>Each user is accessing the web site to find an answer to a specific question in a FAQ – each FAQ will also be referred to as an Answer </li></ul></ul><ul><ul><li>Each user follows a directed (rather than random) approach to find Answers: i.e. each user chooses at each step the FAQ/Answer which seems to be the best Answer to her/his question </li></ul></ul><ul><li>Basic idea: to increment the usefulness score for an Answer visited by a user, loosely analogous to dropping more pheromone in a part of a path in ant colony </li></ul>
11. 11. An Application of ACO in automated customer support (3) <ul><li>Knowledge base initially contains a set of FAQs, or Answers, for the most predictable questions of users </li></ul><ul><li>Users view a table of Answers, for instance: </li></ul><ul><li>Subject Score </li></ul><ul><li>requirements for retirement 1,801 </li></ul><ul><li>calculating your pension 1,769 </li></ul><ul><li>pension for your dependents 1,752 </li></ul><ul><li>. . . </li></ul><ul><li>List of Answers is kept in decreasing order of score, and it is dynamically updated </li></ul><ul><ul><li>The FAQs (Answers) are continuously changing </li></ul></ul><ul><ul><li>Users’ interest change with time </li></ul></ul>
12. 12. An Application of ACO in automated customer support (4) <ul><li>“ Score” is proportional to the usefulness of the Answer to the user and to the the number of user queries solved by an Answer </li></ul><ul><li>Explicit and Implicit methods to compute an answer’s score: </li></ul><ul><li>Explicit: users rates the usefulness of an answer, after reading it </li></ul><ul><ul><li>More reliable than implicit rating, but… </li></ul></ul><ul><ul><li>Less than 10% of users bother to rate answers </li></ul></ul><ul><li>Implicit: based on users’ navigation through the “network” of answers – the more users read an Answer, the more its score is increased </li></ul><ul><ul><li>Less reliable than explicit rating, has a smaller weight, but… </li></ul></ul><ul><ul><li>Guaranteed participation of every user, without bothering the user </li></ul></ul>
13. 13. An Application of ACO in automated customer support (5) <ul><li>Clicking on an Answer, the user can move to a related answer: </li></ul><ul><li>Subject: calculating your pension </li></ul><ul><li>Answer: for each year of service you get 1% of your final salary as your pension, up to the limit of 40% of your final salary </li></ul><ul><li>Related Answers: pension for your dependents </li></ul><ul><li>requirements for retirement </li></ul><ul><li>As users click on related Answers, they navigate through the “network” of FAQs (Answers) – users act as “ants” in an ACO </li></ul><ul><li>A 1 A 4 </li></ul><ul><li>A 3 </li></ul><ul><li>A 2 </li></ul>Human users are “foraging” for best answer Move from answer A 1 to answer A 2 : increasing “pheromone” (score) in the link
14. 14. An Application of ACO in automated customer support (6) <ul><li>According to a paper describing the RightNow Web system: </li></ul><ul><ul><li>its users experienced between 10% and 99.5% reduction in customer support load </li></ul></ul><ul><ul><li>In some notable cases customers reported an estimated savings of more than \$1.2 million per month due to reduced phone support volume </li></ul></ul>
15. 15. Summary about ACO applications <ul><li>We studied 3 types of applications of Ant Colony algorithms: </li></ul><ul><li>Travelling Salesman Problem – original and most well-known application of ACO </li></ul><ul><li>Data network routing: ants explore the network to find less overloaded routes; shorter routes  more pheromone </li></ul><ul><li>Automated customer support: human visitors to a website are considered the “ants”; more visited FAQs  more pheromone </li></ul><ul><li>In all these applications, the ants act in a completely distributed manner (no central coordinator), and the dynamic nature of the environment is clear in the data network routing and automated customer support applications </li></ul>
16. 16. Comparing PSO and ACO (1) <ul><li>Both are population-based, stochastic, approximate algorithms – their “global search” hopefully finds a near-optimal solution </li></ul><ul><li>ACO uses, in addition to its generic adaptation strategy (increasing pheromone for the best solutions), problem-dependent information as a local heuristic; unlike conventional PSO, which uses only its generic adaptation strategy (moving particles towards its best neighbours’ and personal best positions) </li></ul><ul><li>An ant incrementally constructs a solution; unlike particles in PSO </li></ul><ul><li>Both are very generic heuristic methods, but in practice: </li></ul><ul><ul><li>PSO is mainly used in problems with continuous variables, e.g. numerical function optimization </li></ul></ul><ul><ul><li>ACO is mainly used in problems with discrete or nominal variables, e.g. combinatorial optimization problems </li></ul></ul><ul><li>Main drawback of ACO for coping with continuous variables: the pheromone matrix is a discrete data structure </li></ul><ul><ul><li>Usually requires continuous variables to be discretized </li></ul></ul>
17. 17. Comparing PSO and ACO (2) <ul><li>Conventional PSO’s equations for velocity and position updating are based on computing differences between the numerical coordinates of different particles in the search space </li></ul><ul><li>This approach tends not to be appropriate for some problems (in particular combinatorial optimization ones), where what needs to be optimized is a combination of “nominal” (non-numeric) values </li></ul><ul><ul><li>E.g., in the case of the data network routing problem, the goal is to find the optimal sequence of nodes n 1 , n 2 , …. </li></ul></ul><ul><li>A more effective application of PSO to nominal data requires a new approach for updating velocity and position which makes sense for the problem being solved </li></ul>
18. 18. References M. Dorigo and T. Stutzle. Ant Colony Optimization . MIT Press, 2004. N. Monmarche, M. Slimane, G. Venturini. AntClass: discovery of clusters in numeric data by an hybridization of an ant colony with the Kmeans algorithm. Internal Report No. 213 , E3i. Laboratoire d’Informatique. Universite de Tours, France. Jan. 1999. (URL: citeseer.ist.psu.edu/559169.html) D. Warner, J.N. Richter, S.D. Durbin and B. Banerjee. Mining user session data to facilitate user interaction with a customer service knowledge base in RightNow Web. Proc. 7th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining (KDD-2000) , pp. 467-472. ACM Press, 2001.