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).
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.Randomor something with the same interface). This solves a lot of potential issues tied to other possible external calls to the globalrandommodule (e.g. if the fitness function is also stochastic and callsrandom, two runs of a GP with the same global seeding might return different results).