OPTIMIZATION OF BACKTRACKING ALGORITHM WITH HEURISTIC STRATEGY FOR LOGIC-BASED SORTING PUZZLE GAME SOLVING - Nuranti, Eka Qadri; Intizhami, Naili Suri; Hasanah, Primadina (Informatika, Universitas Jenderal Soedirman, 2024)
Puzzle Game Sorting is a logic-based puzzle game where players must transfer colored balls into tubes until each tube contains only one color. Although it appears simple, the game becomes increasingly challenging at higher levels, testing players’ logical thinking and patience. This study proposes using the backtracking algorithm combined with optimization strategies, such as conflict heuristics and lookahead, to address players’ challenges at advanced levels. The test results indicate that the optimized backtracking algorithm can solve the game faster and with more efficient steps compared to manual methods. Specifically, heuristic optimization strategies significantly improved performance, reducing execution time by up to 91.4% and the number of steps by up to 76.9% at the most complex levels. These findings demonstrate that combining the backtracking algorithm and optimization strategies is an effective solution for solving puzzles in Sorting, particularly at levels with increasing complexity.