8-Puzzle Analysis with Step-by-Step Solutions
Understanding h₁ and h₂ heuristics systematicallyWe analyze the 8-puzzle (3×3 sliding tile puzzle). The goal is to slide numbered tiles to match the target configuration:
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | _ |
By completing this exercise, you will be able to:
Core concepts of admissible heuristics
Think of admissibility as "never lying about how easy the problem is":
Misplaced tiles heuristic
Think of h₁ as counting "How many tiles are in the wrong room?"
Manhattan distance heuristic
Think of Manhattan distance as "city blocks you need to walk":
Calculate and compare h₁ and h₂ for a specific state
| 2 | 8 | 3 |
| 1 | 6 | 4 |
| 7 | _ | 5 |
Counts tiles in wrong positions
Sum of distances to correct positions
Here's how to approach ANY heuristic calculation systematically:
Understanding heuristic efficiency and informativeness
Think of heuristics as "GPS directions with different levels of detail":
Essential concepts and practical implications