Grasshopper

algorithmic modeling for Rhino

I've been doing some simple exercises using Galapagos.

I understand it can find the maximum or minimum values according to the fitness.

Here is the setting leading to my question:

I create a square (rectangle with slider connected to X & Y) with a slider that has 0 as a minimum value and 10 as a maximum value. Then, I calculate the perimeter (length of line). If slider =10 then perimeter = 40.

If I reference the slider to the Genome, and the perimeter to the Fitness, I will get this results after computing:

Maximum value = 40

Minimum value = 0

How can I tell Galapagos (or what would be the right path to follow?) to find the necessary x & y values so that I get exactly i.e. 55 as a perimeter?

Views: 1758

Attachments:

Replies to This Discussion

If the maximum is 40, then obviously you cannot reach 55.

If you want to aim for a specific value, just type that value where it otherwise says "Minimize" or "Maximize" in the Galapagos UI.

--

David Rutten

david@mcneel.com

Tirol, Austria

If your target isn't that easy to type in yourself (perhaps because it's the result of a complicated equation, or perhaps because you want to be able to change it quickly using Grasshopper sliders, or perhaps because the target is in fact variable and in some way depends on other variables), then you'll have to switch Grasshopper to minimize and compute the Absolute difference between your fitness and the target. When this absolute difference hit zero, you've fit the ideal solution.

--

David Rutten

david@mcneel.com

Tirol, Austria

Alright, didn't realize I could type numbers in there, I used only max and min before.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service