Write an evolutionary algorithm to solve the Eight Queen puzzle.

Job ID: 31884207

Budget: $10 – $30 USD

Based on the provided skeleton code, write your Python3 modules to complete a genetic algorithm for the eight queen puzzle (may be extended to N queens).

The provided python code files include:

main.py - The main program file which will be used to run your code

initialization.py – Complete function “permutation” that generates a population of individuals represented as permutations

evaluation.py - Complete function “fitness_8queen” that computes the fitness of an individual (fitness to be maximized) (no need to follow the fitness discussed in class, may design your own)

parent_selection.py – Complete three functions for the MPS, tournament, and random-uniform parent selection methods

mutation.py - Complete function “permutation_swap” that implements the swap mutation for a permutation

recombination.py - Complete function “permutation_cut_and_crossfill” that implements the cut-and-crossfill recombination for two permutations

survivor_selection.py – Complete three functions for the mu+lambda, replacement, and random uniform survivor selection methods
Related categories: Python Algorithm NumPy