Grasshopper

algorithmic modeling for Rhino

Hi guys,

I found this article on the news today and got quite inspired although i have no idea what an evolutionary algorithm is:

http://www.bdonline.co.uk/story.asp?sectioncode=453&storycode=3...

Any idea as to how we could do that using Grasshopper?

Thanks a lot,

Arthur

Views: 2148

Replies to This Discussion

Hi Arthur,

I actually was involved in assisting Fred with aspects of programming that plug-in (he did all the coding regarding the genetric algorithm and definition of the project).

To describe briefly the genetic algorithm (and I'm no expert, so someone may correct me), you basically start with a set of generated responses to a problem. You then use your mult-objective criteria to judge and rank each answer. Then a random process of piecing together aspects of pairs of answers (higher ranked solutions are given higher probability of being select) spawns a new generation of answers. The process is iterated a large number of times, and the solution should improve each step of the process as you are prioritizing the best answers.

Never say never, already we see some really amazing work being done with Grasshopper. But for that particular project, I would say it wasn't really well suited to Grasshopper. It produces so many solutions within each iteration, and the computation time required was long enough (and we would post process the generation of the Rhino geometry so to not slow it down). In my opinion, the Grasshopper constant updating of the conduit geometry in calculation steps would be a hindrance. That's not to say that you couldn't integrate grasshopper into aspects of defining the problem as necessary.

Fred presented this work at Simply Rhino's Shape to Fabrication last year, his presentation (or close to it) can be found on the right hand project info at http://www.expedition.uk.com/index.php?pid=141

Hope this helps,

Jon
Thanks Jon and Daniel,
I love how simple the concept is but the coding must really complicated no?
Any simple example of a genetic algorithm?
Would it be possible to make one using VB.net for Rhino?
Do you know which program/software was used for Santa-Maria?
Thanks again
Hi Arthur,

the basics of an evolutionary solver are pretty easy. I managed to write one from scratch in 2 days. Sure, it's not very good yet, but it works. The hard part is often hooking it up to a specific problem. Another difficult part if to write a fitness function. In the article mentioned at the top of this discussion, I suppose that may well have been by far the hardest part.

You can write evolutionary algorithms in any programming language you want, as long as it supports iteration. VB.NET, VBScript, C++, Python etc. etc.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks David,
Would it be possible to paste on this discussion the simplest Genetic Algorithm possible?
Just to have a look...
Er... Galapagos is a framework algorithm, it only works if someone is actually driving it. And when I say "simple", I don't mean "20 lines or less", I meant I could write it in 2 days without thinking all too much. It's still thousands of lines of code distributed over dozens of classes.

There are however a lot of examples online (mostly Java, Processing or Flash) of simple evolutionary algorithms.

I found this as pseudocode, about as simple as it gets:


Simple Genetic Algorithm ()
{
Initialization;
Evaluation;
while termination criterion has not been reached
{
Selection_and_Reproduction;
Crossover;
Mutation;
Evaluation;
}
}



--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi Arthur,

The algorithm was initially programmed in Rhinoscript, but we needed better performance.
We wrote it in vb.net, as a Rhino plug-in so we could take advantage of the geometry functions available in open Nurbs and the SDK.

Galapagos was a discussion I missed, glad to hear it and looks great.

Cheers,

Jon
We're also still eagerly awaiting any further news on David's Galapagos project...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service