What is Nostr?
I am still :ablobcatsweatsip: ing /
npub1y6t…9wl9
2023-08-09 13:15:36
in reply to nevent1q…heqm

I am still :ablobcatsweatsip: ing on Nostr: d symptoms of using the rand() call because they didn't know any better. Tip though ...

d (npub15fk…j9gr) symptoms of using the rand() call because they didn't know any better.

Tip though of you ever want to put RNG and stuff you do: you really need to put in anti-streak mechanisms. The way I do it is that I have the outcomes have counters and each time you get that outcome it gets some percentage less likely that you'll get that outcome, changing the weights each time.

So of you start with A/B with a 50/50 chance, of you hit A the offs next time will be 45/55, then hit A -> 40/60, then hit B -> 45/55. That makes it no longer true random but computer RNG does not at all resemble real life probability in the short term and this is a smoke and mirrors fix for it.

Note that this is bad for security it just feels good.
Author Public Key
npub1y6tk68elxfcrz8yx5kf32agav67hwz4rt2ff22f8rl98yxh7uxhsx69wl9