[Kde-games-devel] Reproducing random numbers

Albert Astals Cid aacid at kde.org
Wed Apr 15 23:36:21 CEST 2009


A Dimecres, 15 d'abril de 2009, Ian Wadham va escriure:
> On Wed, 15 Apr 2009 8:28:04 am Albert Astals Cid wrote:
> > A Tuesday, 14 of April de 2009, Ian Wadham va escriure:
> > > On Mon, 13 Apr 2009 9:57:09 pm Albert Astals Cid wrote:
> > > > Reading the code and the documentation is what i understand too
> > > > (KRandomSequence with seed gives a "known" random sequence), if you
> > > > find this to be false i would qualify it as a bug.
> > >
> > > Agreed, but see Kevin's point about cross-platform and future versions
> > > of KRandomSequence.
> >
> > From what i see KRandomSequence is totally self contained (calculates
> > itself the random values) so that should not be a problem, right?
>
> Not right now, but what if somebody decides to tweak the internal
> constants to yield a statistically-improved pseudo-random sequence
> of numbers?  Or what if someone publishes a new, ground-breaking,
> must-have RNG algorithm (the Ferrari-Hummer algorithm :-))? 

Of course if someone changes KRandomSequence, it's output will change :)

> Those
> changes would very probably alter the numbers produced from a given
> seed, and so all the recordings built in to demos and tutorials in
> KGoldrunner would have to be re-created (at least).
> It is easy enough to record and replay the RN stream that was used at
> recording time, so why take a risk?

It was you that asked first :D

If you think record + replay is ok i'm all for it.

Albert

>
> Cheers, Ian W.
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel




More information about the kde-games-devel mailing list