ArticlePDF Available

Survey on N-Queen Problem with Genetic Algorithm

Authors:

Abstract and Figures

The combinatorial optimization problem is a collection of problems which need a sample amount of time and effort to be solved. Vast difficulties have been occurring to solving these types of problem that there is no exact formula to solve the problem. Each feasible solution works on some order and the size of the probability increases algorithmically as the number of the problem also increases dynamically. This paper discusses about N-Queen problem, it is also a type of NP-hard problem. Many researchers have proposed various methods and algorithms for this problem. Henceforth, Genetic Algorithm is one kind of famous algorithm for solving NP hard problems. This paper mainly focuses on the review work of genetic algorithm to solve the N-Queen Problems (NPQ).
Content may be subject to copyright.
© 2018, IJCSE All Rights Reserved 54
International Journal of Computer Sciences and Engineering Open Access
Survey Paper Volume-6, Special Issue-2, March 2018 E-ISSN: 2347-2693
Survey on N-Queen Problem with Genetic Algorithm
S.Sathyapriya1*, R.Stephen2, V.S.Joe Irudayaraj3
1*Dept.ComputerScience,St. Joseph’s College, Bharathidasanuniversity,Trichy,India.
2Dept.ComputerScience,St. Joseph’s College, Bharathidasanuniversity,Trichy,India.
3Dept.ComputerScience,St. Joseph’s College, Bharathidasanuniversity,Trichy,India.
*Corresponding Author: sathyapriya2822@gmail.com, ph.: 7373631298
Available online at: www.ijcseonline.org
Abstract The combinatorial optimization problem is a collection of problems which need a sample amount of time and effort
to be solved. Vast difficulties have been occurring to solving these types of problem that there is no exact formula to solve the
problem. Each feasible solution works on some order and the size of the probability increases algorithmically as the number of
the problem also increases dynamically. This paper discusses about NQueen problem, it is also a type of NP hard problem.
Many researchers have proposed various methods and algorithms for this problem. Henceforth, Genetic Algorithm is one kind
of famous algorithm for solving NP hard problems. This paper mainly focuses on the review work of genetic algorithm to solve
the N -Queen Problems (NPQ).
KeywordsNQueen Problem, NP-hard problem, Genetic algorithm, Heuristic algorithm.
I. INTRODUCTION
Most of the researchers and scientists, proposed different
types of heuristic algorithm for the best optimistic solution to
solve a problem by using a certain model from particular
problem, that process may be physically or biological in
nature which is frequently performed. Heuristic algorithm
differs from the classic algorithms. It performs in various
way and pursuit onward with the capacity. Further classic
algorithms are difficult for optimization problem it also
increases in finite number of times with respect to its scale of
the problem. Heuristic algorithms [1] used to find the exact
solution in a proper time. Heuristic algorithm finds quickly
the solution for a problem than the classic algorithm.NP-hard
problem (non-deterministic Polynomial time problem) [2],
that is the problem have non-deterministic solutions, these
solutions run at a polynomial time. Since due to its large
complexity (Eg: O(N!)).They cannot be able to solve within
a particular amount of times using deterministic approach.
The above-mentioned problem, works with an acceptable
number of times, which uses heuristic approach necessarily
queen is one of the non-deterministic time polynomial
problems.
A. N-Queen Problem
The N queen problem [3] is one of the challenging concepts
in computer science, the principle of the n-queen problem as
follows: N is the number of queens that is placed on the n*n
chessboard. The queens cannot be interacting with each
other. Each queen has a unique path to travel. All possible
solutions can be found for each level. Most of these solutions
are based on a particular prescription to allocate queens on a
chessboard, the factual conclusion of petite-size problems
displayed. The amount of solutions incremented
algorithmically number of queens also increases. As a matter
of choice search-based algorithm (SBA) [4] evolved. For
example, BT search (Backtracking)[5] systematically provide
all feasible solution set to a disposed in n*n chessboard. In
BT approach generates a limited class in the huge size
chessboard. Because it is crucial as BT search for asset
solutions, these solutions are significantly differed in the
results spaces. Many journalists have developed alternative
powerful search technique to run over this problem. These
techniques consisting searched heuristic method and
divisional search and collision method are identical.
Conclusively, the problem has been told in the process of
integer programming corresponding to the assignment
program. The below figure [6] explains about one of the
example for 8*8 queen problem.
International Journal of Computer Sciences and Engineering Vol.6(2), Mar 2018, E-ISSN: 2347-2693
© 2018, IJCSE All Rights Reserved 55
Figure1: solution of 8*8 queen problem
The solutions for n queen value in N*N chessboard are fixed.
The solutions for queen value from 1 to 10 are tabulated in
table 1 [7].
Table 1: Correct solutions for number of queens
B. Genetic Algorithm
Genetic Algorithm [8] is one of the best optimization
algorithms. It is based on the approach of natural selection
and genetics. It is one of the search-based algorithms,
established under the concept of evaluation. In GA, each
solution is representing as chromosomes in an individual.
Each chromosome is estimated using a function that is called
a fitness function that denotes the correctness of each
chromosome in the individual. The Genetic algorithm is not
like classical methods and it suitable for a lot of real life
problems. The main objective of genetic algorithm gives
high quality solution for hard problem. It is a program which
works based on genetic code. It is distinguished from
traditional search algorithms. This algorithm searches
between a set of points and work along with its coding of
parameter within them. The features of genetic algorithm are
used as a common optimization procedure. It uses a
probability method, whereas the classic algorithm uses
deterministic methods. The advantage of GA is very faster
and more powerful compared with traditional methods. It
gives the better solutions that close to the global optima. It
doesn’t give any guarantee for all optimal solutions that the
reason randomness, but give the nearest optimal values.
Basic terminologies of genetic algorithms are followed
1) Population: Population means a set of all solution of
a problem.
2) Chromosomes: Chromosomes is referred a single
solution from a set of solutions.
3) Gene: Gene is defined a single element of the single
solution.
4) Fitness function: Fitness function is like a function
that takes set of solution as a input and produce
solution as a output.
5) Genetic operators: There are three operators are
used in Genetic algorithm.
Genetic operators are followed,
1) Selection: Selection [9] is one important stage in genetic
algorithm. Selection work based on solution and its
population using crossover methods.
Selection procedures are,
a) Fitness function can be evaluated for each
individual that providing fitness value, then
these are normalized depend on its fitness
value.
b) Populations have been sorted by descending
order of fitness values.
c) Normalized fitness values are calculated.
d) Random number R has been chosen.
e) The selected normalized value is smaller than
R.
2) Crossover: Crossover [10] is one type of genetic
operator. It used to change the programming of
chromosomes from one to the next. The process of
crossover is taking more than one from a parent
solution and returns one child solution.
3) Mutation: Mutation [11] is another genetic operator. It
used to manage genetic, diversity from one generation
of chromosomes from one to the next.
Section I contains the introduction of N-queen Problem &
Genetic Algorithm, section II contain the related work of
Genetic Algorithm, section III contain the Summary of
Genetic Algorithm used to solve N-Queen problem, section
IV concludes research work with future directions.
II. LITERATURE SURVEY
Vijayanellappan et al compared two algorithms in [12] for
solving n queen problems, such as genetic algorithm and
backtracking algorithm both uses different methods in an
entire work solving n queen problem. Time taken for these
methods based on a given value of n. The time increases
when n value is increased. This algorithm is explained in an
efficient way. Since the backtracking algorithm is difficult
when n value reached up to 35. The genetic algorithm is
Number of Queens
Solutions
1
1
2
0
3
0
4
2
5
10
6
4
7
40
8
92
9
352
10
724
International Journal of Computer Sciences and Engineering Vol.6(2), Mar 2018, E-ISSN: 2347-2693
© 2018, IJCSE All Rights Reserved 56
faster than the backtracking algorithm. Backtracking
algorithm is very critical to implement in higher values, but it
also efficient and simple in lowest value.
Jalal eddinAghazadeh heris et al. [13] proposed a
modified genetic algorithm for solving n queen problem.
Their paper covered weakness of this algorithm with the help
of local search algorithms. A Minimal conflicts algorithm
like a local search algorithm contributed the partial view of
genetic algorithm. Modified algorithm is the solution of the
combinations among GA and minimal conflicts algorithm.
The standard GA algorithm and modified GA algorithm are
compared to solving n queen problem. The normal GA
algorithm is not efficient to solve 8 queen problems with
large scale, but their paper solves the problem of GA
algorithm by applying minimal conflicts algorithm.
Saadakarbic et al. [14] proposed genetic algorithm for
solving the minimum dominating set of queen’s problems
connected with standardized chessboard positioned puzzles.
The paper produced simple, effective and good solutions by
using genetic algorithm to solve this problem. Since the
optimal solution is also determined by the GA algorithm for
different size board form 8*8 to 11*11. This proposed
algorithm has been resolved by using MATLAB and 2.6G
Hz PC with Intel processor. The proposed GA has found the
optimal solution on a chess board.
Ahmed S. Farhan et al. [15] proposed GA for finding 92
solutions of n queen problem. The GA algorithm solved the
problem by using genetic code for a good solution to the
problem. The probabilities of 92 solutions for 8 queen
problems are to be found each genetic represent through one-
dimensional array with the same size 8. This representation
diminishes the empty cell which wants more time for
comparison with representation one array used to store 8
queens for one solution based on GA algorithm and also
fitness calculated.
Vishal Jain et al. [16] proposed genetic algorithm for solving
various problems from different domains such a word sense
disambiguation, tuning the parameters of fuzzy logic 8 queen
and image compression. The paper explained the concept GA
algorithm and how it’s applied in the various problems and
finding solutions for vast search space, the paper mainly
focused on ample amount of space and optimization
problems from different domain large search space 8 queen
problems solved by GA algorithm.
Vishal khanna et al. [17] compared various Memetic
algorithms for solving NP hard problem, which has a non-
polynomial time problem optimizing the n queen problem
using genetic algorithm, SALAMA and HCLSMA
algorithms. Memetic algorithm solved n queen problem
following two stages. In a first stage generate solutions
randomly that are evolved till they become feasible solution
and the second stage from these solutions are one more time
evolved so violation of soft constraints to be minimized. In a
final stage, it produces the best solution in which hard
constraints are satisfied. HCLSMA algorithm gives the better
solutions compared with GA for optimal solution. Time and
coverage rate also better in HCLSMA than GA.
Soham Mukherjee et al. [18] compared various algorithms
to solving n queen problems which provide brief explanation
about different algorithms such as Genetic Algorithm,
Simulated annealing Algorithm, Brute Force Algorithm,
Backtracking and found the best solution to n queen problem
and constructs a comparison of these four algorithms. The
proposed GA performed very well compared with SA
algorithm. BF algorithm and BT algorithm provides the best
fitness value than the simulated using by GA. GA gives the
best solution that helps to give an optimal solution to the
global optima. BF and BT algorithms are only used when the
problem size is limited and these are not efficient and
effective to solve n queen problem when the n value is high,
whereas GA and SA algorithms are given the efficient
solution when the n value is high. The proposed GA has the
better fitness of the solution than the SA algorithm by GA
but execution time of SA by GA is better than proposed GA.
Vikasthada et al. [19] proposed the comparative analysis of n
queen problem using Genetic Algorithm and Backtracking
algorithm. Both algorithms are used for different methods
when solving the n queen problem. The n value of these
problems is compared whereas the n value increases. BT
algorithm is not good for large size value, it is difficult to
solve that problem. The paper consists of whole work carried
out in MATLAB using Pentium core 2 and 2.2 GHz
processors on windows 8 with 4 GB RAM. The N value
taken from 4 to 50 under the population of 1000 and
generation is 100 further using these methods execution time
is calculated. BT technique using small size n value so less
execution time compares to GA technique, but the fact GA
are not possible to its random search, that gives only an
approximate solution GA is performing much better than the
BT algorithm.
Belae Al-khateeb et al. [20] compared two metaheuristic
algorithms such as GA and SA for solving 8 queen problems
further finding all the 92 feasible solutions for 8*8 chess
board. Both algorithms provided a better solution rather than
the randomization method and also SA is better than the GA
whose are taking less time for finding solutions.
Er.VishalKhanna et al. [21] compared various techniques for
solving N-Queen problems used techniques are Genetic
Algorithm, Backtracking Algorithm and Tuned Hybrid
Technique. This NP problem solved by following its
principle that is each queen is not contradict with each other
queen vertically, diagonally and horizontally. Performance
analysis of n queen problem is increased by removing the
threatening cell. These three algorithms are used for solving
this NP-Hard problem based on its parameter namely time
and space. Time taken by BT and Tuned hybrid techniques to
solve the problem is more than the genetic algorithm. The
paper explains the complexity analysis is improved using
various algorithms. Better solutions are found, but
International Journal of Computer Sciences and Engineering Vol.6(2), Mar 2018, E-ISSN: 2347-2693
© 2018, IJCSE All Rights Reserved 57
complexity analysis can be based in the conflict
minimization and convergence rate.
S.Pothumani [22] compared various algorithms for solving
N-Queen problem. In this paper N queen problem is
described and solved using various methods, whereas
proposed algorithms are Ant Colony Optimization, Genetic
algorithm, DNA Striker algorithm and Particle Swarm
Optimization. These all algorithms provide the better result
than the traditional algorithms, but the performance differ
depending upon the size of the space and number of queens.
Some parameters are very useful to make a comparison study
for better understand.
Amardeep sing et al. [23] proposed Memetic Algorithm for
solving well known NP-hard problem such as N-Queen
problem. The paper Memetic Algorithm is used to optimize
N-Queen problem, whereas make the complexity of the
parameters with respect to the number of iterations. Memetic
Algorithm solved N-queen problem consists of being a
combination of GA and Local Search. GA steps are followed
entire problem. The combination of GA and Local Search to
solved the NQP within two phases, in a first stage randomly
generated solution are evolved till it become feasible (hard
constraints are satisfied) and second stage evolved solutions
are minimized the violation of soft constraints.
Ayed M. Turky [24] proposed genetic algorithm and solved
Constraint satisfaction problem that taken the N queen
problem. It consumed large N values with time guarantee
optimize solved N Queen problem and the results are
tabulated. GA produced good results when compared against
the other approach. Crossover fraction, mutation fraction,
selection mechanism, crossover type, mutation type
parameters is used under the principle of GA. The results of
this problem successfully solved using GA with repair
function. This function is found different solution in different
times for a given number of queens, but it is given by best
time.
Ivicamartinjak [25] proposed the way in which heuristic
algorithm can be used to solve n queen problem. Genetic
algorithm, simulated annealing algorithm and Tabu search
algorithm are used where test results of these algorithms are
calculated and the complexity also determined. These
algorithms are successfully compared and their achievements
are measured. The reduction of the fitness function
complexity O(1) problem occurrences with large magnitude
is solved. SA calculated the fitness function equal to its
iteration, whereas other algorithms are more complicated and
the fitness function is calculated more than once in every step
of its procedure. Since fitness calculation time is taken
large.GA and SA are contrasted with Tabu search algorithm,
but from this algorithm SA is better for solving large
dimension N queen problem which also achieved fitness
function.
Marco Bozikovic et al. [26] proposed the way, which the
genetic algorithm used to solve the NQP. Chromosome
representations, genetic operators and evaluation functions
are produced. Furthermore, Global Parallel GA is proved like
a possible way of GA. GPGA works simultaneously in the
process of selection and crossover, but it is not suitable for
large processing at the same time increase the performance
for a small number of related processing units.
Milena lazarova [27] produced the efficiency of parallel GA
for solving N-queen problem with a multi computer
platform. This proposed model of GA is based on al parallel
algorithm technique of simultaneous iterations.
Chromosomes parameters are used that selected randomly in
a bidirectional circular model. This algorithm implemented
for both programming models such as flat and hybrid.
Performance and scalability made with respect to the board
size and parallel system size, but the performance of hybrid
parallel programming mode are better than the hardware
resource of the destination multicomputer.
III. Summary of Genetic Algorithm used to solve N-
Queen problem
Table 2: Summary of Genetic Algorithm used to solve N-
Queen problem
Author Name
Merits
Demerits
Vijayanellappan[12]
GA best for large
number of values.
Time taken based
on given values.
JalaleddinAghazadehh
eris[13]
Resolve the
weakness of GA
using Minimal
conflicts algorithm
Standard
algorithm is not
efficient without
applying MC
algorithm
Saadakarbic[14]
GA produce
optimal solution
for different size
boards
Other computing
technique can be
improved
Ahmed S. Farhan[15]
Empty cell
removed.
One array holds 8
queens for one
solution.
Vishal Jain et al [16]
Different domains
large space
problem solved by
GA
Parameters may
be used.
Vishal khanna [17]
Constraints are
satisfied within 2
stages.
Time and
converge rate can
be improved.
Soham Mukherjee[18]
GA is efficient and
effective than SA
by using GA.
Execution time
can be improved.
That is slow than
SA.
Vikasthada [19]
GA better than BT
and gives
approximation
solution.
Random search is
not possible.
Belae Al-khateeb [20]
Provide the better
solution than
randomized
method.
Execution time
can be improved.
Er.VishalKhanna [21]
Problem solved
based on its time
and space.
Complexity
analysis may be
improved.
S.Pothumani [22]
Better than
traditional
algorithm for
finding solution.
Better parameter
can be used.
International Journal of Computer Sciences and Engineering Vol.6(2), Mar 2018, E-ISSN: 2347-2693
© 2018, IJCSE All Rights Reserved 58
Amardeep sing [23]
Constraints are
satisfied.
Ayed M. Turky [24]
Repair function
used with GA.
Ivicamartinjak [25]
Fitness function
complexity O (1)
is solved.
IV. CONCLUSION
This survey aimed to provide a clear understanding,
regarding Genetic Algorithm with the influence of N-queen
problem. Moreover, the recently proposed various
mechanisms were concluded to solve N-queen problem. So,
furthermore each mechanism was analyzed and studied and
their advantages and improvements were included. Finally,
the brief comparison was provided in the preceding which
shows merits and demerits of existing works.
REFERENCES
[1] Kaveh, A.Ghazaan, M Ilchi. ―A new meta-heuristic algorithm:
Vibrating particles system, ScientiaIranica. Transaction A, Civil
Engineering; Tehran ,Vol. 24, Iss. 2, (2017),pp 551-566.
[2] Cusack, C., Largent, J., Alfuth, R., &Klask, K. 2010. ―Online
Games as Social-Computational Systems for Solving NP-
complete Problems‖.In Proc. of Meaningful Play’10. 5.
[3] Er. Vishal Khanna, Er. Sarvesh Chopra, Review on N-Queen
Optimization Using Tuned Hybrid Technique, International
Journal of Engineering Sciences & Research Technology
(Thomson Reuters),Vol.6, Issue.2,2017,pp.62-68.
[4] https://en.wikipedia.org/wiki/Search-
based_software_engineering
[5] Ji-PyngChiou, Chung-Fu Chang and Chin-Ju Li,‖ A backtracking
evolutionary algorithm for power systems‖, MATEC Web of
Conferences Volume,vol. 119, 2017.
[6] Doug Chatham,‖ The maximum queens problem with pawn‖,
Recreational Mathematics
Magazine,vol.3,Issue.6,2018,DOI: https://doi.org/10.1515/rm
m-2016-0010.
[7] B Documentaries, ―Full Solution of N-Queens Problem O
Reilly‖, http://oreillynQueensproblem.blogspot.in, 3-Sept-
2016.
[8] Song Yan, Yang Guoxing, ―A Genetic Algorithm for test
paper‖, International conference, 2013.
[9] ShokouhiM.Chubak P. RaeesyZ―Enhancing focused crawling
with genetic algorithms‖Vol: 4-6,2005, pp.503- 508.
[10] B.Klabbankoh, O.Pinngern. ―applied genetic algorithms in
information retrieval” Proceeding of IEEE ,pp.702- 711,Nov
2004.
[11] V.Thada, V.Jaglan, ―Use of Genetic Algorithm in Web
Information Retrieval‖, International Journal of Emerging
Technologies in Computational and Applied Sciences,
vol.7,no.3,pp.278-281, Feb,2014.
[12] Anuneet Kumar Dubey, VijayanEllappan, Rakesh Paul,
Vishal Chopra, ―Comparative Analysis of Backtracking And
Genetic Algorithm In N Queens’s Problem‖, International
Journal of Pharmacy &Technology, Vol.8, Issue.4,2016,
pp.25618-25623.
[13] JalaleddinAghazadehheris Faculty of Mathematics and
MohammadrezaAsgariOskoei, Modified Genetic Algorithm
for Solving n-Queens Problem ―,Iranian Conference on
Intelligent Systems (ICIS), 2014.
[14] SaadAlharbi and Ibrahim Venkat, ―A Genetic Algorithm
Based Approach for Solving the Minimum Dominating Set of
Queens Problem‖, Journal of Optimization, 2017.
[15] Ahmed S. Farhan ,Wadhan Z. Tareq and Fouad H. Awad,
―Solving N-Queens Problem using Genetic Algorithm ‖,
International Journal of Computer Applications, Vol.122,
Issue.12, 2015,pp.11-14.
[16] Vishal Jain, DevendraSaini and K.N Dinesh Babu,‖ A
Genetic Approach To Solve Problems From Diverse
Domains‖, International Journal of Advanced Scientific and
Technical Research, vol.6, Issue -6,2016.
[17] Er. Vishal Khanna, Er. Sarvesh Chopra and
Er.AbhishekBhardwaj,‖ N-Queens Problem Optimization
Using Various Memetic Algorithms‖, International Journal
of Modern Computer Science, Vol.5, Issue.2, 2017.
[18] Soham Mukherjee, SantanuDatta, PramitBrataChanda and
Pratik Pathak, ―Comparative Study of Different Algorithms
To Solve N-Queens Problem‖, International Journal of
Foundations of Computer Science and Technology, Vol.5,
Issue.2, 2015,pp.15-27.
[19] VikasThada and Shivali Dhaka, ―Performance Analysis of N-
Queens Problem using Backtracking Algorithm Techniques
, International Journal of Computer Applications, Vol.102,
Issue.7,2014, pp. 26-29.
[20] Belal Al-Khateeb, Wadhah Z. Tareq, ‖ Solving 8-Queens
Problem by Using Genetic Algorithms, Simulated Annealing
and Randomization Method‖, 2013 Sixth International
Conference on Developments in systems engineering, 2013,
pp.187.
[21] Er. Vishal Khanna, Er. Sarvesh Chopra and
Er.AbhishekBhardwaj, ―Comparative Analysis Of
Backtracking, Tuned Hybrid technique And Genetic
Algorithm For Optimization Of N-Queens Problem‖,
International Journal Of Engineering Sciences & Research
Technology, Vol.6, Issue.3, 2017.
[22] S.Pothumani, ―Solving N-Queens Problem using Various
Algorithms-A Survey‖, InternationalJournal of Advance
Research in Computer Science and Software Engineering,
Vol. 3, Issue. 2, 2013, pp. 247-250.
[23] Amarbir Singh and Sandeep Singh Dhillon, ―A Comparative
Study of Algorithms for N-Queens Problem‖, International
Journal of Advance Foundation and Research in Science and
Engineering, Vol.1, Special Issue, 2015, pp.1-4.
[24] Ayad M. Turkyand, MohdSharifuddinAhmad , Using
Genetic Algorithm for Solving N –Queens Problem‖,
International Symposium on Information Technology, vol.2,
2010.
[25] IvicaMartinjak and M. Golub, "comparison of heuristic
algorithms for the n-Queen Problem,‖ Iinternational
conference on information technology Interfaces, 2007.
[26] Marko Bozikovic, Marin Golub and Leo Budin, ―Solving N-
Queens Problem Using Global Parallel Genetic Algorithm‖,
European Conference Ljubljana Slovenia, 2003, pp.11-17.
[27] Milena Lazarova,‖ Efficiency Of Parallel Genetic Algorithm
For Solving N-Queens ProblemOn Multicomputer Platform‖,
9th WSEAS International Conference On Evolutionary
Computing (EC’08), Sofia, Bulgaria, May 2-4, 2008.
... Ada beberapa permasalahan yang umum diselesaikan menggunakan metode metaheuristik, misalnya NP-Hard problem, yaitu masalah yang memiliki solusinon-deterministic polynomial time, solusi ini berjalan dalam waktu polinomial [5]. Salah satu kasus yang termasuk dalam np-hard adalah n-queens problem [6]. N-queens problem secara umum menggunakan dasar permainan catur yaitu masalah bagaimana meletakkan bidak menteri (queen) sebanyak n pada papan catur berukuran n x n sehingga tidak ada bidak ratu yang saling menangkap atau memakan hanya dengan satu langkah. ...
... Selanjutnya firefly akan melakukan perpindahan ke posisi yang baru menggunakan persamaan 4 sebagai berikut. Oleh karena firefly x 1 yang baru akan menjadi array [6,3,9,4,3,8,7,7,8,2]. Kemudian menghitung nilai fitness dari posisi firefly x 1 yang baru dengan cara melakukan pengecekan pada baris, kolom dan diagonal sehingga diperoleh nilai fitness firefly x 1 yaitu 8. Dari proses ini dilakukan perhitungan nilai intensitas cahaya firefly x 1 seperti persamaan (1) ...
... Parameter yang digunakan dalam mengeksekusi algoritma firefly pada kasus n-queens problem dapat dilihat pada Tabel 9. [7,10,1,3,0,9,4,8,5,11,2,6] 28 0 [1,3,6,10,7,2,11,5,8,0,9,4] 13 227 0 [8,5,3,9,11,2,4,6,1,12,10,0,7] 68.6967 s ± 106 0 [8,1,5,7,2,0,12,4,9,11,6,10,3] 39 0 [2,7,11,4,8,0,3,10,6,1,9,5,12] 14 324 0 [0, 8,12,4,6,10,2,13,11,7,3,1,9,5] 132.8445 s ± 194 0 [5,7,13,3,0,9,4,2,11,8,12,1,6,10] 92 0 [10,3,6,12,5,11,0,4,13,8,2,9,7,1] 15 1529 0 [5,14,8,3,0,6,13,11,1,7,12,10,2,4,9] 433.1803 s ± 150 0 [8,3,13,7,10,2,5,12,1,9,11,14,0,4,6] 209 0 [8,2,7,13,10,5,0,6,3,11,14,1,9,4,12] 16 300 0 [6,2,5,12,15,3,8,11,1,14,10,0,9,4,13,7] 422.1155 s ± 109 0 [2,13,15,4,14,5,10,1,11,6,3,0,8,12,9,7] 916 0 [7,11,6,14,5,8,0,13,3,1,9,4,2,10,12,15] 17 -1 [3,11,14,7,10,16,1,4,15,9,2,13,8,12,5,0,6] 3334.1929 s ± 2712 0 [4,14,5,8,15,11,0,6,16,1,10,12,2,9,7,3,13] 1483 0 [3,10,12,9,1,5,14,6,0,16,11,15,7,4,8,13,2] 18 -1 [16,14,6,17,7,1,11,5,10,4,0,3,12,9,8,15,13,2] 1306.0422 ...
Article
Full-text available
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.
... The change in the mutation operator to make the genetic algorithm more effective in order to solve the n-queen problem has also been done by Jain and Parsad [8]. Sathyapriya et al [9] also conducted a review and comprehensive study focusing on the application of the GA in solving the n-queen problem. ...
Conference Paper
Full-text available
The n-queen problem is a classic artificial intelligence problem. The main goal of this problem is to place the queens on the chess board in such a way that none of them can threaten from each other. This problem is a permutation problem and belongs to the category of NP-Hard problems. Metaheuristic methods can be used to solve these types of problems. In this paper, a discrete version of the Giza Pyramids Construction (GPC) algorithm is presented to solve the n-queen problem. To conduct the experiments in this paper, seven problems are considered. Also, for comparison, Genetic Algorithm (GA) and Simulated Annealing (SA) algorithm were selected as two popular and developed algorithms. To compare the performance of the algorithms, the number of function evaluations is considered as an evaluation criterion. The results of the experiments show that the proposed algorithm has performed better than other competing algorithms in four out of seven problems. This algorithm has also recorded a better run time than other algorithms. According to the results of the experiments, as the problem becomes more complicated, the proposed algorithm has a better performance than other competing algorithms.
... The problem was widely investigated by famous mathematicians such as Gauss [1,2], Polya [3], and Lucas [4]. Likewise, the N-Queens problem is the subject of current research, including quantum computation [5][6][7], and genetic algorithm [8,9]. Additionally, the N-Queens problem is utilized in computer science to demonstrate various algorithms such as permutation generation, backtracking, and the divide-and-conquer paradigm [10]. ...
Article
The clustering of a given data set is a technique widely utilized data analysis method by data scientists for technological applications. Some portion of the analysis define the relations between data, and strong relations are identified as sub-communities by means of clustering algorithms. The collected functional relations between the clusters’ nodes extract the uninvestigated network properties. In this study, we investigated the relational properties of Queen graphs (graph representation of N-Queens problem) by the Girvan-Newman Clustering algorithm. Our investigation showed that the highly symmetric degree of nodes does not lead the symmetry in the sub-communities. While the distinct number of degrees increases with respect to board size, the number of subcommunities increases irregularly. Additionally, the maximum modularity score increases slower than the number of subcommunities. Here is the link for full text: https://dergipark.org.tr/tr/pub/adyumbd/issue/54711/707593
Article
Penelitian ini bertujuan untuk mencari nilai parameter optimal algoritma kunang-kunang dilihat dari waktu eksekusi yang dibutuhkan dalam menemukan solusi optimal pada kasus n-queens problem. Metode yang digunakan yaitu metode eksperimen dengan melakukan 10 kali percobaan pada setiap parameter dengan populasi 15 dan 50 kunang-kunang pada dimensi 10x10. Parameter optimal yang diperoleh yaitu α = 2.0, β = 1.0, dan γ = 0.2 dengan rata-rata waktu eksekusi 0.63776 detik pada populasi 15 kunang-kunang dan rata-rata waktu eksekusi 0.98321 detik pada populasi 50 kunang-kunang.
Article
Full-text available
This paper presents a backtracking variable scaling hybrid differential evolution, called backtracking VSHDE, for solving the optimal network reconfiguration problems for power loss reduction in distribution systems. The concepts of the backtracking, variable scaling factor, migrating, accelerated, and boundary control mechanism are embedded in the original differential evolution (DE) to form the backtracking VSHDE. The concepts of the backtracking and boundary control mechanism can increase the population diversity. And, according to the convergence property of the population, the scaling factor is adjusted based on the 1/5 success rule of the evolution strategies (ESs). A larger population size must be used in the evolutionary algorithms (EAs) to maintain the population diversity. To overcome this drawback, two operations, acceleration operation and migrating operation, are embedded into the proposed method. The feeder reconfiguration of distribution systems is modelled as an optimization problem which aims at achieving the minimum loss subject to voltage and current constraints. So, the proper system topology that reduces the power loss according to a load pattern is an important issue. Mathematically, the network reconfiguration system is a nonlinear programming problem with integer variables. One three-feeder network reconfiguration system from the literature is researched by the proposed backtracking VSHDE method and simulated annealing (SA). Numerical results show that the perfrmance of the proposed method outperformed the SA method.
Article
Full-text available
In the field of computing, combinatorics, and related areas, researchers have formulated several techniques for the Minimum Dominating Set of Queens Problem (MDSQP) pertaining to the typical chessboard based puzzles. However, literature shows that limited research has been carried out to solve the MDSQP using bioinspired algorithms. To fill this gap, this paper proposes a simple and effective solution based on genetic algorithms to solve this classical problem. We report results which demonstrate that near optimal solutions have been determined by the GA for different board sizes ranging from 8 × 8 to 11 × 11.
Article
Full-text available
In this paper, a new meta-heuristic algorithm based on free vibration of single degree of freedom systems with viscous damping is introduced, and it is called Vibrating Particles System (VPS). The solution candidates are considered as particles that gradually approach their equilibrium positions. Equilibrium positions are achieved from the current population and historically best position in order to have a proper balance between diversification and intensification. To evaluate the performance of the proposed method, it is applied to sizing optimization of four skeletal structures including trusses and frames. Results show that the proposed algorithm is a robust and reliable method.
Article
Full-text available
The classic n-queens problem asks for placements of just n mutually non-attacking queens on an n × n board. By adding enough pawns, we can arrange to fill roughly one-quarter of the board with mutually non-attacking queens. How many pawns do we need? We discuss that question for square boards as well as rectangular m × n boards.
Article
This paper presents a comparative analysis of two algorithms i.e: backtracking and genetic algorithm for the solution of N queen’s problem. In this paper the N queens problem is solved using both the algorithms. Both the algorithms have their own advantages and drawbacks. Both a the a methods of a solvinga N Queen problem area entirely different. The first one is general method and takes time in days, months and years as a Na increases. Ina this paper the time taken by the two methods for as given value of Na area compared. © 2016, International Journal of Pharmacy and Technology. All rights reserved.
Article
This paper, explain solution to find the 92 solution of n-Queen problem based on GA (Genetic Algorithm). The n-Queen problem become a Widespread platform for the AI researcher for implement their intelligence algorithms and try them. The Genetic algorithm used to solve the problem and each chromosome is be a solution for the problem and depending on the steps of the GA, The 92 solution, all possible solution for 8 Queen problem is founded. The represent of each chromosome have been by using one dimension array with size equal 8 contain only the queens which represent a one solution and the empty location are aborted to reduce the searching time.
Article
This article presents an online information retrieval using genetic algorithms to increase information retrieval efficiency. Under vector space model, information retrieval is based on the similarity measurement between query and documents. Documents with high similarity to query are judge more relevant to the query and should be retrieved first. Under genetic algorithms, each query is represented by a chromosome. These chromosomes feed into genetic operator process: selection, crossover, and mutation until we get an optimize query chromosome for document retrieval. Our testing result show that information retrieval with 0.8 crossover probability and 0.01 mutation probability give the highest precision while 0.8 crossover probability and 0.3 mutation probability give the highest recall.