You have thirteen characters: the numbers 1-9 and the operators for Plus, Minus, Divide and Multiply. Arrange them in a string so they have the highest possible value, or write a program to do this for you. If a string cannot execute as a mathematical function, it scores zero.
Full list [1,2,3,4,5,6,7,8,9,+,-,*,/]
There are 13! possibilities. How many score more than 0 (are mathematically viable)? How many steps did you program take / candidates did it evaluate. How did you know when to stop?
Mung:
Here’s what you wrote:
So yes, you didn’t know that you could change the population size without changing the fitness function. Wow. Just freaking wow.
Mung,
I made no such error. What you described is called roulette wheel selection. Anyone familiar with the literature and having even minimal experience developing GAs would realize that.
The fact that you don’t recognize that you did demonstrates your lack of knowledge. When you say “give each genotype some probability of being represented in the next generation such that they all ad up to 1” you are describing the selection algorithm. There is no need to change the fitness function when changing the selection algorithm. You are simply wrong, and in such a way as to demonstrate your ignorance of the topic.
Richardthughes has no answer.
Right. In spite of evidence to the contrary, and in spite of your sample size, and in spite of your decision to interpret what I wrote in such a way as to support your conclusion and disregard my insistence that your interpretation is incorrect.
Mung, dear, you lost this one already.
Meanwhile, you and all the other fans of GA’s here at TSZ just can’t be bothered to create an OP and publish the generic GA that can solve any problem.
Let’s pretend like that is because I just don’t understand GA’s. LoL.
Mung:
Who claimed there was a generic GA that could solve any problem?
Link, please.