Question: JAVA OR PYTHON. PLEASE READ CAREFULLY!!!!!! THANKS YOU. You will be creating a genetic algorithm that solves an image puzzle. A genetic algorithm consists of:
JAVA OR PYTHON. PLEASE READ CAREFULLY!!!!!! THANKS YOU.
You will be creating a genetic algorithm that solves an image puzzle. A genetic algorithm consists of:
-
Population
-
ndividual
-
Selection
-
Crossover
-
Mutation
-
Fitness Function
Since there is no exact solution, solving the image puzzle requires you to decide the logic of each step mentioned above. Simple logic of a genetic algorithms steps is given in Figure 1.
Figure 1 - Logic of Genetic Algorithm
An example solution is given in Figure 2, and its parameters are given in Table I. Notice that, it is an example solution, your solution may differ in terms of image size, generation number, population size, fitness function etc.


What you should deliver:
-
You can work in pair in this homework (Maximum two)
-
You will specify (name surname ID) for you and your teammate.
-
You have to write detailed report of your solution:
-
You will specify your patch size.
-
You will explain how you constructed your crossover function, fitness function, mutation function and selection function (You can use graphics).
-
You have to put an image of the best individual of each generation.
-
Upload your code.
-
You can use Java or Python.
-
Start Create Initial Population ("Generation Zero') Calculate Fitness for each Individual in Population Selection Crossover Mutation Calculate Fitness for each Individual in Population Stopping Conditions Apply? No Yes Choose the Individual with the Highest Fitness Value End Image you want to achieve Shuffled Image Generation (1), Best Individual ...... Generation (n-1), Best Individual Generation(n), Best Individual (Solution) (You can find each generation's best individual in Generations.rar file) Figure 2 - An Example Solution Table 1 - Parameters of Example Solution Parameters of Example Solution Image Size 128X64 Image Channel (0) Grayscale (Important) Population 20 Generations 1000 Generation Number of 24 Solution Patch Size 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
