Grasshopper

algorithmic modeling for Rhino

Hi,

I'd like to know what the seed value range in the random components is. I've been searching in the forum for a while but didn't find an answer. Is it 0-1 or is it relevant to the list input?

I have a list with 1083 items and i am using random reduce to obtain only three of them. 

The seed slider is going to be plugged as a gene variable to galapagos so i want to ensure that while galapagos runs all 1083 values will have equal possibility of being selected. 

Thanks!

Views: 3320

Replies to This Discussion

Random seeds are integers. Any integer. The lowest possible integer is -2,147,483,648 and the highest possible integer is +2,147,483,647

 

Every integer results in a unique (but always repeatable) series of random numbers.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

So for a list with N numbers, every integer from 1 to N! should correspond to a unique combination of numbers, if I get it right?

Because for my case I should have 1800! possible combinations which is a far too high number.

Is there an easier way to achieve this? (randomly selecting 3 out of 1803 values, ensuring that all numbers could be selected)

I added an FAQ topic for Random Seed Values.

If you want to randomly pick 3 values between 0 and 1803, all you need to do is generate 3 random numbers in the range 0-1803

If you want to generate more than one sequences of 3 random numbers in between 0 and 1803, you'll need to supply more than one seed value. If you supply five different seeds, you'll get five different sequences:

If you want additional constraints on what these sequences look like (for example, you don't want to the same number to appear more than once), then additional logic is required.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

hmmm.. i read your topic,

your point is right about the discontinuity being a major drawback in optimization, but it seems that there is no other way because i have an unknown (not predefined) number of genes and an unknown value range. A slider with an upper/lower limit input could partially solve the problem, but still I would have to somehow select multiple values out of it. 

anyway, the optimization seems to work somehow (!) even with these drawbacks, so i'll probably leave it as it is for now and set seed range to max. possible...

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