Solver of 8-Puzzle with Genetic Algorithm

8 puzzle problem genetic algorithm N puzzle problem

Authors

  • Cheng Min Yang School of computing Asia Pacific University of Technology and Innovation (APU) Kuala Lumpur, Malaysia
  • Vincent Pek School of computing Asia Pacific University of Technology and Innovation (APU) Kuala Lumpur, Malaysia
  • Sim Hui Ling School of computing Asia Pacific University of Technology and Innovation (APU) Kuala Lumpur, Malaysia
  • Tan Choon Wei School of computing Asia Pacific University of Technology and Innovation (APU) Kuala Lumpur, Malaysia
  • Zailan Arabee Abdul Salam
    zailan@apu.edu.my
    School of computing Asia Pacific University of Technology and Innovation (APU) Kuala Lumpur, Malaysia
Vol. 7 No. 1 (2023)
Original Research
January 14, 2026

Downloads

Genetic algorithm is a search heuristic that takes Charles Darwin's theory of natural evolution as its source of inspiration that can be used in solving 8 puzzle problems. One of the earliest known problems in mathematics is the "N puzzle problem." In this paper, we will look at how to solve 8 puzzle problems by using genetic algorithm. The parameters will be changed to see the different result and time used. The three parameters that will be modified are the crossover rate, mutation chance, and population len. The results showed that the problem will be solved faster when the crossover rate and mutation chance are higher, but when the population size becomes more, the time taken to solve the problem will be longer.