Grasshopper

algorithmic modeling for Rhino

i am trying to create some circles on a surface with random radius and to place them randomly on it so that the circles are not intersected between them at all.
the galapagos can not find the solution (i tried to connect to galapagos the 2 or 3 sliders that change the seed value of the jitter of x,y and r parameters.
any ideas???
thanks!

 and here is the definition
circles01.ghx

and here is a simplified approach with 4 circles inside a rectangle (but still the galapagos cannot solve it!!) why?

 and here is the definition
circles02.ghx

Views: 2471

Replies to This Discussion

Hi idtasos,

a random number sequence does not have a smooth progression, and the changes from one sequence to another if you use a different seed, are not smooth either. Evolutionary solvers require a fitness landscape that is at least partly continuous (see the lower part of the Fitness Functions section in this blog post, your setup is similar to the noise/chaos graph).

You will never be able to solve a system where the genes represent the seed input for a random sequence. I'm afraid you will have to use three sliders per circle (location-x, location-y, radius).

--
David Rutten
david@mcneel.com
Seattle, WA
the thing is i already tried it (see above circles02.ghx) and it doesn't work! and if it would work is there a way of avoiding the connection of 3X100 (for a 100 circles setup) sliders to galapagos (3 sliders for each circle, x-y-r)?

thanks for your reply!!
Hi, I gave a quick look at the definition circles02.ghx.
Are you sure Mass Addition is the right method to get non-intersecting circles?
Galapagos is working pretty well on my side, finding a solution for the relative position of the centers, or something close to this...
Minor review: you can use the distance component instead of creating lines and evaluating their length.
Giancarlo
http://rhinoart.info
Attachments:
I didn't understand? it seems that it doesnt work in you too. What i am trying to accomplish is this

it seems too easy for a human!! i am trying to minimize the sum (distance between 2 circles)-R1-R2. Is that the right approach?

thank you!!
yep, but I think you're losing the 1-to-1 relation between the circles-
what I mean is that you're performing a sum between all the distances and all the radius in the scene, while each distance is between 2 circles only which have their specific radius: you're mixing distance between circle A and B with radius from circles C and D.
in fact, if you try your definition with just two circles it works perfectly.
you cannot feed galapagos with all the sliders at the same time using that fitness.
ok! i saw your point. i will try it. the problem is how to correspond the 3 values for a lot of circles together!! :(

thanks for your time!
this is my (quick) solution for the 4-circles problem.
I managed to solve the problem for the first circle, that's why you see 4 copies of the same block of components: of course you can refine the definition to get to a more elegant solution :)
in case you have several more circles, you could try to list them and then subtract one circle at a time in a recursive way, or work with data trees: but probably the best way to do this is a script.
take care ;)
Attachments:
Hi idtasos,

Probably Giancarlo is right that the best solution will be a script but...
Today I decided to be more familiar with Galapagos and I think I`ve found some solution for you.
As someone mentioned before the idea is based on difference between distances between circles center points and a sum of they radiuses :O)

Definition is not perfect - it needs more time to simplify it for more circles but its work.
First one is working with circles and second with spheres (this one is seems to be less accurate - I don`t know why?)

Good luck
Attachments:
Hey there,

I'm pretty new to Galapagos myself, but my gut tells me that as attractive as it is, it's not the right tool for your problem. If the only thing you are trying to do is distribute random circles across a surface without intersections, there are an infinite number of possibilities and nothing that is really being optimized (other than a lower number of intersections, but as you point out a human can do this task easily).

Perhaps you'd be better off with some kind of modified circle packing algorithm?

http://www.grasshopper3d.com/forum/topics/circle-packing-constraint...
the problem is that i dont know scripting and i am trying to do it using grasshopper. I know its easy for our mind but that is the strange thing that its no so easy as it seems for galapagos

I'm not a specialist either in neuroscience or genetic algorithms, but in my experience problems that are easy for the human mind are ill suited for genetic algorithms. It seems to be pretty directly inverse relationship. This is my amateurish theory: Our minds are incredible at signal processing and pattern recognition. We are also not too bad at modeling reality and making predictive outcomes about systems (at least in the short term). Genetic Algorithms have no knowledge of the problem they've been given. They are more or less blindly stumbling around a fitness landscape trying to find the lowest or highest point. This is good for optimizing well defined problems with complex, but smooth fitness landscapes.


When there are (infinitely) many potential outcomes that meet only a single binary criteria (e.g. circles intersecting or not) its not going to do so well. On the other hand, we look at the problem and not only are we able to solve it nearly instantly, but we'll also be considering the very human and subjective element of aesthetic.

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