Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is to explore how Genetic Algorithm works for the given problem. Program to solve the following problem using Genetic algorithm. You can use

This assignment is to explore how Genetic Algorithm works for the given problem. Program to solve the following problem using Genetic algorithm. You can use any programming language.
Program a Genetic Algorithm to find an integer number between 0 and 31 that maximizes the
function f(x)=x2.
The initial procedure is given as below.
Population size: 10
Crossover probability: 100%
Mutation probability: 5%
Terminating criteria:
When your program produces an average of candidates is equal to or greater than29, then you can accept it as a terminating condition.
Fitness function:
You can use the function itself (f(x)=x2) as your fitness function.
Your program should print the following.
1)For the 1st generation, print the process and result of selection, crossover, and mutation operation, that is, print the corresponding integer values and bits (binary values) before and after of selection, crossover, and mutation operation. You also need to decide the
crossover points and mutation points randomly and print them.
2) From the 2nd generation, you do not have to print all results of selection, crossover, mutation operations. Print just the result of each generation along with the average value of the result.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

Students also viewed these Databases questions

Question

LO3 Define job design and identify common approaches to job design.

Answered: 1 week ago