Hybrid of genetic algorithm and local search to solve MAX-SAT problem using nVidia CUDA framework

  • Asim Munawar
  • Mohamed Wahib
  • Masaharu Munetomo
  • Kiyoshi Akama
Original Paper


General Purpose computing over Graphical Processing Units (GPGPUs) is a huge shift of paradigm in parallel computing that promises a dramatic increase in performance. But GPGPUs also bring an unprecedented level of complexity in algorithmic design and software development. In this paper we describe the challenges and design choices involved in parallelizing a hybrid of Genetic Algorithm (GA) and Local Search (LS) to solve MAXimum SATisfiability (MAX-SAT) problem on a state-of-the-art nVidia Tesla GPU using nVidia Compute Unified Device Architecture (CUDA). MAX-SAT is a problem of practical importance and is often solved by employing metaheuristics based search methods like GAs and hybrid of GA with LS. Almost all the parallel GAs (pGAs) designed in the last two decades were designed for either clusters or MPPs. Unfortunately, very little research is done on the implementation of such algorithms over commodity graphics hardware. GAs in their simple form are not suitable for implementation over the Single Instruction Multiple Thread (SIMT) architecture of a GPU, and the same is the case with conventional LS algorithms. In this paper we explore different genetic operators that can be used for an efficient implementation of GAs over nVidia GPUs. We also design and introduce new techniques/operators for an efficient implementation of GAs and LS over such architectures. We use nVidia Tesla C1060 to perform several numerical tests and performance measurements and show that in the best case we obtain a speedup of 25×. We also discuss the effects of different optimization techniques on the overall execution time.


Compute unified device architecture (CUDA) General-purpose computing on graphics processing unit (GPGPU) Genetic algorithm (GA) MAXimum SATisfiability problem (MAX-SAT) Single instruction multiple data (SIMD) Single instruction multiple threads (SIMT) 



We would like to thank Dalila Boughachi for her help, regarding the use of genetic algorithms to solve MAX-SAT problem. We would also like to thank the anonymous users who replied to our queries regarding CUDA and GPGPU.


  1. 1.
  2. 2.
  3. 3.
    nVidia CUDA Programming Guide 2.1 - CUDA 2.1 SDK Documentation (2008).
  4. 4.
    E. Alba, B. Dorronsoro, Cellular Genetic Algorithms, Operations Research/Computer Science Interfaces Series, vol. 42 (Springer, 2008)Google Scholar
  5. 5.
    D. Boughaci, H. Drias, Solving weighted max-sat optimization problems using a taboo scatter search metaheuristic. in SAC ’04: Proceedings of the 2004 ACM Symposium on Applied Computing (ACM, New York, 2004), pp. 35–36Google Scholar
  6. 6.
    D. Boughaci, H. Drias, B. Benhamou, Solving max-sat problems using a memetic evolutionary meta-heuristic, in Cybernetics and Intelligent Systems, 2004 IEEE Conference on Publication, vol. 1. (2004), pp. 480–484Google Scholar
  7. 7.
    H. Drias, Scatter search with walk strategy for solving hard max-w-sat problems, in Proceedings of IEA- AIE2001m Lecture Notes in Computer Science, LNAI-2070 (Springer, Budapest, 2001), p. 3544Google Scholar
  8. 8.
    K. Fok, T. Wong, M. Wong, Evolutionary computing on consumer graphics hardware. IEEE Int. Syst. 22(2), 69–78 (2007)CrossRefGoogle Scholar
  9. 9.
    J. Frank, A study of genetic algorithms to find approximate solutions to hard 3cnf problems, in Golden West International Conference on Artificial Intelligence (Kluwer Academic Publishers, 1994)Google Scholar
  10. 10.
    H. Hoos, T. Stutzle, Satlib: An Online Resource for Research on Sat (IOS Press, 2000), pp. 283–292. SATLIB is available online at
  11. 11.
    S. Kirkpatrick, C. Gelatt, M. Vecchi, Optimization by simulated annealing. Science, Number 4598, 13 May 1983 220, 4598, 671–680 (1983)Google Scholar
  12. 12.
    C. Li, Exploiting yet more the power of unit clause propagation to solve 3-sat problem, in ECAI’96 Workshop on Advances in Propositional Deduction (Budapest, Hungary, 1996), pp. 11–16Google Scholar
  13. 13.
    C. Li, Anbulagan: Heuristics based on unit propagation for satisfiability problems, in IJCAI (1), (1997), pp. 366–371Google Scholar
  14. 14.
    J. Li, X. Wang, R. He, Z. Chi, An efficient fine-grained parallel genetic algorithm based on gpu-accelerated, in NPC ’07: Proceedings of the 2007 IFIP International Conference on Network and Parallel Computing Workshops (IEEE Computer Society, Washington, DC, 2007), pp. 855–862Google Scholar
  15. 15.
    E. Lindholm, J. Nickolls, S. Oberman, J. Montrym, Nvidia tesla: a unified graphics and computing architecture. Micro. IEEE 28(2), 39–55 (2008)CrossRefGoogle Scholar
  16. 16.
    D. Martin, L. George, L. Donald, A machine program for theorem-proving. Commun. ACM 5(7), 394–397 (1962)CrossRefGoogle Scholar
  17. 17.
    M. Matsumoto, T. Nishimura, Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator. ACM Trans. Model. Comput. Simul. 8(1), 3–30 (1998)zbMATHCrossRefGoogle Scholar
  18. 18.
    M. Matsumoto, T. Nishimura, Dynamic creation of pseudorandom number generators, in Monte Carlo and Quasi-Monte Carlo Methods 1998 (Springer, 2000), pp. 56–69Google Scholar
  19. 19.
    B. Mazure, L. Sais, E. Crmoire, A tabu search for sat, in Proceedings of AAAI (1997)Google Scholar
  20. 20.
    V. Podlozhnyuk, Parallel mersenne twister. CUDA 2.1 SDK Documentation (2007)Google Scholar
  21. 21.
    B. Selman, H. Kautz, B. Cohen, Noise strategies for improving local search (1994)Google Scholar
  22. 22.
    J. Stratton, S. Stone, W. Hwu, Mcuda: an efficient implementation of cuda kernels on multi-cores. Technical Report IMPACT-08-01, University of Illinois at Urbana-Champaign (2008)Google Scholar
  23. 23.
    M. Tomassini, Spatially Structured Evolutionary Algorithms (Springer, Berlin, 2005)Google Scholar
  24. 24.
    Q. Yu, C. Chen, Z. Pan, Parallel Genetic Algorithms on Programmable Graphics Hardware, vol. 3612 (2005), pp. 1051–1059Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  • Asim Munawar
    • 1
  • Mohamed Wahib
    • 1
  • Masaharu Munetomo
    • 2
  • Kiyoshi Akama
    • 2
  1. 1.Graduate School of Information Science & TechnologyHokkaido UniversitySapporoJapan
  2. 2.Information Initiative CenterHokkaido UniversitySapporoJapan

Personalised recommendations