Experimental Programming of Genetic Algorithms for the “Casse-Tête” Problem

Experimental Programming of Genetic Algorithms for the “Casse-Tête” Problem

Sarab Almuhaideb, Shahad Hassan Alohaydib, Dana Aldossari, Ghaida Alfarraj, Shahad bin Musaibeeh, Atheer Saad Alrosayes, Afnan Abouelwafa
Copyright: © 2022 |Pages: 21
DOI: 10.4018/IJAMC.292513
Article PDF Download
Open access articles are freely available for download

Abstract

The Casse-tête board puzzle consists of an n×n grid covered with n^2 tokens. m<n^2 tokens are deleted from the grid so that each row and column of the grid contains an even number of remaining tokens. The size of the search space is exponential. This study used a genetic algorithm (GA) to design and implement solutions for the board puzzle. The chromosome representation is a matrix of binary permutations. Variants for two crossover operators and two mutation operators were presented. The study experimented with and compared four possible operator combinations. Additionally, it compared GA and simulated annealing (SA)-based solutions, finding a 100% success rate (SR) for both. However, the GA-based model was more effective in solving larger instances of the puzzle than the SA-based model. The GA-based model was found to be considerably more efficient than the SA-based model when measured by the number of fitness function evaluations (FEs). The Wilcoxon signed-rank test confirms a significant difference among FEs in the two models (p=0.038).
Article Preview
Top

Introduction

Puzzles are among the most popular ways in which to measure computers’ abilities to tackle problems that require intelligence. They have well-defined rules and a performance that can be objectively quantified via numeric scores or win-lose outcomes.

The present research is aimed at solving the Casse-tête problem (Talbi, 2009), which is a one-player board puzzle that consists of a two-dimensional grid with a size of covered with IJAMC.292513.m01 tokens (see Figure 1a). The idea of this puzzle is to delete IJAMC.292513.m02 tokens from the grid, with the number of remaining tokens being even in each row and column of the grid (see Figure 1b). The configuration in Figure 1(c) is considered an incorrect solution because there is an odd number of tokens in each of row 2, row 3, column 2, and column 4. The search space size of this problem is given by:

IJAMC.292513.m03
which is exponential in size. As far as the authors’ are concerned, this problem has not been approached in the previous literature.

Figure 1.

(a) Grid with IJAMC.292513.m04 covered by 16 tokens (b) Example of the correct solution of the problem (c) Example of an incorrect solution of the problem, where n=4 and m=6

IJAMC.292513.f01
Figure 2.

Example of matrix encoding for the board configuration in Figure 1(b)

IJAMC.292513.f02

A genetic algorithm (GA) (Holland, 1992) is a search and optimization metaheuristic inspired by the Darwinian principle of evolution through genetic selection and variation. A GA uses a decidedly abstract version of development operations to include solutions for a given problem (McCall, 2005). GAs have shown good performance in various NP-hard problems (Katoch et al., 2020), including puzzles that are similar in nature to Casse-tête, such as the IJAMC.292513.m05-queens and IJAMC.292513.m06-puzzle.

This study involved designing a GA to solve the Casse-tête problem. Despite the abundance of available crossover and mutation operators, no operators were found that were suitable for this problem. Thus, the work involved proposing two new crossover methods to fit the problem: binary partially mapped crossover (BPMX) and binary modified order crossover (BMOC). Moreover, two mutation methods (binary swap [BSwap] and binary inversion [BInversion]) were used to commensurate with the chromosome representation. The fitness evaluation acted as a cost function, penalizing the individual with each row/column with an odd number of tokens. Additionally, the study involved evaluating the proposed model against a simulated annealing (SA)-based solution to the problem.

This article is organized as follows. First, it introduces the background of the problem. Second, a review of similar board puzzles, such as the IJAMC.292513.m07-queens problem and the IJAMC.292513.m08-puzzle problem, is presented. Third, the methodology for solving the Casse-tête problem is defined based on the requirements and algorithm design. Fourth, the dataset and experimental methodology are explained. Fifth, the experimental results are reported and discussed before conclusions are drawn.

Complete Article List

Search this Journal:
Reset
Volume 15: 1 Issue (2024)
Volume 14: 1 Issue (2023)
Volume 13: 4 Issues (2022): 2 Released, 2 Forthcoming
Volume 12: 4 Issues (2021)
Volume 11: 4 Issues (2020)
Volume 10: 4 Issues (2019)
Volume 9: 4 Issues (2018)
Volume 8: 4 Issues (2017)
Volume 7: 4 Issues (2016)
Volume 6: 4 Issues (2015)
Volume 5: 4 Issues (2014)
Volume 4: 4 Issues (2013)
Volume 3: 4 Issues (2012)
Volume 2: 4 Issues (2011)
Volume 1: 4 Issues (2010)
View Complete Journal Contents Listing