8 Puzzle Problem-Different Search Algorithms
Solving the 8-puzzle problem with DFS (depth-first-search) -BFS (breadth-first-search) -IDS (Itterative-deepening-search) -UCS (uniform-cost-search) -A* (GitHub)
Problem Components:
- States: Configuration of tiles in a 3×3 numpy array.
- Operators (Actions): Moving the blank tile up, down, left, or right.
- Goal Test: Verify if the puzzle is solved.
- Path Cost: Count of actions taken to reach the goal state.
- Transition Model: Describes state changes after an action.
Heuristic Function:
- Best heuristic: Manhattan distance with zero distance tiles removed.
- Admissibility and consistency explained.
Algorithm Comparison:
- A* Algorithm: Optimal solution finder using heuristic and path cost.
- Uniform Cost Search (UCS): Slow and memory-intensive.
- Iterative Deepening Search (IDS): Slower with lower memory usage.
- Breadth-First Search (BFS): Slightly slower with higher memory usage.
A* Performance:
- Outperforms other algorithms in time and memory efficiency.
- Uses heuristic and path cost for node priority.
- Prunes search tree effectively and finds optimal solution.
Other Algorithms:
- UCS lacks heuristic guidance, leading to slower search.
- IDS and BFS also lack heuristic guidance, resulting in even slower search and higher memory usage.