Abstract
Abstract Background The 8-puzzle problem is a well-known combinatorial search problem, often used to test the effectiveness of various artificial intelligence (AI) algorithms. This study aims to evaluate the performance of three AI-based search algorithms—Breadth-First Search (BFS), Depth-First Search (DFS), and A* Search—in solving the 8-puzzle problem. The algorithms were implemented in Java, and their performance was measured in terms of solution length, the number of expanded nodes, and execution time. Results Experiments were conducted on eight randomly generated instances of the 8-puzzle problem. The findings reveal that both BFS and A* Search consistently identify optimal solutions in all cases. However, BFS was found to use more memory and operate slower than A* Search. Conversely, DFS demonstrated faster execution times and lower memory usage compared to BFS but was less reliable in finding optimal or feasible solutions. The study also explored the impact of different heuristic functions on the performance of A* Search. Among the heuristics tested, the Manhattan distance heuristic was determined to be the most effective, offering the best balance between accuracy and efficiency. Conclusions In conclusion, both BFS and A* Search are effective in finding optimal solutions, with A* Search being more efficient in terms of speed and memory usage. DFS, while faster and more memory-efficient, is less consistent in producing optimal solutions. The Manhattan distance heuristic significantly enhances the performance of A* Search, making it the preferred heuristic for the 8-puzzle problem. These results suggest that A* Search, particularly with the Manhattan distance heuristic, is a highly efficient choice for solving the 8-puzzle problem, especially in contexts where computational resources are limited.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.