Skip to content

Add seed support to UNU.RAN sampling strategies #113

@LeonidElkin

Description

@LeonidElkin

Summary

UNU.RAN-based sampling strategies should support explicit seeding for reproducible sampling.

Currently, sampling through UNU.RAN is not fully controllable from the public API. This makes examples, tests, benchmarks, and scientific experiments harder to reproduce.

This issue focuses specifically on the UNU.RAN integration layer and its strategy/configuration objects.


Problem

Users should be able to create a UNU.RAN sampling strategy with an explicit seed and receive reproducible samples for the same distribution and sample size.

This is important for:

  1. Reproducible examples.
  2. Deterministic tests.
  3. Comparing different sampling methods.
  4. Scientific workflows that require reproducible stochastic results.

Expected behavior

Two independent UNU.RAN sampling strategies initialized with the same seed should produce identical samples for the same distribution and sample size.

The implementation should avoid hidden process-global RNG state. Each UNU.RAN sampler instance should own its own random generator or random stream.


Acceptance criteria

  1. UNU.RAN sampling strategies accept a seed through a public API.
  2. Same seed, same distribution, and same sample size produce reproducible samples.
  3. Different seeds produce different samples.
  4. Reproducibility does not depend on test execution order.
  5. Tests are added for reproducible UNU.RAN sampling.
  6. Examples or documentation mention seeded UNU.RAN sampling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions