44 views

Uploaded by manicheese

HEURISTIC SEARCH

save

- Weak Slot & Filler Structure Chap 9
- Strong Slot & Filler Structure cha 10
- Dendral Expert System
- Expert-Systems AI Pres
- Chapter15_NaturalLanguage
- heuristic Search
- Natural+Language+Understanding
- AI_chapter1
- Game Playing
- Artificial Intelligence Units 3 and 4
- Chapter 1(Rich & Knight)
- Statistical Reasoning cha 8
- Rich & Knight(Chapter 2)
- Ai Units 1 and 2
- Game Playing
- Artificial Intelligence by Rich and Knight
- 2286-3253-1-PB
- CP0592_12-Jan-2012_RM01
- Optimization of Landmark preprocessing with Multicore Systems
- Annexure a - Exploratory Testing Dynamics
- Ch. 9 Decison Making and Creativity to Post
- 04104874
- PID990429-1
- Section 1 Solutions DX78KScp5TDsI4SWCPIZKlERZxJDL9
- AI
- Search Based Software engineering
- gcse-10
- Agent Based Sim Paper
- Solution Manual to Third Edition AI
- Genetic
- oelsner1975
- Dieta.docx
- 1
- Perini 2001.pdf
- 2017-Focused-Updates_Highlights_ESXM.pdf
- Insecticidas orgánicos
- 2.pdf
- Pop Acidente de Trabalho Iabas
- This
- Sgl 8.2.1.1 Penilaian, Pemgendalian, Penyediaan Dan Penggunaan Obat
- (1)Deskripsi Dan Menyajian Akutansi Kedalam Informasi
- Disminución de La AV (ambliopía)
- Estructura de costos
- VIDA VERDADERA TOMO 01 Estructurado Por Alejandro Martínez
- electricidad
- Tercer Grado u1 s9 Converted
- 1kmk_2_01_03_96.ru.en (1)
- tm book.txt
- Cara Menghilangkan Wasir Secara Tradisional
- 012.萨克斯演奏 越过彩虹 欧美流行 简易级p...
- kipi.pdf
- Reforma Învățământului
- Condensad
- 01 Sargetia Acta Musei Devensis I 1937
- Manual Book Pendaftaran SSCN 2018.pdf
- Cardenas Mora.pdf
- Año Del Dialogo y La Reconciliacion Nacional
- img066
- T4_COMU2_WA.docx
- Silabus Bhs.indo_smp Kelas Viii-gasal
- linux-intro2
- linux-Shell n Commands
- L5 - MatrixMultiplication
- protect your pc- 1
- 6775979-Enose
- linux-Intro
- 1 - Introduction to OpenCL
- protect pc 3
- Learn Visual c++
- VirtualizationAndCloud
- linux-File Permissions
- compiler design-code optimization
- linux-Text Editor
- rts
- linux-File System
- FOPL
- dbms

You are on page 1of 25

)

KR Chowdhary, Professor & Head

Email: kr.chowdhary@ieee.org

Department of Computer Science and Engineering MBM Engineering College, Jodhpur

May 14, 2011

kr chowdhary

heuristic search

1/ 25

Heuristic deﬁnition

Heuristic, adj. 1. Serving to promote discovery or learning; – used especially of theories or paradigms which stimulate new ideas for discovering facts in experimental sciences. 2. Pertaining to or based on trial-and-error and experimental methods of learning and evaluation. 3. (Computers) Based on the use of an eﬃcient trial-and error method to search a space of possible solutions to a problem, or to ﬁnd an acceptable approximate solution, when an exact algorithmic method is unavailable or too time-consuming. Heuristic, n. A theory or approach which serves to promote discovery or learning by encouraging experimentation.

kr chowdhary

heuristic search

2/ 25

Heuristic techniques can be eﬀective if applied correctly on the right kinds of tasks.Heuristic Search Techniques Direct techniques (blind search) are not always possible (they require too much time or memory). Typically require domain speciﬁc information. Figure: Initial and ﬁnal states of 8-puzzle game kr chowdhary heuristic search 3/ 25 .

What heurisitic(s) can we use to decide which 8-puzzle move is “best”(worth considering ﬁrst). kr chowdhary heuristic search 4/ 25 . Figure: Heuristic search.a heuristic.Heuristic search techniques make use of domain speciﬁc information . .Blind search techniques used an arbitrary ordering (no priority) of operations. .Heuristic Search Techniques 8 Puzzle Heuristics: .

. For now . Later . which when applied on a state as argument.we will worry about the actual values returned by the heuristic function.8-puzzle Heuristic Heuristic techniques use a heuristic function. . . Number of tiles in the correct position. kr chowdhary heuristic search 5/ 25 .Easy to compute (fast and takes little memory).The higher the number the better. return a value indicting how close this state is to the goal.Probably the simplest possible heuristic.we just want to establish some ordering to the possible moves (the values of our heuristic does not matter as long as it ranks the moves).

