[Bug 491] New: Boost randon number generator

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=491>

           Summary: Boost randon number generator
           Product: BFL
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: wrappers
        AssignedTo: bfl@lists.mech.kuleuven.be
        ReportedBy: tinne.delaet@mech.kuleuven.be
                CC: bfl@lists.mech.kuleuven.be
   Estimated Hours: 0.0

Apparently, calling sampleFrom on a Gaussian always results in the same set of
samples when using Boost as a random number generator. It appears like boost
has a fixed list of random samples, resulting in the same samples when
executing the program multiple times.
This problem does not occur when using lti as a randon number generator.

Is this an intrinsic problem with Boost (or are we not using the rng properly)?

I found the following note on
http://www.boost.org/libs/random/random-generators.html
"Note: These random number generators are not intended for use in applications
where non-deterministic random numbers are required. See nondet_random.html for
a choice of (hopefully) non-deterministic random number generators."

So maybe we should use the proposed class when we want non-deterministic randon
numbers.

Tinne

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

[Bug 491] Boost randon number generator

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=491>

--- Comment #1 from Tinne De Laet <tinne.delaet@mech.kuleuven.be>  2008-01-18 17:06:35 ---

This bug causes the new pdf_test (see BUG #441, Attachment #214) to fail
deterministically.
Apparently the 496'th sample is located outside the 4 sigma region.

Tinne

[Bug 491] Boost randon number generator

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=491>

--- Comment #2 from Klaas Gadeyne <klaas.gadeyne@fmtc.be>  2008-02-09 20:13:47 ---

Created an attachment (id=233)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=233)

quick-n-dirty fix for the test

This patch show that this can be fixed using a seed.
However, this is only a quick and dirty fix, so I'm not in favour of having it
applied.
The proper way to fix this is to make objects of the RNGs