abachler, I don't even start college until August and won't be taking an A.I. class for at least a year after that. You jumping to conclusions is slightly insulting and annoying. You got your first solution from 64*63*62*61*60*59*58*57. However, any fool would write the loops like this:
That's 10.4 billion. Then you realized that when you place the queens, you can do it one column at a time and check that no queens are in the same row giving you 8*7*6*5*4*3*2*1. This can still be easily beaten with a hill-climbing algorithm starting in random places.Code:for (Q1 = 0; Q1 < 57; Q1++) { for (Q2 = Q1; Q2 < 58; Q2++) { for (Q3 = Q2; Q3 < 59; Q3++) { for (Q4 = Q3; Q4 < 60; Q4++) { for (Q5 = Q4; Q5 < 61; Q5++) { for (Q6 = Q5; Q6 < 62; Q6++) { for (Q7 = Q6; Q7 < 63; Q7++) { for (Q8 = Q7; Q8 < 64; Q8++) { } } } } } } } }