Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti 20.10.2014.

Similar presentations


Presentation on theme: "Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti 20.10.2014."— Presentation transcript:

1 Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti 20.10.2014

2 Local search Stochastic variations of local search Genetic algorithms Swarm Intelligence Optimization techniques

3 Here decision tree picture!!! Optimization techniques in context

4 Local search

5 Select one and move Main principle of local search

6 Structure of local search

7 Representation of solution Neighborhood function Search strategy Components of local search

8 Study neighbor solutions Movement in neighborhood

9 Accept only better solutions Hill climbing

10 Local and global maxima

11 Combining local search and hill-climbing

12 Represent solution as bit string (x 1 x 2,…x n ), where x i  {0,1}. Problem instance: w i = (2,3,5,7,11), S=15. Solution with elements 2,3 and 7 is represented as 11010. Local search for knapsack

13 Single bit change: 0  1 or 1  0 S=15 W=[2, 3, 5, 7, 11] Move in knapsack

14 Two operations: 0  1 or 1  0 Swap bit location Extended neighborhood S=15 W=[2, 3, 5, 7, 11] 10011

15 Getting stuck into local maximum S=15 W=[2, 3, 5, 7, 11]

16 Prevents search to return previously visited solutions Select the next best Tabu! S=15 W=[2, 3, 5, 7, 11] Tabu search

17 Tabu search (2 nd iteration) S=15 W=[2, 3, 5, 7, 11]

18 Traveling salesman problem...  p i-1  p i  p i+1 ......  p i-1  p i+1  p i ......  p i  p i-1  p i+1 ......  p i  p i+1  p i-1 ......  p i+1  p i  p i-1 ......  p i+1  p i-1  p i ... Permute local changes in given route

19 Local search algorithm for TSP

20 TSP example E  F  G  H  A4 +  + 2 +  = 2  + 6 E  F  H  G  A4 + 3 + 2 + 2= 11 min! E  G  F  H  A  +  + 3 +  = 3  + 3 E  G  H  F  A  + 2 + 3 +  = 2  + 5 E  H  G  F  A3 + 2 +  +  = 2  + 5 E  H  F  G  A3 + 3 +  + 2= 1  + 6

21 Genetic algorithm

22 Genetic algorithm (GA) Needs more material!

23 Generate a set of initial solutions. REPEAT Generate new solutions by crossover. Mutate the new solutions (optional). Evaluate the candidate solutions. Retain best candidates and delete the rest. UNTIL stopping criterion met. Main structure of GA

24 Permuting pairs for crossover Elitist approach using zigzag scanning among the best solutions

25 Optimizing chess playing Revise

26 Tic-tac-toe example

27 Evaluation function for tic-tac-toe

28 Minmax example Redraw

29 Minmax playing: Min’s move

30 Minimax maximizes the worst-case outcome for max Minmax playing: Max’s move

31 Chess Game tree

32 Beyond the horizon

33 Evaluating Chess position

34 Positional factors

35 Initial value range

36 Result of optimization

37 Swarm intelligence

38 Social intelligence: individual behavior maybe naive but joint effect can be intelligent. Decentralized: no central control of the individuals of the colony Self-organized: individual adapts to environment and other members of colony Robust: Task is completed even if some individuals fail Swarm intelligence (SI)

39 Ant colony optimization (ACO) Main principle: Emitting pheromone between nest and food Joint efforts to carry loads Solving TSP by ants: Sending ants to make randomized tours Short links chosen more often than long ones Good tracks are marked by pheromone Tracks with high pheromone chosen more often

40 Ant colony optimization Initialization: Generate randomized tours. Smaller links chosen more often than longer ones Simulate pheromone: Subtract cost of the links in best solution (-1) Increase the ones in the worst solution (+1) Tours are evaluated using the original graph.

41 Ant colony optimization (1 st round)

42 Ant colony optimization (2 nd round)

43


Download ppt "Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti 20.10.2014."

Similar presentations


Ads by Google