Grasshopper

algorithmic modeling for Rhino

Hi There,

I just wanted to optimize my design, the question is; when we have series of fitness values, which we wanted to get the average of them, how should we define the set of values for galapagos? as it got bold in the pic below, I've defined it by Merge Component, is there another way of defining the set of fitness values, or it has been done right by the way? 

then if it's true, so what is the process of galapagos to handle the average of the series defined to fitness!?

thanks

Views: 3455

Replies to This Discussion

If you feed a collection of values into Galapagos, it will take the average itself. I've chosen to optimize the average rather than the sum so that [1,3,5] gives the same ultimate fitness as [1,2,3,4,5]. If you want to use the sum (or the weighted average or some other fitness definition) then you'll have to specifically post-process your values using Grasshopper components. You could for example use the MassAddition component. Or if you want to specifically weigh different partial fitnesses you could use an expression.

In the case of what you've posted above, the average of all values will be computed.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Real thanks for the clarification you've posted David,

somehow, i expect the average computation, should take the way through handle the genomes, from [A, B, C, D, E, F] to take out the number which makes a group of data defined like [a, b, c, d, e, f], going to what their average will be 25.0. so i wrote the fitness to 25.0, then ask galapagos to make [A, B, C, D, E, F], be in the position which makes the average of [a, b, c, d, e, f], to 25! the question is, there are some ways of being averaged in 25, (as you've mentioned above), but how can i be confident about the best collection of data has been selected from many possible solutions?

The threshold is not a target value. The solver will just stop once it goes past that number. It will never even start if you are on the right side (below for minimize, above for maximize)

If you want to reach a target value, minimize the numerical distance to this value.

Galapagos will (randomly) find only one possible optimum. If there are several largely different genomes with the same fitness, you either have to live with that or refine your fitness.

If you want a target value, just type that number into the textfield that normally says "minimize" or "maximize". If you have a target value (as opposed to positive or negative infinity), then the threshold will be ignored.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I've done it before the whole topic has being written here, the fact i'm looking for is; when we need to get a target value, from a series of values defined to fitness, there are lots of possible solutions to get them on average, how can i be confident about the output data set as the best set (which gives me a set to the average what i just defined as a target value in textfield you mentioned), in spite of the discipline of result is not what i expected? 

If you want all your values to approach a target (as opposed to the average of all values), then you'll need to convert them into a single fitness values yourself. You'll need to calculate for each value the deviation from the target. This deviation needs to always be positive. Then you need to add all those deviations together and minimize the result. It might also help to square the absolute deviations, so that a value that deviates a lot is 'punished' harder when it starts to deviate further still.

Or, in GH speak:

Or, using expressions:

--

David Rutten

david@mcneel.com

Poprad, Slovakia

You know what David, i gana shot my head, through a mirror which your comment attached on.

Real thanks

Damn, how could I have missed that for all those years?

You can have only one final fitness value. Looks like Galapagos averages the values, if you give it a list of fitness values. So merge will be one possible solution.

Since the order doesn't matter, you could just plug all your values into a single number param and use this as fitness with the same effect.

If you want to get independent of future Galapagos versions that might not average multiple fitness values, you can make sure using the "Average" component.

Generally, you should take care of how your fitness is calculated. Think of Galapago's internal averaging as a kind of fail-safe to make it "just work" even with multiple values.

Thanks Hannes,

i just got some points, gana test it if they work for what i expect or not,

but the comment above direct me to what i was looking for,

thank you

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service