Download presentation
Presentation is loading. Please wait.
Published byAudra Allen Modified over 9 years ago
1
D Goforth - COSC 4117, fall 20061 Note to 4 th year students students interested in doing masters degree and those who intend to apply for OGS/NSERC scholarships should complete the required forms and apply before October 19. The forms can be obtained through the research office website.
2
Optimization Problems searching a space when paths don’t matter
3
D Goforth - COSC 4117, fall 20063 Local search algorithms If paths don’t matter, algorithms are able to ‘jump’ from state to state (ie not follow edges) Example the n queens problem: place n chess queens, n>3, on an n x n chess board so no queen threatens another according to chess rules
4
D Goforth - COSC 4117, fall 20064 Optimisation problems find maximum value of a function over a parameter state space e.g., one-dimensional = max f(x) over x x f(x)
5
D Goforth - COSC 4117, fall 20065 Optimisation problems e.g., 2-dimensional = max f(x,y) over x,y x f(x,y) y
6
D Goforth - COSC 4117, fall 20066 Algorithms hill-climbing (~greedy best-first dfs) weaknesses local optima ridges plateaux variations on hill-climbing to avoid the traps
7
D Goforth - COSC 4117, fall 20067 Hill climbing
8
D Goforth - COSC 4117, fall 20068 Getting outside the local area variations on hill-climbing choosing a successor that may not be the optimal (escape by path) random restart (escape by jump) simulated annealing
9
D Goforth - COSC 4117, fall 20069 Getting outside the local area choosing a successor that may not be the optimal (escape by path)
10
D Goforth - COSC 4117, fall 200610 Getting outside the local area random restart
11
D Goforth - COSC 4117, fall 200611 Getting outside the local area simulated annealing random move is generated, probability of moving is based on change in value x f(x)
12
D Goforth - COSC 4117, fall 200612 Simulated annealing Probability of move function Probability of making bad move decreases with time +- probability of moving
13
D Goforth - COSC 4117, fall 200613 Avoiding paths altogether genetic algorithms 1.pick set of states randomly 2.order states by fitness 3.create new set of states by combining state variables of most fit 4.make a few random changes to state variables 5.go to 2
14
D Goforth - COSC 4117, fall 200614 Genetic algorithm example Guessing a 32 bit sequence fitness function – number of matching bits (hill-climbing would be better!)
15
D Goforth - COSC 4117, fall 200615 Genetic algorithm example population size: 4 first generation randomfitness 1.0110 1010 1011 0110 0110 1010 1010 111014 2.1100 1101 0110 0101 1101 0010 0000 101015 3.1101 0110 1011 1010 1001 1010 1010 111019 4.0010 1101 1000 0111 0010 0110 1001 100113 order: 3,2,1,4 cross 3 x 2 and 3 x 1 for next generation
16
D Goforth - COSC 4117, fall 200616 Genetic algorithm example crossing 3 x 2 pick random cut point: after 9 th 1100 1101 0|110 0101 1101 0010 0000 1010 1101 0110 1|011 1010 1001 1010 1010 1110 recombine crossed pieces 1100 1101 0|011 1010 1001 1010 1010 111021 1101 0110 1|110 0101 1101 0010 0000 101013 crossing 3 x 1 (cut after 21) 1101 0110 1011 1010 1001 1|010 1010 111018 0110 1010 1011 0110 0110 1|010 1010 111015 (4 potential new sequences)
17
D Goforth - COSC 4117, fall 200617 Genetic algorithm example next generation 1.1100 1101 0110 0101 1101 0010 0000 101015 2.1101 0110 1011 1010 1001 1010 1010 111019 3.1100 1101 0011 1010 1001 1010 1010 111021 4.1101 0110 1011 1010 1001 1010 1010 111018 (2 best new combinations replace 2 worst from original population) repeat
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.