Skip to content

Random generator seed for an Island engine #36

@morincer

Description

@morincer

Hi! I'm currently building an island-based genetic calculations model and found a glitch with reproducibility.

Currently, the island engine passes the same random generator instance to each thread allocated for an island. Considering threads (code in the threads, actually) are naturally executed in an upredictable order (and so are random number picked from the rng), setting a seed on the rng have no desired effect - each program execution results are different.

I see two options actually:

  1. Clone rng for each island
  2. Make a constructor overload for the IslandEngine which accepts array of rng's (or rng provider callback) as a parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions