Presentation on theme: "CREATED BY: CALVIN WILLIAMS Bidirectional Search."— Presentation transcript:
CREATED BY: CALVIN WILLIAMS Bidirectional Search
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 Solving Heuristic In this Sudoku board example we choice our closest number to the start state which is 3 H=[(R z - (F s ± 1)) * (C z - (F s ± 1)] R z is the row tile being checked against the number picked C z is the column tile being checked against the number picked. F s ± 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
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
Problems with Bidirectional Search With Sudoku Bidirectional Search requires you to have the Goal state and work backwards. In Sudoku, youll 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.
Your consent to our cookies if you continue to use this website.