Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 5 Advanced Search. 2 Chapter 5 Contents l Constraint satisfaction problems l Heuristic repair l The eight queens problem l Combinatorial optimization.

Similar presentations


Presentation on theme: "1 Chapter 5 Advanced Search. 2 Chapter 5 Contents l Constraint satisfaction problems l Heuristic repair l The eight queens problem l Combinatorial optimization."— Presentation transcript:

1 1 Chapter 5 Advanced Search

2 2 Chapter 5 Contents l Constraint satisfaction problems l Heuristic repair l The eight queens problem l Combinatorial optimization problems l Local search l Exchanging heuristics l Iterated local search

3 3 Chapter 5 Contents, continued l Simulated annealing l Genetic algorithms l Real time A* l Iterative deepening A* l Parallel search l Bidirectional search l Nondeterministic search l Nonchronological backtracking

4 4 Constraint Satisfaction Problems l A constraint satisfaction problem is a combinatorial optimization problem with a set of constraints. l Can be solved using search. l With many variables it is essential to use heuristics.

5 5 Heuristic Repair l A heuristic method for solving constraint satisfaction problems. l Generate a possible solution, and then make small changes to bring it closer to satisfying constraints.

6 6 The Eight Queens Problem l A constraint satisfaction problem: nPlace eight queens on a chess board so that no two queens are on the same row, column or diagonal. l Can be solved by search, but the search tree is large. l Heuristic repair is very efficient at solving this problem.

7 7 Heuristic Repair for The Eight Queens Problem l Initial state – one queen is conflicting with another. l We’ll now move that queen to the square with the fewest conflicts.

8 8 Heuristic Repair for The Eight Queens Problem l Second state – now the queen on the f column is conflicting, so we’ll move it to the square with fewest conflicts.

9 9 Heuristic Repair for The Eight Queens Problem l Final state – a solution!

10 10 Most-Constrained Variables l Assign values to variables that have the fewest choices. nIn 8 queens some rows have more choices than others, assign queens to the rows with fewest choices first.

11 11 Local Search l Like heuristic repair, local search methods start from a random state, and make small changes until a goal state is achieved. l Local search methods are known as metaheuristics. l Most local search methods are susceptible to local maxima, like hill-climbing.

12 12 Exchanging Heuristics l A simple local search method. l Heuristic repair is an example of an exchanging heuristic. l Involves swapping two or more variables at each step until a solution is found. l A k-exchange involves swapping the values of k variables. l Can be used to solve the traveling salesman problem.

13 13 Iterated Local Search l A local search is applied repeatedly from different starting states. l Attempts to avoid finding local maxima. l Useful in cases where the search space is extremely large, and exhaustive search will not be possible.

14 14 Tabu Search l Retains a list of visited states l Only visit paths not previously visited l “A bad strategic choice can yield more information than a good random choice.” – www.tabusearch.net

15 15 Simulated Annealing l A method based on the way in which metal is heated and then cooled very slowly in order to make it extremely strong. l Based on metropolis Monte Carlo Simulation. l Aims at obtaining a minimum value for some function of a large number of variables. nThis value is known as the energy of the system.

16 16 Simulated Annealing (2) l A random start state is selected l A small random change is made. nIf this change lowers the system energy, it is accepted. nIf it increases the energy, it may be accepted, depending on a probability called the Boltzmann acceptance criteria: –e (-dE/T)

17 17 Simulated Annealing (3) –e (-dE/T) l T is the temperature of the system, and dE is the change in energy. l When the process starts, T is high, meaning increases in energy are relatively likely to happen. l Over successive iterations, T lowers and increases in energy become less likely.

18 18 Simulated Annealing (4) l Because the energy of the system is allowed to increase, simulated annealing is able to escape from global minima. l Simulated annealing is a widely used local search method for solving problems with very large numbers of variables. l For example: scheduling problems, traveling salesman, placing VLSI (chip) components.

19 19 Simulated Annealing (5) l T = 10 l dE = 2 l -e -dE/T =-0.666 l T = 5 l dE = 4 l -e -dE/T =-0.449 this is considered a better position (state) than before.

20 20 Genetic Algorithms l A method based on biological evolution. l Create chromosomes which represent possible solutions to a problem. l The best chromosomes in each generation are bred with each other to produce a new generation. l Much more detail on this later.

21 21 Parallel Search l Some search methods can be easily split into tasks which can be solved in parallel. l Important concepts to consider are: nTask distribution nLoad balancing nTree ordering

22 22 Parallel Search 2 l Allow each of 2 processors to pursue subtrees of the root. l Allow each additional processor to pursue one of the children branches.

23 23 Bidirectional Search l Also known as wave search. l Useful when the start and goal are both known. l Starts two parallel searches – one from the root node and the other from the goal node. l Paths are expanded in a breadth-first fashion from both points. l Where the paths first meet, a complete and optimal path has been formed.

24 24 Nondeterministic Search l Useful when very little is known about the search space. l Combines the depth first and breadth first approaches randomly. l Avoids the problems of both, but does not necessarily have the advantages of either. l New paths are added to the queue in random positions, meaning the method will follow a random route through the tree until a solution is found.

25 25 Nonchronological backtracking l Depth first search uses chronological backtracking. nDoes not use any additional information to make the backtracking more efficient. l Nonchronological backtracking involves going back to forks in the tree that are more likely to offer a successful solution, rather than simply going back to the next unexplored path.


Download ppt "1 Chapter 5 Advanced Search. 2 Chapter 5 Contents l Constraint satisfaction problems l Heuristic repair l The eight queens problem l Combinatorial optimization."

Similar presentations


Ads by Google