Basic and Hybrid Imperialist Competitive Algorithms for Solving the Non-attacking and Non-dominating n-Queens Problems

  • Nasrin Mohabbati-Kalejahi
  • Hossein Akbaripour
  • Ellips Masehian
Part of the Studies in Computational Intelligence book series (SCI, volume 577)


In the non-attacking n-queens problem the goal is to place n queens on an n×n chessboard such that no two queens are in the same row, column, or diagonal. In the non-dominating n-queens problem, n queens are placed on an n×n chessboard such that the number of non-attacked squares is maximized. Both of these problems are classical combinatorial optimization problems which have been proved to be NP-hard. In this paper, the Imperialist Competitive Algorithm (ICA), which is a recent evolutionary metaheuristic method, has been applied for solving both the non-attacking and non-dominating n-queens problems. As a new variation, the ICA was combined with a local search, resulting in Hybrid ICA (HICA). Extensive experimental results showed that the proposed HICA outperformed the basic ICA in terms of average runtimes and average number of fitness function evaluations for both the n-queens problems. The ICA and HICA were also compared to the Cooperative PSO (CPSO) algorithm, which is currently the best algorithm in the literature for finding the first valid solution to the non-attacking n-queens problem, and the results showed that the HICA required less number of fitness function evaluations than the CPSO.


