Discuss Scratch

AlfabetonsOfficial
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

BTW, I can't think of any use for this block other than biased lucky number generators.
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

AlfabetonsOfficial wrote:

No support, Scratch is used by 8-12 year olds, and I bet more than 99% of them would be confused on what this does. Especially the word “seed”.
Using that logic, these blocks should be deleted:
6mod8sqrtof9absof9Anything in this dropdown menuof9

And those are also very useful.

Last edited by ZippingBobcaat49 (Nov. 26, 2021 12:54:16)

Geotale
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

Why should this be added, if you don't mind?
I still don't understand what the purpose of this is. It also leaves confusion based on implementation – Wouldn't the value stay the same because you're using the exact same seed, if it were implemented? If not, then is it really any different than the normal random block?
What about things like this?
gotorandom position

Last edited by Geotale (Nov. 26, 2021 15:03:58)

AlfabetonsOfficial
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

ZippingBobcaat49 wrote:

AlfabetonsOfficial wrote:

No support, Scratch is used by 8-12 year olds, and I bet more than 99% of them would be confused on what this does. Especially the word “seed”.
Using that logic, these blocks should be deleted:
6mod8sqrtof9absof9Anything in this dropdown menuof9

And those are also very useful.
But the Seed block you are suggesting isn't very useful at all. The only use I can think of is a biased whatever generator.
Za-Chary
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

Correct me if I'm wrong, but of course choosing the same seed would not lead to the same outcome, right? For example, if I ran

pickrandom1to10withseed42

twice, I could theoretically get 2 the first time and 7 the second time, right? As in, using the same seed still allows the block to pick random numbers every time? Otherwise it wouldn't really serve much as a random function, unless there's something about Python/Java programming that I've forgotten about.

Now let us suppose the answer to the question above is “yes” (I think it is). In which case, what purpose does this block serve over the existing

pickrandom1to10

block? If someone wants to pick a random number from 1 to 10, what is the benefit to choosing a specific seed to do this rather than just relying on the existing block?
AlfabetonsOfficial
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

Za-Chary wrote:

Correct me if I'm wrong, but of course choosing the same seed would not lead to the same outcome, right? For example, if I ran

pickrandom1to10withseed42

twice, I could theoretically get 2 the first time and 7 the second time, right? As in, using the same seed still allows the block to pick random numbers every time? Otherwise it wouldn't really serve much as a random function, unless there's something about Python/Java programming that I've forgotten about.

Now let us suppose the answer to the question above is “yes” (I think it is). In which case, what purpose does this block serve over the existing

pickrandom1to10

block? If someone wants to pick a random number from 1 to 10, what is the benefit to choosing a specific seed to do this rather than just relying on the existing block?
I agree. This is why this block is not beneficial for Scratch and just confuzzles people.
IndexErrorException
Scratcher
500+ posts

"Pick Random () To () With Seed ()" Block

Support 100%, I just don't like the implementation of it. I think a better way would be like this, more like real coding languages:

First you select the number(a integer) that would be the place of the random number, then you put the range and seed of the number like this:



So that means you can start the pager number at 1, then for the next random number using that seed, you can increment it by 1, and keep doing this to get numbers that will be random from each other but the same for that seed.
Maximouse
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

Za-Chary wrote:

Correct me if I'm wrong, but of course choosing the same seed would not lead to the same outcome, right? For example, if I ran

pickrandom1to10withseed42

twice, I could theoretically get 2 the first time and 7 the second time, right? As in, using the same seed still allows the block to pick random numbers every time? Otherwise it wouldn't really serve much as a random function, unless there's something about Python/Java programming that I've forgotten about.

Now let us suppose the answer to the question above is “yes” (I think it is). In which case, what purpose does this block serve over the existing

pickrandom1to10

block? If someone wants to pick a random number from 1 to 10, what is the benefit to choosing a specific seed to do this rather than just relying on the existing block?
I think the purpose of the block is to allow using the same seed to generate the same sequence of random numbers every time the project runs. It would probably return a different number when called twice with the same seed without restarting the project. It could also return the same number when used twice with the same seed: in that case, you could store the result in a variable and use it as a seed for the next number.

A less ambiguous way to do the same thing would be a block like this:
setrandomseedto
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

bump III: Revenge of the moderators
ThatCoder77471
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

i know that seeds is a set of numbers that generate a specific structure perfectly each time, but what would that do in a pick random block? it doesn't make sense
ScolderCreations
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

For those who don't understand, the same seed will always produce the same number, but it's still not easy to predict what number you would receive from the seed. The seed could be a number, a string, or any other kind of value.
Maximouse
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

ScolderCreations wrote:

For those who don't understand, the same seed will always produce the same number, but it's still not easy to predict what number you would receive from the seed. The seed could be a number, a string, or any other kind of value.
Most random number generators don't work like that: you set a seed, then start generating numbers to get a sequence.
-CloudGate-
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

dave-alt-4 wrote:

hiPeeps124816 wrote:

No support, scratch wasnt meant to be a perlin noise engine
and people like 9 year old me wouldnt know what seeds were or ask friends and accept a lie from them
besides, theres this
definerandomwithseedminmaxseedsetlcgto1664525*seed+1013904223mod1024setrandomtomin+max-min*lcg/1024

right…. that workaround isn't that easy now is it?
yes, but not many people will need the block. If you really need it then use the workaround.
ScolderCreations
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

-CloudGate- wrote:

dave-alt-4 wrote:

hiPeeps124816 wrote:

No support, scratch wasnt meant to be a perlin noise engine and people like 9 year old me wouldnt know what seeds were or ask friends and accept a lie from them besides, theres this
definerandomwithseedminmaxseedsetlcgto1664525*seed+1013904223mod1024setrandomtomin+max-min*lcg/1024
right…. that workaround isn't that easy now is it?
yes, but not many people will need the block. If you really need it then use the workaround.
the workaround is impossible to remember, so it's not a good workaround.
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

Bump IV: A New Page.
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

Bump V: The Raiders Strike Back
SDFTDusername
Scratcher
42 posts

"Pick Random () To () With Seed ()" Block

bump
-Quantum_Studios-
Scratcher
500+ posts

"Pick Random () To () With Seed ()" Block

It would be cool if this was in an “advanced blocks” extension.
Guest_102233
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

No support - This would confuse the target audience as the majority of them here on Scratch would probably don't know anything about noise generation or a seed in general (not just minecraft).
ScolderCreations
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

Guest_102233 wrote:

No support - This would confuse the target audience as the majority of them here on Scratch would probably don't know anything about noise generation or a seed in general (not just minecraft).
Now this is an example of bad logic: you don't break out crying just because you see something you don't understand, you just don't use it. Considering the fact that the workaround is incredibly difficult, and this block actually has a variety of uses in pretty cool projects, I think this should be implemented.

Powered by DjangoBB