Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.08/5 (4 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
Leo Chapiro 13-Nov-15 5:46am    
The experts can surely help if you show what you already achieved? Marked as Incomplete
F-ES Sitecore 13-Nov-15 5:57am    
No-one is going to do your homework for you.

1 solution

This is a very common question and you can find samples and ideas via Google.
 
Share this answer
 
Comments
BillWoodruff 13-Nov-15 9:35am    
Isn't this really a comment rather than a solution ?
Richard MacCutchan 13-Nov-15 10:37am    
It gets it off the unanswered queue.

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