Non-attacking n-Queens problem Non-dominating n-queens problem Imperialist Competitive Algorithm Hybrid Imperialist Competitive Algorithm Effective Swap Operator 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abramson, B., Yung, M.: Divide and conquer under global constraints: A solution to the n-queens problem. Journal of Parallel and Distributed Computing 6(3), 649–662 (1989)Google Scholar
  2. 2.
    Ahrens, W.E.: Mathematische Unterhaltungen And Spiele. Teubner, Leipzig (1901)Google Scholar
  3. 3.
    Ainlet, S.: Mathematical Puzzles. G. Bell & Sons, U.K. (1977)Google Scholar
  4. 4.
    Amooshahi, A., Joudaki, M., Imani, M., Mazhari, N.: Presenting a new method based on cooperative PSO to solve permutation problems: A case study of n-queen problem. In: 3rd Int. Conference on Electronics Computer Technology (ICECT), vol. 4, pp. 218–222 (2011)Google Scholar
  5. 5.
    Atashpaz-Gargari, E., Lucas, C.: Imperialist competitive algorithm: An algorithm for optimization inspired by imperialistic competition. In: IEEE Congress on Evolutionary Computation, pp. 4661–4667 (2007)Google Scholar
  6. 6.
    Bell, J., Stevens, B.: A survey of known results and research areas for n-queens. Discrete Mathematics 309, 1–31 (2009)MathSciNetMATHCrossRefGoogle Scholar
  7. 7.
    Bezzel, M.: Proposal of 8-queens problem. Berliner Schachzeitung 3, 363 (1848)Google Scholar
  8. 8.
    Bracamonte, D.: Argentinian newsletter El Acertijo (Los Acertijeros Boletin), vol. (6) (1993), (retrieved)
  9. 9.
    Campos, V., Laguna, M., Mart, R.: Context-independent scatter search and tabu search for permutation problems. INFORMS J. Computing 17, 111–122 (2005)MATHCrossRefGoogle Scholar
  10. 10.
    Dirakkhunakon, S., Suansook, Y.: Simulated Annealing with iterative improvement. In: International Conference on Signal Processing Systems, pp. 302–306 (2009)Google Scholar
  11. 11.
    Draa, A., Meshoul, S., Talbi, H., Batouche, M.: A Quantum-Inspired Differential Evolution Algorithm for Solving the n-Queens Problem. The International Arab Journal of Information Technology 7(1), 21–27 (2010)Google Scholar
  12. 12.
    Draa, A., Talbi, H., Batouche, M.: A Quantum Inspired Genetic Algorithm for Solving the N-Queens Problem. In: Proceedings of the 7th International Symposium on Programming and Systems, pp. 145–152 (2005)Google Scholar
  13. 13.
    Dudeney, H.E.: Amusements in mathematics. Nelson and sons (1917)Google Scholar
  14. 14.
    Erbas, C., Sarkeshik, S., Tanik, M.M.: Different perspectives of the n-queens problem. In: Proceedings of the 1992 ACM Annual Conference on Communications, pp. 99–108. ACM Press (1992)Google Scholar
  15. 15.
    Ghersi, I.: Mathematica dilettevole curiosa. Hoepli, Milan (1913)Google Scholar
  16. 16.
    Homaifar, A., Turner, J., Ali, S.: The n-Queens Problem and Genetic Algorithms. In: Proceedings IEEE Southeast Conference, vol. 1, pp. 262–267 (1992)Google Scholar
  17. 17.
    Jagota, A.: Optimization by reduction to maximum clique. In: IEEE International Conference on Neural Networks, vol. 3, pp. 1526–1531 (1993)Google Scholar
  18. 18.
    Kennedy, J., Eberhart, R.C.: Particle swarm optimization. In: Proceedings of IEEE Int’l. Conf. on Neural Networks, vol. IV, pp. 1942–1948 (1995)Google Scholar
  19. 19.
    Khan, S., Bilal, M., Sharif, M., Sajid, M., Baig, R.: Solution of n-Queen Problem Using ACO. In: IEEE 13th International Multi-Topic Conference, pp. 1–5 (2009)Google Scholar
  20. 20.
    Kilani, Y.: Comparing the performance of the genetic and local search algorithms for solving the satisfiability problems. Applied Soft Computing 10, 198–207 (2010)CrossRefGoogle Scholar
  21. 21.
    Kosters, W.: n-Queens Bibliography (2012), (retrieved May 4, 2012)
  22. 22.
    Kurchan, R.: Argentinian newsletter El Acertijo (Los Acertijeros Boletin), vol. (13) (1994), (retrieved)
  23. 23.
    Kurchan, R.: Argentinian newsletter El Acertijo (Los Acertijeros Boletin), vol. (26) (1997), (retrieved)
  24. 24.
    Lemaire, B., Vitushinkiy, P.: Placing n non dominating queens on the n×n chessboard. Rretrieved from website of the “Fédération Française des Jeux Mathématiques”Google Scholar
  25. 25.
    Lionnet, F.J.E.: Question 963. Nouvelles Annales de Mathématiques 28, 560 (1869)Google Scholar
  26. 26.
    Martinjak, I., Golub, M.: Comparison of Heuristic Algorithms for the N-Queen Problem. In: Proceedings of the ITI 2007 29th International. Conference on Information Technology Interfaces, pp. 25–28 (2007)Google Scholar
  27. 27.
    Nazari-Shirkouhi, S., Eivazy, H., Ghodsi, R., Rezaie, K., Atashpaz-Gargari, E.: Solving the integrated product mix-outsourcing problem using the Imperialist Competitive Algorithm. Expert Systems with Applications 37, 7615–7626 (2010)CrossRefGoogle Scholar
  28. 28.
    Pauls, E.: Das Maximalproblem der Damen auf dem Schachbrete, II, Deutsche Schachzeitung. Organ fur das Gesammte Schachleben 29(9), 257–267 (1874)Google Scholar
  29. 29.
    Rivin, I., Zabih, R.: A Dynamic Programming Solution to the n-Queens Problem. Information Processing Letters 41, 253–256 (1992)MathSciNetMATHCrossRefGoogle Scholar
  30. 30.
    Rouse, W.W.: Mathematical Recreations and Problems of Past and Present Times, 3rd edn. McMillan (1896)Google Scholar
  31. 31.
    Russell, S.J., Norvig, P.: Artificial Intelligence A Modern Approach. Prentice-Hall Inc., NJ (1995)Google Scholar
  32. 32.
    San Segundo, P.: New decision rules for exact search in n-Queens. Journal of Global Optimization 51, 497–514 (2011)MathSciNetMATHCrossRefGoogle Scholar
  33. 33.
    Sloane, N.J.A.: The online encyclopedia of integer sequences (2012), (retrieved)
  34. 34.
    Sosic, R., Gu, J.: Efficient local search with conflict minimization. IEEE Transactions on Knowledge and Data Engineering (6E), 661–668 (1994)Google Scholar
  35. 35.
    Tambouratzis, T.: A Simulated Annealing Artificial Neural Network Implementation of the n-Queens Problem. Int. J. of Intelligent Systems 12, 739–752 (1997)CrossRefGoogle Scholar
  36. 36.
    Yang, X.-S.: Nature-inspired metaheuristic algorithms. Luniver Press (2010)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Nasrin Mohabbati-Kalejahi
    • 1
  • Hossein Akbaripour
    • 2
  • Ellips Masehian
    • 2
  1. 1.Faculty of Industrial EngineeringAmirkabir University of TechnologyGarmsarIran
  2. 2.Industrial Engineering DepartmentTarbiat Modares UniversityTehranIran

Personalised recommendations