Professional Documents
Culture Documents
Solve 8-Queen Problem Using Genetic Algorithm. Consider Minimal Conflict Among Queens As The Fitness Function
Solve 8-Queen Problem Using Genetic Algorithm. Consider Minimal Conflict Among Queens As The Fitness Function
Solve 8-Queen Problem Using Genetic Algorithm. Consider Minimal Conflict Among Queens As The Fitness Function
Here
S1 = [1,6,2,5,7,4,8,2]
S2 = [6,1,5,2,8,3,7,4]
S3 = [4,1,5,8,2,7,3,6]
S4 = [8,7,6,5,2,3,4,1]
3. Applying a fitness function.
In this step, you have to apply fitness function i.e. Minimal conflict between
queens, on all the random states you have generated.
Fitness of State = Number of Non-attacking pairs
States Fitness Fitness Percentage
S1 27 29%
S2 28 30%
S3 28 30%
S4 10 11%
Fitness Percentage
S1 S2 S3 S4