.Is this heuristic more than a heuristic (is it always correct?).Given any two states. does it always order them properly with respect to the minimum number of moves away from a solution? kr chowdhary heuristic search 6/ 25 . .The “best”move is the one with the lowest number returned by the heuristic.8-puzzle Heuristic: another approach Number of tiles in the incorrect position. .This can also be considered a lower bound on the number of moves from a solution! .

Sum up this count over all the tiles.8-puzzle Heuristic: another approach Count how far away (how many tile movements) each tile is from it’s correct position. Figure: Heuristic search. This is another estimate on the number of moves away from a solution. kr chowdhary heuristic search 7/ 25 .

kr chowdhary heuristic search 8/ 25 .do while goal not accomplished .the quality (accuracy) of the heuristic is important in real-life application of the technique! Generate-and-test: Very simple strategy .just keep guessing. In all cases .test solution to see if it is a goal Heuristics may be used to determine the speciﬁc rules for solution generation. .Heuristic search techniques There are a variety of search techniques that rely on the estimate provided by a function.generate a possible solution .

Want to know the shortest route that visits all the cities once. n=80 will take millions of years to solve exhaustively! Figure: TSP kr chowdhary heuristic search 9/ 25 .Traveling Salesman Problem (TSP) Traveler needs to visit n cities.Heuristic search techniques Example . Know the distance between each pair of cities.

TSP Figure: TSP kr chowdhary heuristic search 10/ 25 .

. kr chowdhary heuristic search 11/ 25 .generation of next state depends on feedback from the test procedure. . Simple Hill Climbing: .Use heuristic to move only to states that are better than the current state.TSP Hill Climbing: Variation on generate-and-test: .Test now includes a heuristic function that provides a guess as to how good each possible state is.The process ends when all operators have been applied and none of the resulting states are better than the current state.Always move to better state when possible. .There are a number of ways to use the information returned by the test procedure. .

The order of application of operators can make a big diﬀerence.Hill climbing Potential Problems with Simple Hill Climbing: . kr chowdhary heuristic search 12/ 25 .TSP . . . Figure: Hill Climbing Simple Hill Climbing Example: .Cannot see past a single move in the state space. .Will terminate when at local optimum.Heuristic function is the length of a tour.Operators exchange the position of adjacent cities within the current tour. .deﬁne state space as the set of all possible tours.

Hill climbing Hill climbing: Figure: Hill Climbing kr chowdhary heuristic search 13/ 25 .

A variation on simple hill climbing. .Not just climbing to a better state. . move to the best possible state that is one move away. .Hill climbing Steepest-Ascent Hill Climbing . climbing up the steepest slope.Instead of moving to the ﬁrst state that is better. kr chowdhary heuristic search 14/ 25 .The order of operators does not matter.

Hill Climbing Termination . Heuristic Dependence .Ridge .Local Optimum: all neighboring states are worse or the same. .Plateau . or can use other means to arrive at a value for a state. . . kr chowdhary heuristic search 15/ 25 . .local optimum that is caused by inability to apply 2 operators at once.The heuristic can look ahead many states.The heuristic used by a hill climbing algorithm does not need to be a static function of a single state.all neighboring states are the same as the current state.Hill climbing is based on the value assigned to states by the heuristic function.

2. do not need to generate all competing paths. kr chowdhary heuristic search 16/ 25 . Best First Search: explore the most promising path seen so far. .DFS: follows a single path. While goal not reached: 1.BFS: does not get caught in loops or dead-end-paths. Similar to steepest-ascent. . Generate all potential successor states and add to a list of states. but do not throw away states that are not chosen.Best-First Search Combines the advantages of Breadth-First and Depth-First searches. Pick the best state in the list and go to it.

else { generate children of X. for each child of X do case { the child is not on open or closed: { assign the child a heuristic value. call it X. } the child is already on open: { if this child was reached by a shorter path then give the state on open the shorter path } kr chowdhary heuristic search 17/ 25 . % Initialize closed := [].Best-First Search procedure best_first_search { open := [Start]. while open != [] do { % While states remai remove the leftmost state from open. add the child to open. if X = goal then return path from Start to X.

re-order states on open by heuristic merit (best leftmost) } % else } % while return failure % open is empty } % best_first kr chowdhary heuristic search 18/ 25 . add this child to open.Best-First Search the child is already on closed: { if this child was reached by a shorter path { then remove the state from closed. } } } % cases put X on closed.

start out allowing large downhill moves (to much worse states) and gradually allow only small downhill moves.Simulated Annealing Based on physical process of annealing a metal to get the best (minimal energy) state.allow some moves downhill (to worse states) . The search initially jumps around a lot. exploring many regions of the state space. Hill climbing with a twist: . Figure: Simulated Anealing kr chowdhary heuristic search 19/ 25 . The jumping is gradually reduced and the search becomes a simple hill climb (search for local optimum).

