Question

How do you write a genetic algorithm to find a minimum value? When the minimum value...

How do you write a genetic algorithm to find a minimum value? When the minimum value is between -5 and 5 for all variables/dials?

solution would look like this
0.0 -2.549550887309249 0.35704557166422424 etc

Fitness 1 is: 167.8344671475403

Homework Answers

Answer #1

In order to find a minimum value ranging from -5 to 5,you need to make use the type of float that will take the value of decimal while comparing and you need to make use of the comparison condition in order to compare the values using the loop condition and while iterating over all the values you need to make use of a temporary variable that will be providing the minimum value and comparing this value with all the others values in the data and this value will be assigned it with the new value if the compare value is less than this value.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write an algorithm not code or solution only algorithm such as (step1, step2.....about. 1.How would you...
Write an algorithm not code or solution only algorithm such as (step1, step2.....about. 1.How would you use a stack to verify whether a given string is a palindrome or not. 2. How would you check if a string is a palindrome or not, using queues and deques.
How do you name compounds? Like when do you know when to do bi, tri, hex...
How do you name compounds? Like when do you know when to do bi, tri, hex etc.
Write the algorithm for this program using the C++ language (not python or java). The explanation...
Write the algorithm for this program using the C++ language (not python or java). The explanation needs to be at least 250 words. Explain everything throughly step by step. While there is a built-in pop_back function in the vector class, there is no built-in pop_front function. Suppose a program needs a pop_front function that will remove the first element from the vector. For example, if the original vector is [1, 2, 3, 4, 5], then after passing in this vector...
Write a program to enter the value of two variables (V and W) using inputbox. Find...
Write a program to enter the value of two variables (V and W) using inputbox. Find and print the minimum value for two variables in textbox. Design form window and select all the control objects are used.
Problems: 1-How many nodes would you expect to find when n=3? Where would you expect the...
Problems: 1-How many nodes would you expect to find when n=3? Where would you expect the maxima to be (psi)? 2- What is the minimum n value where you could start finding (psi) with a value < 0? 3-What is the minimum n value where you could start finding (psi)^2 with a value < 0?
Please post all code in Pseudo code. Please post ORIGINAL answers do not copy from similar...
Please post all code in Pseudo code. Please post ORIGINAL answers do not copy from similar questions. Please post in a format that can be directly copied. Reasoning on answers would be most helpful but not required. Thank you in advance for your help. 1.Design an algorithm to find all the common elements in two sorted lists of numbers. For example, for the lists 2, 5, 5, 5 and 2, 2, 3, 5, 5, 7, the output should be 2,...
x''+x=cost 1-how do you find the transient solution? 2-Find the steady state solution? How do you...
x''+x=cost 1-how do you find the transient solution? 2-Find the steady state solution? How do you graph the phase portrait
Write a Recursive Function Algorithm to find the terms of following recurrence relation. t(1)=3 t(k)=2×t(k-1)-5 (n>1)....
Write a Recursive Function Algorithm to find the terms of following recurrence relation. t(1)=3 t(k)=2×t(k-1)-5 (n>1). and (ii) If you call z←t(4) in a program then what value the program will use for z?   
(a) Write an algorithm (use pseudo-code) to determine whether a function f ∶ Z100 → Z100...
(a) Write an algorithm (use pseudo-code) to determine whether a function f ∶ Z100 → Z100 is surjective. That is, supply a “Method” to go with Input: A function (array) f with f(i) ∈ Z100 for i = 0, 1, . . . , 99. Output: Boolean B. B=‘true’ if f is surjective, ‘false’ otherwise. Try to make your algorithm as efficient as possible. Do NOT include an implementation of your algorithm in a programming language. (b) How many comparisons...
How do you analyze a transaction when they are to first record as a journal entry...
How do you analyze a transaction when they are to first record as a journal entry like the adjusted, but refering to the bank reconciliation? How do you analyze a transaction when they are the the kind that are recorded as the original journal entry? I ask it like that because i understand the accounting equation, but the business operation and the roles of all the transactions I do not.