Skip to content

Seeding for pseudo-random number generation #14

Description

@albertotonda

I am still reading the code, but so far it seems that there is no way of seeding the pseudo-random number generation in the different GPs. Is this correct? In that case, it should definitely be changed, in order to obtain reproducible results.

I would recommend taking inspiration from what they did for inspyred (eheh) https://github.com/aarongarrett/inspyred , where when the instance of an algorithm is created, one of the arguments is a pre-generated pseudo-random number generation object (an instance of random.Random or something with the same interface). This solves a lot of potential issues tied to other possible external calls to the global random module (e.g. if the fitness function is also stochastic and calls random, two runs of a GP with the same global seeding might return different results).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions