Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will write a program in PYHTON or JAVA that is capable of solving 6x6 Sudoku problems using the search technique I presecribed below Your

You will write a program in PYHTON or JAVA that is capable of solving 6x6 Sudoku problems using the search technique I presecribed below Your program needs to be able to read in the data concerning the initial values that are specified for a given board. The format for this is up to you. You can go to several sites to get test data for known boards with a solution.

GENETIC ALGORITHM-

Please use the optimiation technique "Genetic Algorithm" to solve the SUDOKU problem:

implement the genetic algorithm approach using the following rules....

The evaluation function will be the number of binary inequality constraints that are being violated by the current guess at a solution. The population size will be 100. Each member should have its variable values randomly assigned initially and the evaluation function computed. Each iteration you will replace the existing 100 members with a new set of 100 members generated from pairing existing members. For each iteration do the following. Compute a probability value for each member based its evaluation function - a function value of 0 would have probability 1, while a max function value would have probability 0. Randomly pick pairs of members from the existing population. Multiply their probability values. Generate a random number (0-1) and if it is greater than the product, use this pair to generate a new pair. Continue this until you have 50 pairings. Each new pair should be created by picking a random crossover point in the variable vectors and swapping values. For both members of this new pair, each variable value should be checked for mutation by generating a random number (0-1) and if it is less than 0.01 then replace the current variable value with a random new value. The entire process should stop if a member of the population is found to have no constraint conflicts, or if the best evaluation function value does not change for 50 iterations. If you have converged to a local minimum that is not 0, do a random restart and continue. Keep track of the total number of iterations you took to get to the final solution. Print out this number of iterations and the solution.

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

=+(5.42) E[n \N2] = a, Var[n 'N.] - B - x2 +H-P n

Answered: 1 week ago

Question

=+5. How would you rewrite the copy to make it more effective?

Answered: 1 week ago