January 2020
Intermediate to advanced
346 pages
9h 8m
English
To encapsulate the N-Queens problem, we've created a Python class called NQueensProblem. This class can be found in the queens.py file of this book's GitHub repository, at https://github.com/PacktPublishing/Hands-On-Genetic-Algorithms-with-Python/blob/master/Chapter05/queens.py.
The class is initialized with the desired size of the problem and provides the following public methods:
The main method of the class exercises the class' methods ...
Read now
Unlock full access