Quantcast
Channel: designcoding » galapagos
Viewing all articles
Browse latest Browse all 2

Packing Objects with Galapagos

0
0

After the starting point of Galapagos, there came another attempt to utilize this beautiful addition of David Rutten. This time, I worked over a night to tell it what I want. The point was (or seemed to be) simple at first sight. I wanted several shapes (not one) to fit into an area,  as smallest as possible, but without overlaps. A bounding box and area components quickly gave me the first fitness value. The area of the bounding rectangle should be as small as possible. That is a sentence I think Galapagos could easily understand. However, when I came into the other sentence, that is “without overlaps” that was the big question. My partial solution was to identify the total area of the shapes, and check it with the present “unified” area of the shape. I found no other way to tell Grasshopper that one or several objects in a set are overlapping.

The third challenge was to evaluate these two to create a single fitness number. As I cannot tell Galapagos that these object should never collide, then the overlapping curve areas are multiplied by 20. Also the total area of the bounding rectangle is divided by 10 to decrease it’s effectiveness. Then, these two numbers are added together to create Galapagos fitness value. Funny thing is to see it actually working. Whenever it creates an overlap, it suddenly draws back. I felt I’ve terrified Galapagos. It tries to decrease the total bounding area carefully, without overlapping. Although I’ve changed Galapagos parameters, it cannot fully solve this problem. Maybe I’ve programmed it wrong but somehow it now seems to me a little out of Galapagos’ context. Because it cannot foresee even very obvious things that could have reduced fitness value. Here is my working file, feel free to use and advance it; [GHX: 0.8.0066]

Maybe Galapagos could be further improved by adding multiple fitness values and other types of fitness values such as boolean, and also other types of input (gene) values such as graph input.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images