Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

repetitive randomizers ruining randomness

Archive: 8 posts


Ok, I know randomizers aren't really random. I've fixed that part by just leaving it running the whole time until the user initiates the output display.

My problem is that I still get a number of back to back repeats on numbers.

I have set it up to add until full then start over each activation runs through a counter to create a one shot pulse. The counters then run ito inputs on a selector.

Even set up like that I am still getting lots of repeat numbers. Probably 30-40% of the time when I do a cycle of 7 display activations I get back to back repeat.

Is there some timing trick or something that can help with this?
2011-09-02 21:43:00

Author:
tdarb
Posts: 689


I thought randomizers became random again after the latest update?
you could made the randomiser 3x faster and hook it up to counters set to three before it goes to the numbers. This would make the chain longer and in theory, make it random.
2011-09-04 03:37:00

Author:
Unknown User


Your setup with the add and pulse outputs should work. It sounds like they are being activated again though even after the wire turns on. Instead, invert the counters and have the activation reset them. When all outcomes are activated (AND gate), activate all the counters to have them return to the off state.

Connect all the counters to a counter pulse to make them 1-shot.
2011-09-04 16:31:00

Author:
SSTAGG1
Posts: 1136


That's a good idea. I'm already running the randomizer at .2 seconds. i could go to .1, but any faster ruins the display effect because it's just too fast to process visually.

SSTAGG, wouldn't those first inverted counters essentially do the same thing the randomizer is?

Nothing is being activated again as far as I can see. It SHOULD be working properly. It is just an abnormality with the randomizer as far as I can tell.

One thing I noticed is that, when using the add until full, it doesn't really reset to 0. When it is full, one wire stays active at the reset. This creates a strange effect where, since that wire never resets, there is a gap in timing when trying to use pulses. That is where some of the display issues arise. I can probably work around this.

It seems that a large percentage of the time this wire will correlate with the last activated wire.

I think I have an idea for a simulated solution. It won't really be random, but it will look like it is, and should function randomly enough. I'll post again after I try it.
2011-09-04 23:11:00

Author:
tdarb
Posts: 689


I've got heavy experience about randomizers, and this is a real problem.

In my Geometry Wars Beta (http://lbp.me/v/3gbet8), I've used complex functions based on many Randomizers actived when the proper conditions are met, and handled this problem.

First of all, I want to make you know this: in software, randomness is not really random. Random functions used in programmation are based in a "huge values' pseudorandom list" to say it somehow. So, one of all these values is took for showing the first random value. I call this the "seed value". So the random function gets the next random values from Seed Value to forward, in lineal order.

In Visual Basic programming code, there's a function that uses the keyword Rnd to generate a random value. So, before using it, my software uses another function - keyword Randomize, to set a seed value depending on the Computer's Internal Clock. This way the randomization is as good as possible.

In LBP2, the "seed value randomizing" of the Randomizer gadget tends to not work well or something, so the Seed Value is the same every time you replay the level. In other words, it repeats the same pseudorandom sequence. Even with the last updates, the problem persists, specially with randomizers with more than 50 wires took from it's output.

I had to do something to make the Seed Value to not be repeated in my level. So I tried to "emmit the Randomizer" when I needed it. It's output wires are connected to different labelled tags to connect them wirelessly (through 0 to 5000 ranged Tag Sensors). This solved the problem. But it has got a weak point:

Let's imagine that a chronometre starts just when the level starts working in play mode. Let's call this "TIME X". If my "emitted Randomizer" system is emmited EXACTLY at the same TIME X moment every time you replay the level, the random sequence is the same again. Else, the problem is solved and it's really random.

To summarize, try this: put a Randomizer inside an empty chip. Stick the chip to a piece of Invisible Hologram. Then, wire as many random outputs as you need to different labelled Tags (be sure to give a different Label Name to each Tag. For example: RND1, RND2, RND3 and so on). This tags will be useful to get every random signal wirelessly with 0 to 5000 Tag Sensors. Then, save the piece inside an emmitter and trigger it when you need the random function.

This system made my random logics be more random, almost without repetitive patterns. I hope this solution will be helpful for you and whoever had this problem.
2011-10-22 22:38:00

Author:
SebasSBM
Posts: 159


I would add one thing : the most random factor is the player itself. Just placing a player sensor close to the start, then hook it to a speed-scale timer, and hook the timer to an emitter. That "should" do it. I never really needed true random stuff (lol, that was random)2011-10-22 22:47:00

Author:
Unknown User


Random functions used in programmation are based in a "huge values' pseudorandom list" to say it somehow.

To clarify, they're not really selected from a huge list of fixed values, but use a fairly complex, feedback-based algorithm like a Mersenne twister (http://en.wikipedia.org/wiki/Mersenne_twister). However, there are better methods in use, which collect entropy from less predictable sources, like Linux's /dev/random (http://en.wikipedia.org/wiki//dev/random).



In LBP2, the "seed value randomizing" of the Randomizer gadget tends to not work well or something, so the Seed Value is the same every time you replay the level.

Looks as if the seed is set to the internal level clock value when the level starts. In both "On/Off" or "Override Pattern" mode, you always get the same pattern regardless of when the Randomizer is triggered.



...put a Randomizer inside an empty chip. Stick the chip to a piece of Invisible Hologram. Then, wire as many random outputs as you need to different labelled Tags (be sure to give a different Label Name to each Tag. For example: RND1, RND2, RND3 and so on). This tags will be useful to get every random signal wirelessly with 0 to 5000 Tag Sensors. Then, save the piece inside an emmitter and trigger it when you need the random function.

Seems like overkill having to have all those tags/sensors, when something like this would work...

http://i9.lbp.me/img/ft/d998389e1e6c4a2f659d6042cbb1cb66673b950b.png

...that is you get the randomizer (in "Override Pattern" mode) to continually generate its pseudorandom pattern, and only sample the value when you need it. As long as there's some entropy in the sampling time, you'll get a different pattern every time.
2011-10-23 23:14:00

Author:
Aya042
Posts: 2870


http://i9.lbp.me/img/ft/d998389e1e6c4a2f659d6042cbb1cb66673b950b.png

...that is you get the randomizer (in "Override Pattern" mode) to continually generate its pseudorandom pattern, and only sample the value when you need it. As long as there's some entropy in the sampling time, you'll get a different pattern every time.

That's very close to the setup I ended up with after posting this thread, except I only needed it to activate once, so I used a 5 port selector and ran output one into the randomizer so it deactivated once a value was set.

As for the seeding, I could be mistaken but I believe the seed value is tied to the time of your last save. If you go from create to play mode you get the same sequence every time. I even got the same sequence when exiting and returning to the level, but I seem to remember it changing after I saved.
2011-10-24 02:18:00

Author:
tdarb
Posts: 689


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.