Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Ant System Optimization by a colony of cooperating agents.

Similar presentations


Presentation on theme: "The Ant System Optimization by a colony of cooperating agents."— Presentation transcript:

1 The Ant System Optimization by a colony of cooperating agents

2 2 Question How can almost blind animals like ants manage to establish shortest route paths from their colony to feeding sources and back?

3 3 Pheromone trail The medium used to communicate information among ants regarding paths, and used to decide where to go. A moving ant lays some pheromone( 信息素 ) on the ground, thus marking the path by a trail of this substance. An ant encountering a previously laid trail can detect it and decide with high probability to follow it, thus reinforcing the trail with its own pheromone. The more the ants following a trail, the more attractive that trails becomes for being followed: autocatalytic( 自催化 ) behavior.

4 4 An example with real ants a)Ants follow a path between A and E b)An obstacle is interposed; ants choose one of the two different paths with equal probability c)On the shortest path more pheromone is laid down

5 5 What are artificial ants here? Agents with very simple basic capabilities which, to some extent, mimic the behavior of real ants. 1) artificial ants will have some memory; 2) they will not be complete blind; 3) they will live in an environment where time is discrete

6 6 An example with artificial ants

7 7 Basic idea If at a given point an ant has to choose among different paths, those which were heavily chosen by preceding ants (i.e., those with a high trail level) are chosen with high probability. Furthermore high trail levels are synonymous with short paths.

8 8 Solve TSP by ant system b(i,t): the number of ants in town i at time t m: the total number of ants Each ant is a simple agent with the following characteristics: 1)it choose the town to go to with a probability that is a function of the town distance and of the amount of trail present on the connecting edge; 2)to force the ant to make legal tours, transitions to already visited towns are disallowed until a tour is completed; 3)when it completes a tour, it lays a substance called trail on each edge (i,j) visited

9 9 Intensity of trail s(i,j,t): the intensity of trail on edge (i,j) at time t Each ant at time t choose the next town, where it will be at time t+1 Iteration: m moves carried out by the m ants in the interval (t,t+1) Cycle: every n iterations and each ant has completed a tour

10 10 Update the intensity of trail After every cycle, trail intensity is updated: s(i,j,t+n)=p*s(i,j,t)+  s(i,j) p: a coefficient such that 1-p represents the evaporation of trail between time t and t+n  s(i,j)=  s k (i,j) s k (i,j) is the quantity per unit of length of trail substance laid on edge (i,j) by the k-th ant between time t and t+n. If k-th ant uses edge (i,j) in its tour, s k (i,j)=Q/L(k), where Q is a constant and L(k) is the tour length of the k-th ant.

11 11 Tabu list It saves the towns already visited up to time t and forbids the ant to visit them again before n iterations (a tour) have been completed. When a tour is completed, the tabu list is used to compute the ant’s current solution. The tabu list is then emptied and the ant is free again to choose.

12 12 Transition probability Define the transition probability from town i to j for the k-th ant as p k (i,j,t)=(s(i,j,t)) a (q(i,j)) b /  (s(i,k,t)) a (q(i,k)) b if j is allowed. a and b are parameters that control the relative importance of trail versus visibility. visibility q(i,j)=1/d(i,j) The transition probability is a trade-off between visibility (which says that close towns should be chosen with high probability, thus implementing a greedy constructive heuristic) and trail intensity (which says that if on edge (i,j) there has been a lot of traffic then it is highly desirable, thus implementing the autocatalytic process)

13 13 Ant-cycle algorithm (1) Initialize time counter t=0 Cycle counter NC=0 s(i,j,t)=c,  s(i,j)=0 Place the m ants on the n nodes

14 14 Ant-cycle algorithm (2) Tabu list index s=1 for k=1 to m Place the starting town of the k-th ant in tabu(k,s)

15 15 Ant-cycle algorithm (3) Repeat until tabu list is full s=s+1 for k=1 to m choose the town j to move to, with probability p k (i,j,t) move the k-th ant to the town j insert town j in tabu(k,s)

16 16 Ant-cycle algorithm (4) for k=1 to m move the k-th ant from tabu(k,n) to tabu(k,1) compute the length L(k) of the tour update the shortest tour found for every edge (i,j) for k=1 to m If k-th ant uses edge (i,j) in its tour, s k (i,j)=Q/L(k)  s(i,j)=  s k (i,j)

17 17 Ant-cycle algorithm (5) for every edge (i,j), compute s(i,j,t+n) and set  s(i,j)=0 t=t+n NC=NC+1 IF (NC<NC_max) empty all tabu lists and goto step 2 else print shortest tour

18 18 Ant-density and ant-quantity These two methods differ in the way the trail is updated. Each ant lays its trail at each step, without waiting for the end of the tour. In the ant-density model a quantity Q of trail is left on edge (i,j) every time an ant goes from i to j In the ant-quantity model an ant going from i to j leaves a quantity Q/d(i,j) of trail on edge (i,j) every time it goes from i to j

19 19 Routing in communication networks Routing is the control mechanism that directs every message in a communication network from its source node to its destination node through a sequence of intermediate nodes or switching stations. Each switching station has a routing table that tells messages where to go, given their destinations. Because of the highly dynamic nature of communication networks, due to the time-varying stochastic changes in user traffic patterns as well as to unpredictable failures of network components, portions of a network may become congested and new routes have to be discovered dynamically.

20 20 Routing in communication networks In AS, ant-like agents reinforce routing table entries depending on their experience and performance in the network. If an agent has been delayed a long time because it went through a highly congested portion of the network, it will weakly reinforce routing table entries that send messages to that portion of the network. An agent that enjoyed fluid traffic conditions will apply a stronger reinforcement. A dissipation or evaporation mechanism is also applied regularly to the routing table entries to refresh the system and prevent obsolete solutions from being maintained.

21 21 1-D optimization min z=f(x), x  [a,b] There are m+1 ants whose initial location are: x(i)=(b-a)*i/m, i=0,1,...,m Then these m ants begin to move.

22 22 How to move? For ant i, choose ant j randomly. If f(x(i))<f(x(j)), search locally. If f(x(i))>f(x(j)), ant i jumps to the region of ant j according the probability: P(i,j)=s(j) a (f(x(i))-f(x(j)) b /  s(j) a (f(x(i))-f(x(j)) b s(j)=p*s(j)+  s(j)

23 23 Current research situation SAANNGAAS theory ★△△? application ★△△? software △△? ─ complexity △? ──


Download ppt "The Ant System Optimization by a colony of cooperating agents."

Similar presentations


Ads by Google