Math Genome Fun

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?

207 thoughts on “Math Genome Fun

  1. Mung:

    But somehow I allegedly don’t know that you can change the population size without changing the fitness function. Wow. Just freaking wow.

    Here’s what you wrote:

    Now if you start with an initial population of 1000 and need to give each genotype some probability of being represented in the next generation such that they all add up to 1 I bet you’ll have to change the fitness function.

    So yes, you didn’t know that you could change the population size without changing the fitness function. Wow. Just freaking wow.

  2. Mung,

    Changing the selection algorithm does not require changing the fitness function.

    I know, let’s pretend like I didn’t point out your error about roulette-wheel selection.

    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.

    Changing the selection algorithm does not require changing the fitness function.

    Here’s what I actually wrote:

    Now if you start with an initial population of 1000 and need to give each genotype some probability of being represented in the next generation such that they all add up to 1 I bet you’ll have to change the fitness function.

    I didn’t say anything about a selection algorithm.

    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.

  3. Mung: Why don’t you or one of your buddies start a thread on GA’s?

    Start with writing a general purpose GA and then have different people pose problems for it to solve and see how well it does at solving them.

    GA’s work, sometimes. Sometimes they don’t work. I don’t work with GA’s, but I know enough about them to know that they are both designed around the problem and that various parts of the GA have to be “fine tuned” to work together.

    A simple step-by-step exercise in writing a GA would make that blazingly obvious. You have enough fans of GA’s here to bring that about don’t you?

    I’d really like to see how DiEb wrote a GA to solve your problem without coding into that GA knowledge of the problem and hints on how to solve it. Wouldn’t you? How do you quantify that, in terms of information?

    Richardthughes has no answer.

  4. keiths: So yes, you didn’t know that you could change the population size without changing the fitness function.

    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.

  5. keiths: 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.

  6. Mung:

    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.

    Who claimed there was a generic GA that could solve any problem?

    Link, please.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.