Bidirectional Search

advertisement
Bidirectional Search
CREATED BY: CALVIN WILLIAMS
What is bidirectional search?
 is a graph search algorithm that finds a shortest
path from an initial vertex to a goal vertex in
a directed graph. It runs two simultaneous searches:
one forward from the initial state, and one backward
from the goal, stopping when the two meet in the
middle.
Sudoku board
Sudoku Solving Heuristic
 In this Sudoku board example we choice our closest
number to the start state which is 3
H=[(Rz - (Fs ± 1)) * (Cz - (Fs ± 1)]
 Rz is the row tile being checked against the number
picked
 Cz is the column tile being checked against the
number picked.
 Fs ± 1 picks the number to check to be inserted into
the tile
Sudoku Solving Heuristic (Cont.)
 When H = 0, Number picked ± 1 restart (stays
between 1-9)
 Otherwise, Z ± 1 until all tiles are checked then place
number there. (Must stay between 0-8)
 Number Picked is between 1-9
Sudoku Example of Heuristic
Example explained
 Picking the 2 and the 4 first because of 3+1 and 3-1.
 Then from here you go through the row and columns
to see if this is a valid number to input. If not input
the first number that gets accepted Then move to the
next number that on the board from the initial
board.
 We realize after 6 checks that 4 can not be entered
there, so we accept the 2
Sudoku Solved
Problems with Bidirectional Search With Sudoku
 Bidirectional Search requires you to have the Goal
state and work backwards. In Sudoku, you’ll never
have the goal state to work with because that would
require the whole board to be finish already. Which
defeats the purpose and nullifies the applied
heuristic.
Solution?
 There is no true solution by use of Bidirectional
Search. The applied heuristic would work if we were
only going from the initial state.
Download