Presentation is loading. Please wait.

Presentation is loading. Please wait.

Local Search and Stochastic Algorithms Solution tutorial 4.

Similar presentations


Presentation on theme: "Local Search and Stochastic Algorithms Solution tutorial 4."— Presentation transcript:

1 Local Search and Stochastic Algorithms Solution tutorial 4

2 Hill Climbing States: 4 queens in 4 columns (256 states) Local transformation (LT): move queen in column Objective function : Minimize (h(n): number of attacks) Initial state chosen randomly Best next state using LT Best next state using LT: Optimum

3 Beam Search & TSP 1.Start with K solutions chosen randomly (k tours) 2.Improve using one-step hill-climbing: for all k tours select the best next solution using 2-opt (2-swap) transformation. We obtain 2 k tours. 3.From all 2k tours, select the best k tours using the fitness function given by: f(t) = 1/Total_distance(t) 4.Repeat from 2 until reaching a local optimum.

4 Genetic Algorithm Generation 0 0 1 1 1 1 0 1 1 0 f() = 0 0 1 1 0 0 1 0 1 1 f() = 1 1 0 1 1 0 1 1 1 0 f() = 0 0 0 0 0 1 0 1 0 1 f() = 2 Generation 1Explanation 0 1 1 0 0 1 0 1 1fittest solution 0 0 0 0 1 0 1 0 1fittest solution 0 1 1 0 1 0 1 0 1child 1 0 0 1 0 0 1 0 1 1child 2 + mutation Generation 2 Explanation …


Download ppt "Local Search and Stochastic Algorithms Solution tutorial 4."

Similar presentations


Ads by Google