Click here to Skip to main content
16,017,881 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how can i Write c# program to solve the 9-queen problem using genetic algorithm that generates a different solution each run by randomizing the random number generator used. Use 6 samples in each generation.

(on the screen) three items should be printed
The first one represents the solution as a string(like 152693847), the second gives the number of generations required to reach the solution and the last one represents the solution as follows:

. . . . X . . . .
. . . . . . X . .
. . . . . . . . X
. . . X . . . . .
. X . . . . . . .
. . . . . . . X .
. . . . . X . . .
. . X . . . . . .
X . . . . . . . .


the code should run in less than a second.
Posted
Comments
E.F. Nijboer 16-Nov-15 7:08am    
This is a school assignment and you should solve it yourself (or just quit your study)

1 solution

You can refer the below link
N Queen Problem[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900