A* Algorithm (a sure test topic) The A* algorithm uses a modiﬁed evaluation function and a Best-First search. h′ (x) is the estimated cost to get from state x to the goal state (the heuristic). kr chowdhary heuristic search 20/ 25 .The evaluation function f is an estimate of the value of a node x given by: f (x) = g (x) + h′ (x) g (x) is the cost to get from the start state to state x. Under the right conditions A* provides the cheapest cost solution in the optimal time! A* evaluation function . A* minimizes the total path cost.

but is useful for Best-First Search. Modiﬁed State Evaluation: Value of each state is a combination of: ..A* Algorithm (a sure test topic) contd. This does not make sense for DFS or BFS. The idea is to use the path to a state to determine (partially) the rank of the state when compared to other states.estimated cost of reaching a goal from the state.the cost of the path to the state . kr chowdhary heuristic search 21/ 25 .

A* Algorithm 1. . .Best First Search with the modiﬁed evaluation function.A* Algorithm The general idea is: . kr chowdhary heuristic search 22/ 25 . If x is not goal state: generate all possible children of x (and save path information with each node). While queue not empty and goal not found: get best state x from the queue.loops are avoided . .h’(x) is an estimate of the number of steps from state x to a goal state.Information about the path to the goal state is retained. Create a priority queue of search nodes (initially the start state). Apply f to each new node and add to queue. Remove duplicates from queue (using f to pick the best). Priority is determined by the function f 2.we do not expand the same state twice.

Maze kr chowdhary heuristic search 23/ 25 .A* Algorithm Figure: Example .

A* Algorithm Figure: Example .Maze kr chowdhary heuristic search 24/ 25 .

A* can use lot of memory. . A* will run put of memory. where n is total count of states.For really big search spaces. demerits: .Merits and demerits of Astar merits: .A* is guaranteed to terminate. kr chowdhary heuristic search 25/ 25 . in principle O(n).

- Weak Slot & Filler Structure Chap 9Uploaded byNitesh Mishr
- Strong Slot & Filler Structure cha 10Uploaded byNitesh Mishr
- Dendral Expert SystemUploaded byJunaid khan
- Expert-Systems AI PresUploaded byuzaifa
- Chapter15_NaturalLanguageUploaded byUddalak Banerjee
- heuristic SearchUploaded byNishant Raj
- Natural+Language+UnderstandingUploaded byankurgarg123
- AI_chapter1Uploaded byUddalak Banerjee
- Game PlayingUploaded byagoyal5145
- Artificial Intelligence Units 3 and 4Uploaded byraqmail1475
- Chapter 1(Rich & Knight)Uploaded byAnkur Agrawal
- Statistical Reasoning cha 8Uploaded byNitesh Mishr
- Rich & Knight(Chapter 2)Uploaded byAnkur Agrawal
- Ai Units 1 and 2Uploaded byraqmail1475
- Game PlayingUploaded byShariq Parwez
- Artificial Intelligence by Rich and KnightUploaded byravi_00013
- 2286-3253-1-PBUploaded byGustavo Palacios
- CP0592_12-Jan-2012_RM01Uploaded byAyush Jain
- Optimization of Landmark preprocessing with Multicore SystemsUploaded byJournal of Computing
- Annexure a - Exploratory Testing DynamicsUploaded byWaqas Murtaza
- Ch. 9 Decison Making and Creativity to PostUploaded byvanovn
- 04104874Uploaded byemperorc
- PID990429-1Uploaded byMakrem Mrabet
- Section 1 Solutions DX78KScp5TDsI4SWCPIZKlERZxJDL9Uploaded byVictor Menoscal
- AIUploaded byrethic
- Search Based Software engineeringUploaded byJake Azzopardi
- gcse-10Uploaded byPrashantBhattacharji
- Agent Based Sim PaperUploaded bybuha_buha
- Solution Manual to Third Edition AIUploaded byPuneet Mehta
- GeneticUploaded byMd Kashfuddoja

- linux-intro2Uploaded bymanicheese
- linux-Shell n CommandsUploaded bymanicheese
- L5 - MatrixMultiplicationUploaded bymanicheese
- protect your pc- 1Uploaded bymanicheese
- 6775979-EnoseUploaded bymanicheese
- linux-IntroUploaded bymanicheese
- 1 - Introduction to OpenCLUploaded bymanicheese
- protect pc 3Uploaded bymanicheese
- Learn Visual c++Uploaded bymanicheese
- VirtualizationAndCloudUploaded bymanicheese
- linux-File PermissionsUploaded bymanicheese
- compiler design-code optimizationUploaded bymanicheese
- linux-Text EditorUploaded bymanicheese
- rtsUploaded bymanicheese
- linux-File SystemUploaded bymanicheese
- FOPLUploaded bymanicheese
- dbmsUploaded bymanicheese