Analyze the situation from the viewpoint of values that form the basis of professional nursing practice
Imagine that you were given the task of placing N queen on N X N boards so that N queen does not attack other boards. If the value of N is very small, it is easy to solve manually, but increasing the value of N to a very high value wastes the energy and time required and can not be accepted for automation in this age. To find a solution to this problem, there is a very interesting concept called BACKTRACKING. We returned again and tried to find another valid place for the third queen. However, this position also does not exist. Therefore, we are now backtracking to find the location of the second queen. We do not have a position again, we will return again. Therefore, put the first queen in (1, 0) and repeat these steps until the effective position of all the queen is found (2nd queen (3,1), 3rd (0,2)) .
The queen 's question is based on the idea of trying to place N queen in N x N grid so that N queen never catches other queen. The NQueen problem is easy to explain, small N is relatively easy to solve, so it is a typical problem of many combinatorial problems, but in the case of large N it becomes difficult. There are few ways to solve the problem of the Q queen. Some of them try all permutations, such as using the backtrack method, using reinforcement learning methods. In this project, genetic algorithms are used to solve this problem using the GAlib package.
For the sake of simplicity, I decided to try out only four parameters. They are crossover probability, mutation probability, population number, generation number. If the value of N is small, solving the N Queens problem is too easy, it is difficult to see the effect of each parameter. However, if N is large, it is too difficult to solve this problem, it takes a long time to complete the experiment. Therefore, in this experiment we will check the effect of each parameter using 20 medium sized N's.
Simple at first glance? If the value of N is low, is. N = 2 places two charges in the two polarities of the sphere, N = 3 places three charges in concentric circles on the equator, and N = 4 represents a tetrahedron. The larger the value of N, especially if N is a prime number, these beautiful geometric descriptions can be destroyed. N = 11 places the charge in a completely destructive symmetry - when the charges are in equilibrium, they distribute so that one has more charge than the other; it has a net dipole moment I will!