{'fraction_non_alphanumeric': 0.016638935108153077, 'fraction_numerical': 0.018302828618968387, 'mean_word_length': 4.595348837209302, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Implementation of the Firefly Algorithm in the Case of N-Queens Problem

N-Queen problem is a form of puzzle game that uses chess rules for the queen on the standard chessboard with modified size. The challenge of the n-queen problem is finding the N ( N is positive integer) queens position on the chessboard, so that no queen can attack another queen on the board in a single move. Implementation of firefly algorithm in n-queens problem in this study aims to find n-queen problem solutions and count the number of iterations to achieve the optimal solution of each queen which will then be compared with the results of Sarkar and Nag's research (2017). This study uses an experimental method with a number of N between 10 to 20 and uses a population of 15 and 1000 firefly. The results showed that the firefly algorithm is able to find all the optimal solutions for the queen's position on a chessboard with dimensions 10 to 20 in a population of 1000 firefly. The firefly algorithm can find the optimal solution fewer iterations compared to the genetic algorithm. According to the experiment, firefly algorithm shows better performance in finding the optimal solution compared to genetic algorithm.