Genetic Algorithms: 8-Queens Problem
- Implementation (in Java)
- Steady-state genetic algorithm
- Fitness function
- Subtract one point for every possible "attack"
- Implementation 1:
- 8x8 board
- 64 bits
- Each bit encodes the presence or absence of a queen
- Fitness adaptation
- Subtract two points for every "missing" queen
- Implementation 2:
- 8x8 board
- 48 bits
- Each 6-bit subsequence encodes the (x,y) coordinate of one of eight queens